CVE-2023-3973 (JavaScript, published 2023-07-27T15:15Z)
Description: value: Cross-site Scripting (XSS) - Reflected in GitHub repository jgraph/drawio prior to 21.6.3.
Severity: nan (CVSS v3 base score: 6.1)
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/jgraph/drawio
Files changed:
ChangeLog
SECURITY.md
VERSION
etc/dependencies/package.json
src/main/webapp/js/app.min.js
src/main/webapp/js/diagramly/App.js
src/main/webapp/js/diagramly/EditorUi.js
src/main/webapp/js/diagramly/Menus.js
src/main/webapp/js/diagramly/Pages.js
src/main/webapp/js/diagramly/vsdx/importer.js
src/main/webapp/js/export.js
src/main/webapp/js/extensions.min.js
src/main/webapp/js/grapheditor/EditorUi.js
src/main/webapp/js/grapheditor/Format.js
src/main/webapp/js/integrate.min.js
src/main/webapp/js/sanitizer/purify.min.js
src/main/webapp/js/viewer-static.min.js
src/main/webapp/js/viewer.min.js
src/main/webapp/mxgraph/mxClient.js
src/main/webapp/plugins/anonymize.js
src/main/webapp/service-worker.js
src/main/webapp/service-worker.js.map
Commit message: 21.6.3 release


Vulnerable code:
We only accept security reports against the latest version in this repo or the version deployed to app.diagrams.net, if different.
Report at https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fjgraph%2Fdrawio&validSearch=true. There is a bug bounty program in place there.

## Out of scope

- Issues relating to the PlantUML integration.
- Issues relating to the www.drawio.com web site.
21.6.2
	  "dompurify": "3.0.3",
/*! @license DOMPurify 3.0.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.0.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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.3",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmod)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.2",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=
new mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled()&&(this.delayedSelection?this.cell=a:this.start(a,b.getX(),b.getY()),
this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)))};mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==
b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("copyData").setEnabled(1==b.cells.length);this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("editStyle").setEnabled(1==b.cells.length);this.actions.get("editTooltip").setEnabled(1==
!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,
!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"format",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(109,!0,"decreaseFontSize",!0),g.bindAction(107,!0,"increaseFontSize",!0),g.bindAction(219,!0,"decreaseFontSize",!0),g.bindAction(221,!0,"increaseFontSize",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){f.isEnabled()&&
f.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var e=0;b.cell||b.row||(e+=this.addActions(a,["group","ungroup","copySize","pasteSize","swap"])+this.addActions(a,["removeFromGroup"]));b=this.addAction(a,"clearWaypoints");null!=b&&(mxUtils.br(a),b.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),e++);e+=this.addActions(a,
["lockUnlock"]);0==e&&(a.style.display="none");return a};
(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="21.6.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,g,n){function q(K){return"simple"==K||0==g&&"sketch"==K}g=null!=g?g:150;var t=Editor.currentTheme,x=q(t)&&this.isDefaultTheme(d)||this.isDefaultTheme(t)&&q(d),A=x&&"sketch"!=d&&"sketch"!=t;if(x&&!this.themeSwitching){Editor.currentTheme=
d;this.themeSwitching=!0;var E=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+g+"ms ease-in-out");0==g&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){q(t)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",this.tabContainer.style.display="flex",this.hsplit.style.display=
this.editor.graph.refresh();this.restoreScrollState(E);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&q(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=n&&n()}),g)}),g)}),g)}),0)}return A};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,
"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var n=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var q=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:
null;g=null!=q&&null!=q.getAttribute("class");if(!g&&null!=q){q=q.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;q==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";q=32>=d.clientWidth;d.style.visibility=q&&""==this.editor.getStatus()?"hidden":"";if(q||g)this.statusContainer.style.display=
"inline-flex",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",n);n()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",
null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);
this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);this.sidebarContainer.style.display="";if("sketch"==d){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var g=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();
this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=g?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(d=this.isDefaultTheme(d)||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];
null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.tagsWindow&&
(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(d){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=
Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);"simple"==d||"sketch"==d?(Editor.fitWindowBorders=new mxRectangle(60,30,30,30),g.defaultEdgeLength=120,null==urlParams.grid&&(g.defaultGridEnabled=!1),null==urlParams.pv&&(g.defaultPageVisible=!1)):Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(d){"simple"==d||"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=
document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"simple"==d||"sketch"==d?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText=
"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),"sketch"==d&&(this.sketchWrapperElt.className="geSketch"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=
function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.style.cssText="position:absolute;padding:9px 12px;overflow:hidden;white-space:nowrap;user-select:none;box-sizing:border-box;";var g=this.createMenu("simple"==d?"view":"diagram","simple"==d?Editor.thinViewImage:Editor.menuImage);this.sketchMainMenuElt.appendChild(g);"simple"==d?(this.sketchMainMenuElt.className="geToolbarContainer geSimpleMainMenu",this.sketchMainMenuElt.style.display=
"flex",this.sketchMainMenuElt.style.height="52px",this.sketchMainMenuElt.style.justifyContent="start",this.sketchMainMenuElt.style.alignItems="center",this.sketchMainMenuElt.style.top="0px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.sketchMainMenuElt.style.gap="10px",g.style.flexShrink="0",g.style.opacity="0.7"):(this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",
Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.borderRadius="4px",this.sketchMainMenuElt.style.height="44px",this.sketchMainMenuElt.style.left="10px",this.sketchMainMenuElt.style.top="10px",this.sketchMainMenuElt.style.zIndex="1");this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=
urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";var g=this.sketchFooterMenuElt;if("simple"!=d){var n=this.createPageMenuTab(!1,"simple"!=d);n.className="geToolbarButton geAdaptiveAsset";n.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px 16px 4px 4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;background-position:right 0px top 8px;background-repeat:no-repeat;background-size:13px;background-image:url("+
mxWindow.prototype.minimizeImage+");";g.appendChild(n);var q=mxUtils.bind(this,function(){n.innerText="";if(null!=this.currentPage){mxUtils.write(n,this.currentPage.getName());var H=null!=this.pages?this.pages.length:1,V=this.getPageIndex(this.currentPage);V=null!=V?V+1:1;var R=this.currentPage.getId();n.setAttribute("title",this.currentPage.getName()+" ("+V+"/"+H+")"+(null!=R?" ["+R+"]":""))}});this.editor.addListener("pagesPatched",q);this.editor.addListener("pageSelected",q);this.editor.addListener("pageRenamed",
q);this.editor.addListener("fileLoaded",q);q();var t=mxUtils.bind(this,function(){n.style.display=this.isPageMenuVisible()?"inline-block":"none"});this.addListener("editInlineStart",mxUtils.bind(this,function(){t();q()}));this.addListener("fileDescriptorChanged",t);this.addListener("pagesVisibleChanged",t);this.editor.addListener("pagesPatched",t);t();g.appendChild(this.createMenuItem("zoomOut",Editor.minusImage))}var x=this.createMenu("viewZoom",null,"geToolbarButton geAdaptiveAsset");x.setAttribute("title",
mxResources.get("zoom"));x.innerHTML="100%";x.style.cssText="display:inline-flex;align-items:center;position:relative;padding:4px;box-shadow:none;width:40px;justify-content:center;cursor:pointer;";"simple"==d?(x.style.borderStyle="solid",x.style.borderWidth="1px",x.style.borderRadius="4px",x.style.fontSize="11px",x.style.fontWeight="500",x.style.paddingTop="4px",x.style.paddingRight="14px",x.style.backgroundImage="url("+Editor.thinExpandImage+")",x.style.backgroundPosition="right 0px center",x.style.backgroundRepeat=
"no-repeat",x.style.backgroundSize="18px",x.style.opacity="0.7",x.style.height="12px"):(x.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",x.style.backgroundPosition="right 0px top 8px",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="13px",x.style.paddingRight="16px",x.style.marginRight="-4px");g.appendChild(x);if("simple"==d){var A=this.createMenu("pages",Editor.thinNoteImage);A.style.backgroundSize="24px";A.style.display="inline-block";A.style.width="24px";A.style.height=
"30px";A.style.opacity="0.7";g.appendChild(A);var E=this.createMenuItem("undo",Editor.thinUndoImage);E.style.marginLeft="auto";E.style.flexShrink="0";E.style.opacity="0.7";g.appendChild(E);E=this.createMenuItem("redo",Editor.thinRedoImage);E.style.marginLeft="0px";E.style.flexShrink="0";E.style.opacity="0.7";g.appendChild(E);E=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.style.display=480>H?"none":"";x.style.display=750>H?
"none":"inline-flex"});mxEvent.addListener(window,"resize",E);E()}mxUtils.bind(this,function(H){mxEvent.addListener(H,"click",mxUtils.bind(this,function(R){mxEvent.isAltDown(R)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(R)):mxEvent.isShiftDown(R)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(R))}));var V=mxUtils.bind(this,function(R,M,S){H.innerText="";mxUtils.write(H,Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%")});
this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,V);this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",V);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(R,M){V(R,M,M.getProperty("factor"))}))})(x);"simple"!=d&&g.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var K=this.createMenuItem("fullscreen",Editor.fullscreenImage);g.appendChild(K);E=mxUtils.bind(this,function(){K.style.backgroundImage="url("+
(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",mxUtils.bind(this,function(){K.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",E);g.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==d?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",
this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;display:flex;text-align:right;user-select:none;box-sizing:border-box;",this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt))}};EditorUi.prototype.createPickerMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchPickerMenuElt){var g=this.editor.graph;
this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";var n=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(n.style,"transition","transform .3s ease-out");var q=document.createElement("a");q.style.padding="0px";q.style.boxShadow="none";q.className="geMenuItem geAdaptiveAsset";q.style.display="simple"==d?"inline-block":"block";q.style.width="100%";q.style.height="14px";q.style.margin="4px 0 2px 0";q.style.backgroundImage="url("+Editor.expandMoreImage+
")";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.backgroundSize="22px";mxUtils.setOpacity(q,40);q.setAttribute("title",mxResources.get("collapseExpand"));var t=q.style.margin,x=this.createMenuItem("insertFreehand","simple"==d?Editor.thinGestureImage:Editor.freehandImage,!0);x.style.paddingLeft="simple"==d?"0px":"12px";x.style.backgroundSize="24px";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var A=this.createMenu("insert","simple"==d?
Editor.thinAddCircleImage:Editor.addBoxImage);A.style.backgroundSize="24px";A.style.display="simple"==d?"inline-block":"block";A.style.flexShrink="0";A.style.width="30px";A.style.height="30px";A.style.padding="simple"==d?"0px":"4px 4px 0px 4px";A.style.opacity="0.7";var E=this.createMenu("table",Editor.thinTableImage);E.style.backgroundSize="24px";E.style.padding="simple"==d?"0px":"4px 4px 0px 4px";E.style.display="inline-block";E.style.width="30px";E.style.height="30px";E.style.opacity="0.7";var K=
A.cloneNode(!0);K.style.backgroundImage="url("+("simple"==d?Editor.thinShapesImage:Editor.shapesImage)+")";K.style.backgroundSize="24px";K.setAttribute("title",mxResources.get("shapes"));mxEvent.addListener(K,"click",mxUtils.bind(this,function(S){if(this.isShapePickerVisible())this.hideShapePicker();else{var U=mxUtils.getOffset(K);Editor.inlineFullscreen||null==this.embedViewport?"simple"==d?(U.x-=this.diagramContainer.offsetLeft+30,U.y+=K.offsetHeight-19):(U.x+=K.offsetWidth+28,U.y+=20):(U.x=0,U.y=
K.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,U.x)),this.diagramContainer.scrollTop+U.y,null,null,null,null,mxUtils.bind(this,function(l){return g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(l,!0))}),"simple"==d,!1)}mxEvent.consume(S)}));A.style.backgroundSize="24px";"simple"==d?A.style.flexShrink="0":A.style.marginBottom="4px";var H=!1,V=mxUtils.bind(this,function(S){if(S||document.body.contains(n)){S=function(J,G,P,p,z,I){null!=G&&J.setAttribute("title",
G);J.style.cursor="pointer";J.style.margin="simple"==d?"0px":"8px 0px 8px 2px";J.style.display="simple"==d?"inline-block":"block";n.appendChild(J);"simple"==d?J.style.opacity="0.7":null!=p&&(G=z,G=null!=G?G:30,I=null!=I?I:26,J.style.position="relative",J.style.overflow="visible",P=document.createElement("div"),P.style.position="absolute",P.style.fontSize="8px",P.style.left=G+"px",P.style.top=I+"px",mxUtils.write(P,p),J.appendChild(P));return J};n.innerText="";if(!H){var U=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth;"simple"==d&&(this.sidebar.graph.cellRenderer.minSvgStrokeWidth=.9);var l="simple"==d?"0px":"4px 0px 6px 2px";if("simple"!=d||660<=U){var y=this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,"simple"!=d,null,38,38,"simple"==d?Editor.thinTextImage:null,!0);"simple"==d&&(y.className="geToolbarButton",y.style.opacity="0.7");S(y,mxResources.get("text")+
" (A)",null,"A",32).style.margin="simple"==d?"0 -8px 0 0":"0 0 0 -2px"}y=this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=d,null,28,28,"simple"==d?Editor.thinRectangleImage:null);"simple"==d?(600<=U&&(y.className="geToolbarButton",y.style.opacity="0.7",S(y,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=U&&this.sketchPickerMenuElt.appendChild(K),440<=U&&S(x,mxResources.get("freehand")+
" (X)",null,"X"),500<=U&&this.sketchPickerMenuElt.appendChild(E)):(S(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0,null,28,28),mxResources.get("note")+" (S)",null,"S").style.margin=l,S(y,mxResources.get("rectangle")+" (D)",
null,"D").style.margin=l,S(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0,null,28,28),mxResources.get("ellipse")+" (F)",null,"F").style.margin=l,l=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),l.geometry.setTerminalPoint(new mxPoint(0,0),!0),l.geometry.setTerminalPoint(new mxPoint(l.geometry.width,0),!1),l.geometry.points=[],l.geometry.relative=
!0,l.edge=!0,S(this.sidebar.createEdgeTemplateFromCells([l],l.geometry.width,l.geometry.height,mxResources.get("line")+" (C)",!0,null,"simple"!=d,!1,null,28,28),mxResources.get("line")+" (C)",null,"C").margin="1px 0px 1px 2px",l=l.clone(),l.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;",l.geometry.width=this.editor.graph.defaultEdgeLength+20,l.geometry.setTerminalPoint(new mxPoint(0,20),!0),l.geometry.setTerminalPoint(new mxPoint(l.geometry.width,
20),!1),S(this.sidebar.createEdgeTemplateFromCells([l],l.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1,null,28,28),mxResources.get("arrow")).style.margin="1px 0px 1px 2px",S(x,mxResources.get("freehand")+" (X)",null,"X"),this.sketchPickerMenuElt.appendChild(K));("simple"!=d||320<U)&&this.sketchPickerMenuElt.appendChild(A)}"simple"!=d&&"1"!=urlParams.embedInline&&n.appendChild(q);this.sidebar.graph.cellRenderer.minSvgStrokeWidth=this.sidebar.minThumbStrokeWidth}});mxEvent.addListener(q,
"click",mxUtils.bind(this,function(){H?(mxUtils.setPrefixedStyle(n.style,"transform","translate(0, -50%)"),n.style.padding="0px 4px 4px",n.style.width="48px",n.style.top="50%",n.style.bottom="",n.style.height="",q.style.backgroundImage="url("+Editor.expandMoreImage+")",q.style.width="100%",q.style.height="14px",q.style.margin=t,H=!1,V()):(n.innerText="",n.appendChild(q),mxUtils.setPrefixedStyle(n.style,"transform","translate(0, 0)"),n.style.width="auto",n.style.bottom="12px",n.style.padding="0px",
n.style.top="",q.style.backgroundImage="url("+Editor.expandLessImage+")",q.style.width="24px",q.style.height="24px",q.style.margin="0px",H=!0)}));var R=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,M=null;mxEvent.addListener(window,"resize",function(){var S=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;S!=R&&(R=S,null!=M&&window.clearTimeout(M),M=window.setTimeout(function(){M=null;V()},200))});this.editor.addListener("fileLoaded",
V);this.addListener("sketchModeChanged",V);this.addListener("currentThemeChanged",V);Editor.enableCssDarkMode||this.addListener("darkModeChanged",V);V(!0);"simple"==d?(this.sketchPickerMenuElt.style.cssText="position:relative;white-space:nowrap;user-select:none;display:flex;align-items:center;justify-content:flex-end;flex-grow:1;gap:6px;flex-shrink:0;",this.sketchMainMenuElt.appendChild(this.sketchPickerMenuElt)):(this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;z-index:1;width:48px;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;",
this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt));mxClient.IS_POINTER&&(this.sketchPickerMenuElt.style.touchAction="none")}};EditorUi.prototype.getNetworkStatus=function(){var d=null;if(this.isOffline(!0))d=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&
1<g.getRealtimeState()&&(d=g.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){if("simple"==d||"sketch"==d){if(null==this.sketchMenubarElt){this.sketchMenubarElt=document.createElement("div");this.sketchMenubarElt.className="geToolbarContainer";if("simple"==
d){this.sketchMenubarElt.style.cssText="position:relative;flex-grow:0.5;overflow:visible;"+("1"!=urlParams.embed?"flex-shrink:0;":"min-width:0;")+"display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;";null==this.commentElt&&(this.commentElt=this.createMenuItem("comments",Editor.thinCommentImage,!0),this.commentElt.style.paddingLeft="0px",this.commentElt.style.backgroundSize="24px",this.commentElt.style.width="26px",this.commentElt.style.height=
"30px",this.commentElt.style.opacity="0.7");if(null==this.shareElt&&"1"!=urlParams.embed&&"draw.io"==this.getServiceName())if(this.shareElt=this.createMenu("share",Editor.thinUserAddImage),this.shareElt.style.backgroundSize="24px",this.shareElt.style.display="inline-block",this.shareElt.style.flexShrink="0",this.shareElt.style.width="24px",this.shareElt.style.height="30px",this.shareElt.style.opacity="0.7",this.isStandaloneApp())this.shareElt.style.backgroundImage="url("+Editor.thinShareImage+")";
else{var g=mxUtils.bind(this,function(){var q=mxResources.get("share"),t=Editor.thinUserAddImage,x=this.getNetworkStatus();null!=x&&(q=q+" ("+x+")",t=Editor.thinUserFlashImage);this.shareElt.style.backgroundImage="url("+t+")";this.shareElt.setAttribute("title",q)});this.addListener("realtimeStateChanged",g);this.editor.addListener("statusChanged",g);mxEvent.addListener(window,"offline",g);mxEvent.addListener(window,"online",g);g()}null==this.mainMenuElt&&(this.mainMenuElt=this.createMenu("diagram",
Editor.thinMenuImage),this.mainMenuElt.style.backgroundSize="24px",this.mainMenuElt.style.display="inline-block",this.mainMenuElt.style.flexShrink="0",this.mainMenuElt.style.width="24px",this.mainMenuElt.style.height="30px",this.mainMenuElt.style.opacity="0.7");if(null==this.formatElt){this.formatElt=this.createMenuItem("format",Editor.thinDesignImage,!0);this.formatElt.style.backgroundSize="24px";this.formatElt.style.marginLeft="1"!=urlParams.embed?"auto":"0";this.formatElt.style.flexShrink="0";
this.formatElt.style.width="20px";this.formatElt.style.opacity="0.7";var n=this.formatElt.className+" geToggleItem";this.formatElt.className=n+(0==this.formatWidth?"":" geActiveItem");this.addListener("formatWidthChanged",function(){this.formatElt.className=n+(0==this.formatWidth?"":" geActiveItem")})}}else this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;overflow:hidden;user-select:none;max-width:calc(100% - 170px);box-sizing:border-box;justify-content:flex-end;z-index:1;padding:7px 12px;display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;",
this.sketchWrapperElt.appendChild(this.sketchMenubarElt);"1"!=urlParams.embedInline&&(g=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var q=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=q?"70px":"10px";this.sketchMenubarElt.style.maxWidth=q?"calc(100% - 230px)":"calc(100% - 170px)"}else"simple"==Editor.currentTheme&&(q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,null!=this.commentElt&&
(this.commentElt.style.display=560<q&&this.commentsSupported()?"":"none"),null!=this.shareElt&&(this.shareElt.style.display=360<q?"":"none"))}),g(),mxEvent.addListener(window,"resize",g),this.editor.addListener("fileLoaded",g));"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)}"simple"==d&&(null!=this.buttonContainer&&(this.buttonContainer.style.padding="0px",this.sketchMenubarElt.appendChild(this.buttonContainer),null!=this.formatElt&&"1"==
urlParams.embed&&(this.formatElt.style.marginLeft="")),null!=this.commentElt&&this.sketchMenubarElt.appendChild(this.commentElt),null!=this.shareElt&&this.sketchMenubarElt.appendChild(this.shareElt),this.sketchMenubarElt.appendChild(this.mainMenuElt),this.sketchMenubarElt.appendChild(this.formatElt));null!=this.statusContainer&&(this.statusContainer.style.flexGrow="1",this.statusContainer.style.flexShrink="1",this.statusContainer.style.marginTop="0px","simple"!=d?this.sketchMenubarElt.appendChild(this.statusContainer):
(this.statusContainer.style.justifyContent="center",this.statusContainer.style.width="22%"));"simple"!=d&&null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement));g=this.menubar.langIcon;null!=g&&(g.style.position="",g.style.height="21px",g.style.width="21px",g.style.flexShrink="0",g.style.opacity="0.7",this.sketchMenubarElt.appendChild(g));"simple"==d?(this.sketchMainMenuElt.appendChild(this.statusContainer),
this.sketchMainMenuElt.appendChild(this.sketchMenubarElt)):null!=this.buttonContainer&&(this.buttonContainer.style.padding="0px",this.sketchMenubarElt.appendChild(this.buttonContainer))}else null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer)),
null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),g=this.menubar.langIcon,null!=g&&(g.style.position="absolute",g.style.height="18px",g.style.width="18px",g.style.flexShrink="",g.style.opacity="",this.menubarContainer.parentNode.insertBefore(g,this.menubarContainer)),null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,g,
n,q){n=null!=n?n:"geToolbarButton";var t=this.menus.get(d);q=this.menubar.addMenu(mxResources.get(d),t.funct,null,q);q.className=n;q.style.display="inline-block";q.style.cursor="pointer";q.style.height="24px";q.setAttribute("title",mxResources.get(d));this.menus.menuCreated(t,q,n);null!=g&&(q.style.backgroundImage="url("+g+")",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",q.style.backgroundSize="100% 100%",q.style.width="24px",q.innerText="");return q};EditorUi.prototype.createToolbarButton=
function(d,g,n,q){q=null!=q?q:24;var t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset";t.setAttribute("title",g);t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="100% 100%";t.style.display="inline-block";t.style.cursor="pointer";t.style.marginLeft="6px";t.style.width=q+"px";t.style.height=q+"px";null!=n&&(mxEvent.addListener(t,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
function(x){x.preventDefault()})),mxEvent.addListener(t,"click",function(x){"disabled"!=t.getAttribute("disabled")&&n(x);mxEvent.consume(x)}));return t};EditorUi.prototype.createMenuItem=function(d,g,n){var q=this.actions.get(d),t=null!=q?q.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=q&&null!=q.shortcut?" ("+q.shortcut+")":""),t);null==q||n||(d=function(){q.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor=
"default");x.style.opacity=q.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),q.addListener("stateChanged",d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,
function(t){t.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var n=this.formatWindow.window.toggleMinimized,q=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+q-140+"px"):(this.div.style.width=q+"px",this.table.style.width=
this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-q+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(t){mxEvent.getSource(t)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(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 v=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):v.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=134);var n=this.hsplitPosition,q=mxUtils.bind(this,
function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=n-this.hsplitPosition}),t=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&q();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&&q()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var D=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=
this.formatWindow;return null!=d?d.window.isVisible():D.apply(this,arguments)};var C=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 n=this.getDiagramContainerOffset();var q=n.x;var t=n.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+q+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+"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=
n.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else C.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(q){q=this.createMenu(q,null,"geTitle");q.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;";d.appendChild(q);return q});if(Editor.enableCustomLibraries&&
("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.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;",g.className="geTitle",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
g=g.cloneNode(!1),g.style.left="50%",g.style.borderLeftStyle="solid",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var n=g("newLibrary");n.style.fontSize="11px";n.style.left="0";n=g("openLibraryFrom");n.style.borderLeftStyle="solid";n.style.fontSize="11px";n.style.left="50%"}d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=
Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),n&&"1"!=urlParams.embedInline?66:10,n&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(q){this.createShapesPanel(q)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),
0)};Editor.createMinimalCss=function(){return(Editor.isDarkMode()?"html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html > body.geEditor > div > a.geItem { background-color: "+
g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,g=mxUtils.getOffset(this.diagramContainer),n=this.diagramContainer.scrollLeft-g.x;g=this.diagramContainer.scrollTop-g.y;null!=this.embedViewport&&(Editor.inlineFullscreen?(n-=this.embedViewport.x,
g-=this.embedViewport.y):(n+=this.embedViewport.x,g+=this.embedViewport.y));return{x:n,y:g,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,n=this.editor.graph.view.translate,q=mxUtils.getOffset(this.diagramContainer);this.diagramContainer.scrollLeft=d.x+q.x+(n.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+q.y+(n.y-d.ty)*g};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",
JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,n=this.sketchPickerMenuElt,q=this.editor.graph;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",n.style.left="10px",n.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==
this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");
if(null!=t){this.diagramContainer.removeAttribute("data-bounds");q.getGraphBounds();var x=t.split(" ");q=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];this.diagramContainer.style.left=x[1];t=parseInt(x[2]);x=parseInt(x[3]);t=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,t):t,q.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,q.height-80);this.diagramContainer.style.width=t+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom=
"";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";n.style.display="";n.style.left=this.diagramContainer.offsetLeft-n.offsetWidth-4+"px";n.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-
d.offsetWidth+"px";d.style.top=g.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+
(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);
d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var g=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=g}"simple"==Editor.currentTheme?(d.defaultEdgeStyle.edgeStyle=
"none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var n=
d.indexOf(",");0<n&&(g=this.getPageById(d.substring(n+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=mxResources.get("action"));return g};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var g=d.indexOf(",");if(d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=
mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=g.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,n){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,
mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(q,t){try{this.spinner.stop();var x=this.createImageDataUri(q,g,"png"),A=parseInt(t.getAttribute("width")),E=parseInt(t.getAttribute("height"));this.writeImageToClipboard(x,A,E,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=n?n:4,null==this.editor.graph.background||this.editor.graph.background==
mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(d,g,n,q){var t=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+n+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](q)};EditorUi.prototype.copyCells=function(d,g){var n=this.editor.graph;if(n.isSelectionEmpty())d.innerText=
"";else{var q=mxUtils.sortCells(n.model.getTopmostCells(n.getSelectionCells())),t=mxUtils.getXml(n.encodeCells(q));mxUtils.setTextContent(d,encodeURIComponent(t));g?(n.removeCells(q,!1),n.lastPasteXml=null):(n.lastPasteXml=t,n.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),
g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,n,q,t){t=null!=t?t:!0;var x=this.editor.graph,A=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var E=x.pasteCounter*x.gridSize;if(n||this.isCompatibleString(d))A=this.importXml(d,E,E),x.setSelectionCells(A);else if(g&&1==x.getSelectionCount()){t=x.getStartEditingCell(x.getSelectionCell(),q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(t)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",
trees:"plugins/trees/trees.js","import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnDomain=function(){return"test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnDomain()};
new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(l,y){null!=y&&mxEvent.isShiftDown(y)?(mxLog.show(),null!=window.console&&console.log(c,window)):c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.drawio.com/")}));
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...",function(){var l=new FeedbackDialog(c);c.showDialog(l.container,610,360,!0,!1);l.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});B=c.actions.addAction("tags",mxUtils.bind(this,function(){null==
this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");B.setToggleAction(!0);
B.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));B=c.actions.addAction("findReplace",mxUtils.bind(this,function(l,y){var J=(l=k.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=J+"Window";if(null==this[y]){var G="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,P=l?G?330:300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(P+20),100,P,l?G?304:288:170,l);this[y].window.addListener("show",
function(){c.fireEvent(new mxEventObject(J))});this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(J))});this[y].window.setVisible(!0)}else this[y].window.setVisible(!this[y].window.isVisible())}),null,null,Editor.ctrlKey+"+F");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){var l=k.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[l]&&this[l].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",
function(){var l=null==c.pages||1>=c.pages.length;if(l)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var J=document.createElement("h3");mxUtils.write(J,mxResources.get("formatVsdx"));J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(J);var G=c.addCheckbox(y,mxResources.get("allPages"),!l,l);G.style.marginBottom="16px";l=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!G.checked)}),null,mxResources.get("export"));
c.showDialog(l.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginRight="8px";l.checked=mxSettings.getShowStartScreen();l.defaultChecked=l.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";
y.style.alignItems="center";y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(l);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(G){mxEvent.getSource(G)!=l&&(l.checked=!l.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}})}]];
if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var J=c.actions.get("plugins");null==J||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),J.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(G,P){if(0<P.value.length)try{var p=JSON.parse(P.value),z=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(p)),I=new EmbedDialog(c,z);c.showDialog(I.container,
450,240,!0);I.init()}catch(Q){c.handleError(Q)}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(G){c.handleError(G)}})}]])}]);
c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,l.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=l.parentNode&&(mxSettings.setShowStartScreen(l.checked),mxSettings.save())})});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(l,y){var J=mxUtils.bind(this,function(P){var p=""==P?mxResources.get("automatic"):mxLanguageMap[P],z=null;""!=p&&(z=l.addItem(p,null,mxUtils.bind(this,
function(){c.setAndPersistLanguage(P);c.alert(mxResources.get("restartForChangeRequired"))}),y),(P==mxLanguage||""==P&&null==mxLanguage)&&l.addCheckmark(z,Editor.checkmarkImage));return z});J("");l.addSeparator(y);for(var G in mxLanguageMap)J(G)})));var F=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(l){var y=F.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var J=this.get("dynamicAppearance");
if(null!=J){var G=y.addMenu("",J.funct);G.setAttribute("title",mxResources.get("appearance"));G.className="geToolbarButton geAdaptiveAsset";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="100% 100%";G.style.display="inline-block";G.style.cursor="pointer";G.style.zIndex="1";G.style.position="absolute";G.style.height="18px";G.style.width="18px";"atlas"==Editor.currentTheme?(G.style.filter="invert(100%)",G.style.right="11px",G.style.top="10px"):
(G.style.right="10px",G.style.top="5px");document.body.appendChild(G);y.langIcon=G;J=mxUtils.bind(this,function(){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;G.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";G.style.backgroundImage="simple"==Editor.currentTheme?750>P?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()||Editor.cssDarkMode?Editor.thinDarkImage:Editor.thinLightImage)+
")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",J);this.editorUi.addListener("darkModeChanged",J);mxEvent.addListener(window,"resize",J);J()}}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))});Editor.enableCssDarkMode&&c.actions.put("convertDarkModeColors",new Action("Dark Mode Colors...",function(l){null==c.darkModeColorsWindow&&(c.darkModeColorsWindow=new DarkModeColorsWindow(c,document.body.offsetWidth-520,80,200,100));c.darkModeColorsWindow.window.setVisible(!0)}));B=this.get("viewZoom");var d=B.funct;B.funct=mxUtils.bind(this,function(l,y){d.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","outline","fullscreen"],
y)});B=this.get("layout");var g=B.funct;B.funct=function(l,y){g.apply(this,arguments);l.addItem(mxResources.get("orgChart"),null,function(){var J=null,G=20,P=20,p=function(){"undefined"!==typeof mxOrgChartLayout&&null!=J&&c.tryAndHandle(mxUtils.bind(this,function(){var X=c.editor.graph,Z=new mxOrgChartLayout(X,J,G,P),Y=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(Y=X.getSelectionCell());Z.execute(Y)}))},z=document.createElement("div"),I=document.createElement("div");I.style.marginTop=
"6px";I.style.display="inline-block";I.style.width="140px";mxUtils.write(I,mxResources.get("orgChartType")+": ");z.appendChild(I);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";I=[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 N=0;N<I.length;N++){var T=document.createElement("option");
mxUtils.write(T,I[N]);T.value=N;2==N&&T.setAttribute("selected","selected");Q.appendChild(T)}mxEvent.addListener(Q,"change",function(){J=Q.value});z.appendChild(Q);I=document.createElement("div");I.style.marginTop="6px";I.style.display="inline-block";I.style.width="140px";mxUtils.write(I,mxResources.get("parentChildSpacing")+": ");z.appendChild(I);var O=document.createElement("input");O.type="number";O.value=G;O.style.width="200px";O.style.boxSizing="border-box";z.appendChild(O);mxEvent.addListener(O,
"change",function(){G=O.value});I=document.createElement("div");I.style.marginTop="6px";I.style.display="inline-block";I.style.width="140px";mxUtils.write(I,mxResources.get("siblingSpacing")+": ");z.appendChild(I);var W=document.createElement("input");W.type="number";W.value=P;W.style.width="200px";W.style.boxSizing="border-box";z.appendChild(W);mxEvent.addListener(W,"change",function(){P=W.value});I=mxUtils.button(mxResources.get("custom")+"...",function(){var X=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(Q.value),
parentChildSpacing:parseInt(O.value),siblingSpacing:parseInt(W.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(X,null,2))});I.className="geBtn";z=new CustomDialog(c,z,function(){null==J&&(J=2);c.loadOrgChartLayouts(p)},null,null,null,I);c.showDialog(z.container,355,140,!0,!0)},y,null,m());l.addSeparator(y);l.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var J=new mxParallelEdgeLayout(k);J.checkOverlap=!0;c.prompt(mxResources.get("spacing"),
J.spacing,mxUtils.bind(this,function(G){c.tryAndHandle(mxUtils.bind(this,function(){J.spacing=G;c.executeLayout(function(){J.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},!1)}))}))}))}),y);l.addSeparator(y);c.menus.addMenuItem(l,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(l,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(l,["about"],y);else{var J=l.addItem("Search:",null,null,y,null,null,
!1);J.style.cursor="default";var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("size","25");G.style.borderWidth="1px";G.style.marginLeft="8px";mxEvent.addListener(G,"keydown",mxUtils.bind(this,function(P){var p=mxUtils.trim(G.value);13==P.keyCode&&0<p.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(p)),G.value="",EditorUi.logEvent({category:"SEARCH-HELP",
action:"search",label:p}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==P.keyCode&&(G.value="")}));J.firstChild.nextSibling.appendChild(G);mxEvent.addGestureListeners(G,function(P){document.activeElement!=G&&G.focus();mxEvent.consume(P)},function(P){mxEvent.consume(P)},function(P){mxEvent.consume(P)});window.setTimeout(function(){G.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",
function(){c.checkForUpdates()}),this.addMenuItems(l,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(l,["check4Updates"],y),this.addMenuItems(l,["openDevTools","-","about"],y)):this.addMenuItems(l,"- keyboardShortcuts quickStart support - about".split(" "),y)}"1"==urlParams.test&&(l.addSeparator(y),this.addSubmenu("testDevelop",l,y))})));c.actions.addAction("languageCode...",function(){var l=new FilenameDialog(c,Graph.diagramLanguage||
"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,k.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(l.container,340,96,!0,!0);l.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,["languageCode","-"],y);y=l.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;k.refresh()},y);Graph.translateDiagram||
l.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");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(!k.isSelectionEmpty()){var l=k.cloneCells(k.getSelectionCells()),y=k.getBoundingBoxFromGeometry(l);l=k.moveCells(l,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(l)))+
"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function l(z){return null==z||null==z.boundingBox||!isNaN(z.boundingBox.x)&&!isNaN(z.boundingBox.y)&&!isNaN(z.boundingBox.width)&&!isNaN(z.boundingBox.height)}var y=k.getGraphBounds(),J=k.view.translate,G=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",y.x/G-J.x,y.y/G-J.y,y.width/G,y.height/G,"fillColor=none;strokeColor=red;");var P=0,p=0;k.view.states.visit(function(z,I){z=!0;l(I.shape)||(console.log("invalid shape",
I.cell.id,I.shape),z=!1);l(I.text)||(console.log("invalid text",I.cell.id,I.text),z=!1);z||P++;p++});console.log("states checked",p,"invalid",P)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var l=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";l=new TextareaDialog(c,"Paste Data:",l,function(y){if(0<y.length)try{var J=function(I){function Q(aa){if(null==fa[aa]){if(fa[aa]=!0,null!=O[aa]){for(;0<O[aa].length;){var da=O[aa].pop();
Q(da)}delete O[aa]}}else mxLog.debug(N+": Visited: "+aa)}var N=I.parentNode.id,T=I.childNodes;I={};for(var O={},W=null,X={},Z=0;Z<T.length;Z++){var Y=T[Z];if(null!=Y.id&&0<Y.id.length)if(null==I[Y.id]){I[Y.id]=Y.id;var ba=Y.getAttribute("parent");null==ba?null!=W?mxLog.debug(N+": Multiple roots: "+Y.id):W=Y.id:(null==O[ba]&&(O[ba]=[]),O[ba].push(Y.id))}else X[Y.id]=Y.id}T=Object.keys(X);0<T.length?(T=N+": "+T.length+" Duplicates: "+T.join(", "),mxLog.debug(T+" (see console)")):mxLog.debug(N+": Checked");
var fa={};null==W?mxLog.debug(N+": No root"):(Q(W),Object.keys(fa).length!=Object.keys(I).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",O)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var G=mxUtils.parseXml(y),P=c.getPagesForNode(G.documentElement,"mxGraphModel");if(null!=P&&0<P.length)try{var p=c.getHashValueForPages(P);mxLog.debug("Checksum: ",p)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");
var z=G.getElementsByTagName("root");for(y=0;y<z.length;y++)J(z[y]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});c.showDialog(l.container,620,460,!0,!0);l.init()}));var n=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var l=new TextareaDialog(c,"Diff/Sync:","",function(y){var J=c.getCurrentFile();if(0<y.length&&null!=J)try{var G=JSON.parse(y);J.patch([G],null,!0,!0);c.hideDialog()}catch(P){c.handleError(P)}},null,"Close",null,
null,null,!0,null,"Patch",null,[["Snapshot",function(y,J){n=c.getPagesForXml(c.getFileData(!0));l.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(n)}],["Diff",function(y,J){try{l.textarea.value=JSON.stringify(c.diffPages(n,c.pages),null,2)}catch(G){c.handleError(G)}}]]);null==n?(n=c.getPagesForXml(c.getFileData(!0)),l.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(n)):l.textarea.value=JSON.stringify(c.diffPages(n,
c.pages),null,2);c.showDialog(l.container,620,460,!0,!0);l.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var l=c.getCurrentFile();null!=c.pages&&null!=l?c.spinner.spin(document.body,mxResources.get("loading"))&&l.getLatestVersion(function(y){c.spinner.stop();var J=c.getHashValueForPages(c.pages),G=l.getCurrentRevisionId(),P=c.getHashValueForPages(y.getShadowPages()),p=y.getDescriptorChecksum(y.getDescriptor()),z=y.getCurrentRevisionId();console.log("Local File",
[l],"modified",l.isModified(),"checksum",J);console.log("Remote File",[y],"rev",z==G,"desc",p==P,"checksum",P);c.alert("Checksums "+(P==J?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var l=c.getCurrentFile();console.log("editorUi",c,"file",l);if(null!=l&&l.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(l.ownPages));
console.log("Checksum theirPages",c.getHashValueForPages(l.theirPages));console.log("diff ownPages/theirPages",c.diffPages(l.ownPages,l.theirPages));var y=l.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,l.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(l.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(l.theirPages,y)));null!=l.sync&&null!=l.sync.snapshot&&(console.log("Checksum snapshot",
c.getHashValueForPages(l.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(l.ownPages,l.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(l.theirPages,l.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(l.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(l.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(l.theirPages,c.pages)))}null!=l&&console.log("Shadow pages",[c.getXmlForPages(l.getShadowPages())]);
null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var l=c.getCurrentFile();null!=l&&l.isRealtime()&&null!=l.shadowPages&&(console.log("patching actualPages to shadowPages",l.patch([c.diffPages(l.shadowPages,c.pages)])),l.ownPages=c.clonePages(c.pages),l.theirPages=c.clonePages(c.pages),l.shadowPages=c.clonePages(c.pages),null!=l.sync&&(l.sync.snapshot=c.clonePages(c.pages)))}));
c.actions.addAction("testOptimize",mxUtils.bind(this,function(){k.model.beginUpdate();try{var l=k.model.cells,y=0,J=[],G=[],P;for(P in l){var p=l[P],z=k.getCurrentCellStyle(p)[mxConstants.STYLE_IMAGE];null!=z&&"data:"==z.substring(0,5)&&(null==J[z]&&(J[z]=(J[z]||0)+1,y++),G.push(p))}k.setCellStyles(mxConstants.STYLE_IMAGE,null,G);console.log("Removed",y,"image(s) from",G.length,"cell(s): ",[G,J])}finally{k.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,
k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var l=new mxImageExport,y=k.getGraphBounds(),J=k.view.scale,G=mxUtils.createXmlDocument(),P=G.createElement("output");G.appendChild(P);G=new mxXmlCanvas2D(P);G.translate(Math.floor((1-y.x)/J),Math.floor((1-y.y)/J));G.scale(1/J);var p=0,z=G.save;G.save=function(){p++;z.apply(this,arguments)};var I=G.restore;G.restore=function(){p--;I.apply(this,arguments)};var Q=l.drawShape;l.drawShape=function(N){mxLog.debug("entering shape",
N,p);Q.apply(this,arguments);mxLog.debug("leaving shape",N,p)};l.drawState(k.getView().getState(k.model.root),G);mxLog.show();mxLog.debug(mxUtils.getXml(P));mxLog.debug("stateCounter",p)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var q=null,t=null,x=null,A=null,E=null,K=null,H=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=q?(k.view.revalidate=q,
q=null):(q=k.view.revalidate,k.view.revalidate=function(){var l=Date.now(),y=q.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=t?(c.selectPage=t,t=null):(t=c.selectPage,c.selectPage=function(){var l=Date.now(),y=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=x?(c.diffPages=x,x=null):(x=c.diffPages,c.diffPages=
function(){var l=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=A?(c.patchPages=A,A=null):(A=c.patchPages,c.patchPages=function(){var l=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=E?(c.clonePages=E,E=null):(E=c.clonePages,c.clonePages=function(){var l=Date.now(),y=E.apply(this,arguments);
EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=K?(c.getHashValueForPages=K,K=null):(K=c.getHashValueForPages,c.getHashValueForPages=function(){var l=Date.now(),y=K.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=H?(c.resolveCrossReferences=H,H=null):(H=c.resolveCrossReferences,c.resolveCrossReferences=function(){var l=Date.now(),
y=H.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-l+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=q?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var J=l.addItem(mxResources.get("testPerformance"),
null,function(){c.actions.get("testPerformance").funct()},y);null!=q&&l.addCheckmark(J,Editor.checkmarkImage);this.addMenuItems(l,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(l){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(l){k.isEnabled()&&(l=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),l.vertex=!0,l=new EditShapeDialog(c,l,mxResources.get("editShape")+":",630,400),c.showDialog(l.container,640,480,!0,!1),l.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),
"https://www.drawio.com/doc/faq/embed-html-options",l,function(y,J,G,P,p,z,I,Q,N,T,O){c.createHtml(y,J,G,P,p,z,I,Q,N,T,O,mxUtils.bind(this,function(W,X){var Z=new EmbedDialog(c,W+"\n"+X,null,null,function(){var Y=window.open(),ba=Y.document;if(null!=ba){"CSS1Compat"===document.compatMode&&ba.writeln("<!DOCTYPE html>");ba.writeln("<html>");ba.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');ba.writeln("<body>");ba.writeln(W);var fa=mxClient.IS_IE||
mxClient.IS_EDGE||null!=document.documentMode;fa&&ba.writeln(X);ba.writeln("</body>");ba.writeln("</html>");ba.close();if(!fa){var aa=Y.document.createElement("div");aa.marginLeft="26px";aa.marginTop="26px";mxUtils.write(aa,mxResources.get("updatingDocument"));fa=Y.document.createElement("img");fa.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");fa.style.marginLeft="6px";aa.appendChild(fa);Y.document.body.insertBefore(aa,Y.document.body.firstChild);
window.setTimeout(function(){var da=document.createElement("script");da.type="text/javascript";da.src=/<script.*?src="(.*?)"/.exec(X)[1];ba.body.appendChild(da);aa.parentNode.removeChild(aa)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(Z.container,450,240,!0,!0);Z.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var l=c.getCurrentFile();null!=l&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
function(y){c.spinner.stop();null!=y?(y=new EmbedDialog(c,'<img src="'+(l.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+l.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(l,y,J,G,P,p){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(l,y,J,G,P,p,function(z){c.spinner.stop();
z=new EmbedDialog(c,z);c.showDialog(z.container,450,240,!0,!0);z.init()},function(z){c.spinner.stop();c.handleError(z)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(l,y,J,G,P,p){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(l,y,J,G,P,p,function(z){c.spinner.stop();z=new EmbedDialog(c,z);c.showDialog(z.container,450,240,!0,!0);
z.init()},function(z){c.spinner.stop();c.handleError(z)})},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(){var l=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(l.height/k.view.scale)+2,function(y,J,G,P,p,z,I,Q,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(T){c.spinner.stop();
var O=[];N&&O.push("tags=%7B%7D");T=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+Q+';" src="'+c.createLink(y,J,G,P,p,z,T,null,O)+'"></iframe>');c.showDialog(T.container,450,240,!0,!0);T.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.textAlign="center";l.style.width="100%";l.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"));l.appendChild(y);mxEvent.addListener(y,"click",function(J){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(J)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(J,G,P,p,z,I,Q,N,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
function(O){c.spinner.stop();var W=["border=0"];T&&W.push("tags=%7B%7D");O=new EmbedDialog(c,c.createLink(J,G,P,p,z,I,O,null,W,!0));c.showDialog(O.container,450,240,!0,!0);O.init()})},!0,"https://www.drawio.com/blog/drawio-notion",l)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(l,y,J,G,P,p,z,I,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(N){c.spinner.stop();
var T=[];Q&&T.push("tags=%7B%7D");N=new EmbedDialog(c,c.createLink(l,y,J,G,P,p,N,null,T));c.showDialog(N.container,450,240,!0,!0);N.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.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();l=new GoogleSitesDialog(c,l);c.showDialog(l.container,420,256,!0,!0);l.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)B=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),B.setToggleAction(!0),B.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",
function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});B=c.actions.addAction("search",function(){var l=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!l);isLocalStorage&&(mxSettings.settings.search=!l,mxSettings.save())});B.label=mxResources.get("searchShapes");B.setToggleAction(!0);B.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(l){k.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&
c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("save").funct=function(l){k.isEditing()&&k.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 J=c.createLoadMessage("save");J.xml=y;l&&(J.exit=!0);y=JSON.stringify(J)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));l=c.getCurrentFile();
null==l||l.constructor==EmbedFile||l.constructor==LocalFile&&null==l.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var l=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,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(l,y){c.isExportToCanvas()?(this.addMenuItems(l,["exportPng"],y),c.jpgSupported&&this.addMenuItems(l,["exportJpg"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,
["exportPng","exportJpg"],y);this.addMenuItems(l,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(l,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(l,["exportVsdx"],y);this.addMenuItems(l,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(l.addSeparator(y),this.addMenuItem(l,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+
"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(l,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(l.addSeparator(y),c.menus.addSubmenu("embed",l,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(l,y){function J(p){p.pickFile(function(z){c.spinner.spin(document.body,mxResources.get("loading"))&&p.getFile(z,function(I){var Q=
"data:image/"==I.getData().substring(0,11)?P(I.getTitle()):"text/xml";/\.svg$/i.test(I.getTitle())&&!c.editor.isDataSvg(I.getData())&&(I.setData(Editor.createSvgDataUri(I.getData())),Q="image/svg+xml");G(I.getData(),Q,I.getTitle())},function(I){c.handleError(I,null!=I?mxResources.get("errorLoadingFile"):null)},p==c.drive)},!0)}var G=mxUtils.bind(this,function(p,z,I){var Q=k.view,N=k.getGraphBounds(),T=k.snap(Math.ceil(Math.max(0,N.x/Q.scale-Q.translate.x)+4*k.gridSize)),O=k.snap(Math.ceil(Math.max(0,
(N.y+N.height)/Q.scale-Q.translate.y)+4*k.gridSize));"data:image/"==p.substring(0,11)?c.loadImage(p,mxUtils.bind(this,function(W){var X=!0,Z=mxUtils.bind(this,function(){c.resizeImage(W,p,mxUtils.bind(this,function(Y,ba,fa){Y=X?Math.min(1,Math.min(c.maxImageSize/ba,c.maxImageSize/fa)):1;c.importFile(p,z,T,O,Math.round(ba*Y),Math.round(fa*Y),I,function(aa){c.spinner.stop();k.setSelectionCells(aa);k.scrollCellToVisible(k.getSelectionCell())})}),X)});p.length>c.resampleThreshold?c.confirmImageResize(function(Y){X=
Y;Z()}):Z()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(p,z,T,O,0,0,I,function(W){c.spinner.stop();k.setSelectionCells(W);k.scrollCellToVisible(k.getSelectionCell())})}),P=mxUtils.bind(this,function(p){var z="text/xml";/\.png$/i.test(p)?z="image/png":/\.jpe?g$/i.test(p)?z="image/jpg":/\.gif$/i.test(p)?z="image/gif":/\.pdf$/i.test(p)&&(z="application/pdf");return z});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){J(c.drive)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){J(c.oneDrive)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?
l.addItem(mxResources.get("dropbox")+"...",null,function(){J(c.dropbox)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){J(c.gitHub)},y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){J(c.gitLab)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){J(c.trello)},
y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(l.addSeparator(y),l.addItem(mxResources.get("url")+"...",null,function(){var p=new FilenameDialog(c,
"",mxResources.get("import"),function(z){if(null!=z&&0<z.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var I=/(\.png)($|\?)/i.test(z)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(z),function(Q){G(Q,I,z)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==I)}},mxResources.get("url"));c.showDialog(p.container,300,80,!0,!0);p.init()},y))}))).isEnabled=m;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,
function(l,y){var J=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>J&&this.addSubmenu("viewZoom",l,y,mxResources.get("zoom")),460>J&&c.isPageMenuVisible()&&this.addSubmenu("pages",l,y),320>J&&this.addSubmenu("insert",l,y),360>J&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",l,y));this.addMenuItems(l,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(J=c.menus.addMenuItem(l,"autoMode",
y),null!=J&&J.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&this.addMenuItems(l,["-","toggleSimpleMode"],y)})));this.put("appearance",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(l=c.menus.addMenuItem(l,"autoMode",y),null!=l&&l.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||
Editor.isDarkMode()?"dark":"light")+")"))})));c.actions.addAction("addToScratchpad",function(l){k.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(l)});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(l,y){var J="1"==urlParams.sketch?"sketch":mxSettings.getUi(),G=l.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},
y);"kennedy"!=J&&"atlas"!=J&&"dark"!=J&&"simple"!=J&&"sketch"!=J&&"min"!=J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},y);"kennedy"!=J&&"dark"!=J||l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("simple"),null,function(){c.setCurrentTheme("simple")},y);"simple"==J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},
y);"sketch"==J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},y);"min"==J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},y);"atlas"==J&&l.addCheckmark(G,Editor.checkmarkImage)})));B=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var l=this.editorUi.getCurrentFile();if(null!=l)if(l.constructor==LocalFile&&null!=l.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,
function(J,G){l.invalidFileHandle=null;l.fileHandle=J;l.title=G.name;l.desc=G;c.save(G.name)}),null,c.createFileSystemOptions(l.getTitle()));else{var y=null!=l.getTitle()?l.getTitle():this.editorUi.defaultFilename;y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,function(J){null!=J&&0<J.length&&null!=l&&J!=l.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&l.rename(J,mxUtils.bind(this,function(G){this.editorUi.spinner.stop()}),mxUtils.bind(this,
function(G){this.editorUi.handleError(G,null!=G?mxResources.get("errorRenamingFile"):null)}))}),l.constructor==DriveFile||l.constructor==StorageFile?mxResources.get("diagramName"):null,function(J){if(null!=J&&0<J.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,340,96,!0,!0);y.init()}}));B.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};
B.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var l=c.getCurrentFile();if(null!=l){var y=c.getCopyFilename(l);l.constructor==DriveFile?(y=new CreateDialog(c,y,mxUtils.bind(this,function(J,G){"_blank"==G?c.editor.editAsNew(c.getFileData(),J):("download"==G&&(G=App.MODE_GOOGLE),null!=J&&0<J.length&&(G==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&l.saveAs(J,mxUtils.bind(this,function(P){l.desc=P;l.save(!1,mxUtils.bind(this,
function(){c.spinner.stop();l.setModified(!1);l.addAllSavedStatus()}),mxUtils.bind(this,function(p){c.handleError(p)}))}),mxUtils.bind(this,function(P){c.handleError(P)})):c.createFile(J,c.getFileData(!0),null,G)))}),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(l,y){l=c.getCurrentFile();null!=l&&c.openLink(l.getFolderUrl())}));c.actions.addAction("openFile...",mxUtils.bind(this,function(){var l=c.getCurrentFile();null!=l&&c.openLink(l.getFileUrl())}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var l=c.getCurrentFile();if(l.getMode()==App.MODE_GOOGLE||l.getMode()==App.MODE_ONEDRIVE){var y=!1;if(l.getMode()==App.MODE_GOOGLE&&null!=l.desc.parents)for(var J=
0;J<l.desc.parents.length;J++)if(l.desc.parents[J].isRoot){y=!0;break}c.pickFolder(l.getMode(),mxUtils.bind(this,function(G){c.spinner.spin(document.body,mxResources.get("moving"))&&l.move(G,mxUtils.bind(this,function(P){c.spinner.stop()}),mxUtils.bind(this,function(P){c.handleError(P)}))}),null,!0,y)}}));this.put("publish",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,["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 l=c.getCurrentFile();null!=l&&l.share()}catch(y){c.handleError(y)}}));this.put("embed",new Menu(mxUtils.bind(this,function(l,y){var J=c.getCurrentFile();null==J||J.getMode()!=App.MODE_GOOGLE&&J.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(J.getTitle())||this.addMenuItems(l,["liveImage","-"],y);this.addMenuItems(l,["embedImage","embedSvg","-","embedHtml"],y);navigator.standalone||c.isOffline()||this.addMenuItems(l,["embedIframe"],
y);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(l,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),y)})));c.addInsertItem=function(l,y,J,G){("plantUml"!=G||EditorUi.enablePlantUml&&!c.isOffline())&&l.addItem(J,null,mxUtils.bind(this,function(){if("fromText"==G||"formatSql"==G||"plantUml"==G||"mermaid"==G){var P=new ParseDialog(c,J,G);c.showDialog(P.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else P=new CreateGraphDialog(c,J,G),c.showDialog(P.container,
620,420,!0,!1);P.init()}),y,null,m())};var V=function(l){k.getModel().beginUpdate();try{l=k.addCell(l),k.fireEvent(new mxEventObject("cellsInserted","cells",[l])),k.model.isVertex(l)&&k.isAutoSizeCell(l)&&k.updateCellSize(l)}finally{k.getModel().endUpdate()}k.scrollCellToVisible(l);k.setSelectionCell(l);k.container.focus();k.editAfterInsert&&k.startEditing(l);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(l))},0);return l},R=function(l,y,J,G,P){l=new mxCell(l,
new mxGeometry(0,0,y,J),G);l.vertex=!0;null==P&&(P=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([l],!0)));l.geometry.x=P.x;l.geometry.y=P.y;return V(l)};c.actions.put("insertText",new Action(mxResources.get("text"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(R("Text",60,30,"text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?
null:k.getInsertPoint()))},null,null,"A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&R("",120,60,"whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&R("",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==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
R("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&R("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"R")).isEnabled=m;c.actions.put("insertEdge",
new Action(mxResources.get("line"),function(l){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())){var y=k.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint();null==l&&(l=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([J],!0)));var J=new mxCell("",new mxGeometry(0,0,y,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(l,!0);J.geometry.setTerminalPoint(new mxPoint(l.x+J.geometry.width,
l.y),!1);J.geometry.points=[];J.geometry.relative=!0;J.edge=!0;V(J)}},null,null,"C")).isEnabled=m;B=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"));B.setToggleAction(!0);B.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(l,y,J){for(var G=0;G<J.length;G++)"-"==J[G]?l.addSeparator(y):c.addInsertItem(l,y,mxResources.get(J[G])+"...",J[G])});this.put("insert",new Menu(mxUtils.bind(this,function(l,y){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(l,["toggleShapes"],y),c.menus.addSubmenu("table",l,y),l.addSeparator(y),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(l,["insertTemplate"],y),c.menus.addMenuItems(l,["insertImage",
"insertLink","-"],y),c.menus.addSubmenu("insertAdvanced",l,y,mxResources.get("advanced")),c.menus.addSubmenu("layout",l,y)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),y),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(l,["insertTemplate"],y),l.addSeparator(y),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("table",l,y),this.addSubmenu("layout",l,y)):
this.addSubmenu("insertLayout",l,y,mxResources.get("layout")),this.addSubmenu("insertAdvanced",l,y,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(l,y){c.menus.addInsertTableCellItem(l,y)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,y){c.addInsertMenuItems(l,y,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(l,y){c.addInsertMenuItems(l,
y,["fromText","plantUml","mermaid","-","formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){k.popupMenuHandler.hideMenu();c.showImportCsvDialog()},y,null,m());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","createShape","editDiagram"],y)})));this.put("openRecent",new Menu(function(l,y){var J=c.getRecent();if(null!=J){for(var G=0;G<J.length;G++)(function(P){var p=P.mode;p==App.MODE_GOOGLE?p="googleDrive":p==App.MODE_ONEDRIVE&&(p="oneDrive");l.addItem(P.title+
" ("+mxResources.get(p)+")",null,function(){c.loadFile(P.id)},y)})(J[G]);l.addSeparator(y)}l.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},y)}));this.put("openFrom",new Menu(function(l,y){null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+
"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+
"...",null,function(){c.pickFile(App.MODE_GITHUB)},y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+
"...",null,function(){c.pickFile(App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},y);c.isOffline()||(l.addSeparator(y),l.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(c,"",mxResources.get("open"),function(G){null!=G&&0<G.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(G):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
"/")+window.location.search+"#U"+encodeURIComponent(G)))},mxResources.get("url"));c.showDialog(J.container,300,80,!0,!0);J.init()},y))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(l,y){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+
mxResources.get("loading")+"...)",null,function(){},y,null,!1));null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},y):v&&"function"===
typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
null,null,null,App.MODE_TRELLO)},y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},
y)})),this.put("openLibraryFrom",new Menu(function(l,y){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},y):D&&
"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},
y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},
y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},y);c.isOffline()||(l.addSeparator(y),l.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(c,"",mxResources.get("open"),function(G){if(null!=G&&0<G.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var P=G;c.editor.isCorsEnabledForUrl(G)||(P=PROXY_URL+"?url="+encodeURIComponent(G));mxUtils.get(P,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){c.spinner.stop();
try{c.loadLibrary(new UrlLibrary(this,p.getText(),G))}catch(z){c.handleError(z,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(J.container,300,80,!0,!0);J.init()},y));"1"==urlParams.confLib&&(l.addSeparator(y),l.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},
y))})));this.put("edit",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));B=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",
function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var l=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(l);this.commentsWindow.refreshCommentsTime();l&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,
function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(l,y){var J=c.getCurrentFile();c.menus.addMenuItems(l,"toggleShapes format ruler - findReplace layers tags outline -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(l,["comments"],y);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&
c.menus.addMenuItems(l,["showRemoteCursors"],y);c.menus.addMenuItems(l,["-","fullscreen"],y)};this.put("view",new Menu(mxUtils.bind(this,function(l,y){if("simple"==Editor.currentTheme){var J=c.getCurrentFile();c.menus.addMenuItems(l,["toggleShapes","format"],y);c.isPageMenuVisible()&&c.menus.addMenuItems(l,["pageTabs"],y);c.menus.addMenuItems(l,["ruler","-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP){var G=c.menus.addMenuItem(l,"scratchpad",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
c.menus.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(l,"- findReplace layers tags outline -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(l,["comments"],y);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["showRemoteCursors"],y);this.addMenuItems(l,["-","fullscreen"],y)}else{this.addMenuItems(l,["format","outline","layers","tags"].concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(l,["-","search"],
y);if(isLocalStorage||mxClient.IS_CHROMEAPP)G=this.addMenuItem(l,"scratchpad",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(l,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",l,y);l.addSeparator(y);c.isPageMenuVisible()&&c.menus.addMenuItems(l,["pageTabs"],y);this.addMenuItems(l,"tooltips ruler - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
y);"1"!=urlParams.sketch&&this.addMenuItems(l,["-","fullscreen"],y)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),y)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(l,y){var J=c.currentPage;null!=J&&(l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(J,J.getName())}),
y),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(J)}),y),1<c.pages.length&&(c.menus.addSubmenu("movePage",l,y,mxResources.get("move")),l.addSeparator(y)),l.addSeparator(y),l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(J,mxResources.get("copyOf",[J.getName()]))}),y),1!=urlParams.embed&&(l.addSeparator(y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||l.addItem(mxResources.get("openInNewWindow"),
null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y),null!=c.getLinkForPage(J)&&l.addItem(mxResources.get("link")+"...",null,mxUtils.bind(this,function(){c.showPageLinkDialog(J)}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(l,y){var J=c.currentPage;l.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){c.insertPage()}),y);l.addSeparator(y);if(null!=c.pages)for(var G=0;G<c.pages.length;G++)mxUtils.bind(this,function(P){var p=
null;p=c.pages[P]==J?c.menus.addSubmenu("currentPage",l,y,c.getShortPageName(J)):l.addItem(c.getShortPageName(c.pages[P]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[P])}),y);var z=c.pages[P].getId();p.setAttribute("title",c.pages[P].getName()+" ("+(P+1)+"/"+c.pages.length+")"+(null!=z?" ["+z+"]":""));c.pages[P]==J&&l.addCheckmark(p,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;B=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();
M=!M;c.alert(mxResources.get("restartForChangeRequired"))});B.setToggleAction(!0);B.setSelectedCallback(function(){return M});var S="1"==urlParams.enableStoreBkp;B=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();S=!S});B.setToggleAction(!0);B.setSelectedCallback(function(){return S});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var l=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"),null,null,null,null,null,null,50,250);c.showDialog(l.container,320,80,!0,!0);l.init()})}var U=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(l,y){if("simple"==Editor.currentTheme||"1"==urlParams.sketch||"min"==uiTheme){"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",l,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",l,y);l.addSeparator(y);null==U||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",l,y);c.menus.addSubmenu("units",l,y);c.menus.addMenuItems(l,["-","copyConnect","collapseExpand","tooltips","-"],y);var J=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=
J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["showRemoteCursors"],y),c.menus.addMenuItems(l,["ruler","-"],y));EditorUi.isElectronApp&&c.menus.addMenuItems(l,["-","spellCheck","autoBkp","drafts","-"],y);this.addSubmenu("diagramLanguage",l,y);l.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(l,"configuration",y);l.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",l,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==
Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",l,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",l,y),l.addSeparator(y),"undefined"!==typeof MathJax&&(J=this.addMenuItem(l,"mathematicalTypesetting",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(l,["spellCheck",
"autoBkp","drafts","-"],y),this.addMenuItems(l,["copyConnect","collapseExpand","-"],y),"1"!=urlParams.embed&&(J=c.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["showRemoteCursors","shareCursor"],y),this.addMenuItems(l,["autosave"],y)),l.addSeparator(y),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(l,"plugins",y),this.addMenuItems(l,["-","editDiagram"],y),this.addSubmenu("diagramLanguage",l,y),l.addSeparator(y),"1"!=urlParams.embed&&(isLocalStorage||
mxClient.IS_CHROMEAPP)&&this.addMenuItems(l,["showStartScreen"],y),this.addMenuItems(l,["configuration"],y),l.addSeparator(y),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function G(p){return{id:p.id,isExt:!0,url:p.downloadUrl,title:p.title,imgUrl:p.thumbnailLink,changedBy:p.lastModifyingUserName,lastModifiedOn:p.modifiedDate}}var P=new TemplatesDialog(c,function(p){console.log(arguments)},null,null,null,"user",function(p,z,I){var Q=new Date;Q.setDate(Q.getDate()-7);c.drive.listFiles(null,
Q,I?!0:!1,function(N){for(var T=[],O=0;O<N.items.length;O++)T.push(G(N.items[O]));p(T)},z)},function(p,z,I,Q){c.drive.listFiles(p,null,Q?!0:!1,function(N){for(var T=[],O=0;O<N.items.length;O++)T.push(G(N.items[O]));z(T)},I)},function(p,z,I){c.drive.getFile(p.id,function(Q){z(Q.data)},I)},null,function(p){p({Test:[]},1)},!0,!1);c.showDialog(P.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(l,"templates",y))})));this.put("movePage",new Menu(mxUtils.bind(this,function(l,
y){var J=c.getSelectedPageIndex();if(null!=c.pages)for(var G=0;G<c.pages.length;G++)G!=J&&function(P){l.addItem(c.getShortPageName(c.pages[P]),null,function(){c.movePage(J,P)},y)}(G)})));this.put("share",new Menu(mxUtils.bind(this,function(l,y){if(!c.isStandaloneApp()){var J=c.isOffline(!0)?mxResources.get("offline"):c.getNetworkStatus();null!=J&&(l.addItem(J,null,null,y,null,!1),l.addSeparator(y));c.menus.addMenuItems(l,["share"],y)}this.addMenuItem(l,"publishLink",y,null,null,mxResources.get("publish")+
"...");null!=c.getMainUser()&&this.addMenuItems(l,["accounts"],y)})));this.put("diagram",new Menu(mxUtils.bind(this,function(l,y){var J=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",l,y,mxResources.get("settings")),l.addSeparator(y));var G="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(l,"new open - synchronize properties - save saveAs -".split(" "),y);else if(c.mode==App.MODE_ATLAS){"1"!=
urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(l,["-","save"],y);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(l,["saveAndExit"],y),null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["revisionHistory"],y);l.addSeparator(y)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(l,["save","synchronize","-"],y):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",l,y),l.addSeparator(y),
"min"==Editor.currentTheme&&(c.menus.addMenuItems(l,"toggleShapes format layers tags - findReplace".split(" "),y),c.commentsSupported()&&c.menus.addMenuItems(l,["comments"],y),l.addSeparator(y)));c.menus.addSubmenu("exportAs",l,y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(l,["import"],y):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",l,y);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(c.menus.addMenuItems(l,["-","findReplace"],y),c.commentsSupported()&&
c.menus.addMenuItems(l,["comments","-"],y),c.menus.addMenuItems(l,["toggleShapes","format","layers","tags","-"],y),c.menus.addMenuItems(l,["pageSetup"],y)):"min"!=Editor.currentTheme&&(this.addMenuItems(l,["-"],y),this.addSubmenu("newLibrary",l,y),this.addSubmenu("openLibraryFrom",l,y));l.addSeparator(y);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(l,["print"],y);G||"min"==Editor.currentTheme||null==J||null==c.fileNode||"1"==urlParams.embedInline||(G=null!=
J.getTitle()?J.getTitle():c.defaultFilename,/(\.html)$/i.test(G)||this.addMenuItems(l,["-","properties"]));l.addSeparator(y);"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",l,y,mxResources.get("settings")),l.addSeparator(y));c.menus.addSubmenu("help",l,y);l.addSeparator(y);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(l,["save"],y),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(l,
["saveAndExit"],y),null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["revisionHistory"],y));"1"!=urlParams.embed&&c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(l,["exit"],y);"1"!=urlParams.embed&&null!=J&&c.menus.addMenuItems(l,["-","close"],y)})));this.put("save",new Menu(mxUtils.bind(this,function(l,y){var J=c.getCurrentFile();null==J||J.constructor!=DriveFile&&J.constructor!=OneDriveFile?(c.menus.addMenuItems(l,["save","saveAs","-",
"rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],y):c.menus.addMenuItems(l,["makeCopy"],y)):c.menus.addMenuItems(l,["save","makeCopy","-","rename","moveToFolder"],y);c.menus.addMenuItems(l,["-","autosave"],y);null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["-","revisionHistory"],y)})));this.put("file",new Menu(mxUtils.bind(this,function(l,y){var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||
"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",l,y),this.addSubmenu("exportAs",l,y),this.addSubmenu("embed",l,y),"1"==urlParams.libraries&&(this.addMenuItems(l,["-"],y),this.addSubmenu("newLibrary",l,y),this.addSubmenu("openLibraryFrom",l,y)),c.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],y),this.addMenuItems(l,["-","pageSetup","print","-","rename"],y),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(l,
["saveAndExit"],y):(this.addMenuItems(l,["save"],y),"1"==urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],y))),"1"!=urlParams.noExitBtn&&this.addMenuItems(l,["exit"],y);else if(J){J=c.getCurrentFile();c.menus.addMenuItems(l,["new"],y);c.menus.addSubmenu("openFrom",l,y);isLocalStorage&&this.addSubmenu("openRecent",l,y);l.addSeparator(y);c.menus.addMenuItems(l,["-","save"],y);null!=J&&J.constructor==DriveFile||c.menus.addMenuItems(l,["saveAs"],y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
null==J||J.constructor==LocalFile&&null==J.fileHandle||c.menus.addMenuItems(l,["synchronize"],y);l.addSeparator(y);null!=J&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(l,"publishLink",y,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||J.constructor!=DriveFile&&J.constructor!=GitHubFile&&J.constructor!=OneDriveFile||c.menus.addMenuItems(l,["share"],y));l.addSeparator(y);null!=J&&J.isRenamable()&&this.addMenuItems(l,["rename"],
y);c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],y):(c.menus.addMenuItems(l,["makeCopy"],y),null!=J&&(J.constructor!=OneDriveFile&&J.constructor!=DriveFile||c.menus.addMenuItems(l,["moveToFolder"],y),l.addSeparator(y),null!=J.getFolderUrl()&&c.menus.addMenuItems(l,["openFolder"],y),null!=J.getFileUrl()&&c.menus.addMenuItems(l,["openFile"],y)));l.addSeparator(y);null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["revisionHistory"],
y);if(null!=J&&null!=c.fileNode&&"1"!=urlParams.embedInline){var G=null!=J.getTitle()?J.getTitle():c.defaultFilename;(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(l,["properties"],y)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(l,["-","autosave"],y)}else J=this.editorUi.getCurrentFile(),null!=J&&J.constructor==DriveFile?(J.isRestricted()&&this.addMenuItems(l,["exportOptionsDisabled"],y),this.addMenuItems(l,["save","-","share"],y),G=
this.addMenuItem(l,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize"),l.addSeparator(y)):this.addMenuItems(l,["new"],y),this.addSubmenu("openFrom",l,y),isLocalStorage&&this.addSubmenu("openRecent",l,y),null!=J&&J.constructor==DriveFile?this.addMenuItems(l,"new - rename makeCopy openFolder moveToFolder".split(" "),y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==J||J.constructor==LocalFile&&null==
J.fileHandle||(l.addSeparator(y),G=this.addMenuItem(l,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(l,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==J||this.addMenuItems(l,["share","-"],y),null!=J&&J.isRenamable()&&this.addMenuItems(l,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],y):(this.addMenuItems(l,["makeCopy"],y),null!=J&&(J.constructor==OneDriveFile&&this.addMenuItems(l,["moveToFolder"],y),null!=J.getFolderUrl()&&c.menus.addMenuItems(l,["openFolder"],y)))),l.addSeparator(y),this.addSubmenu("importFrom",l,y),this.addSubmenu("exportAs",l,y),l.addSeparator(y),this.addSubmenu("embed",l,y),this.addSubmenu("publish",l,y),l.addSeparator(y),this.addSubmenu("newLibrary",l,y),this.addSubmenu("openLibraryFrom",l,y),c.isRevisionHistorySupported()&&
this.addMenuItems(l,["-","revisionHistory"],y),null!=J&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(G=null!=J.getTitle()?J.getTitle():c.defaultFilename,(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(l,["-","properties"])),this.addMenuItems(l,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["print"],y),this.addMenuItems(l,["-","close"])})));f.prototype.execute=function(){var l=this.ui.editor.graph;this.customFonts=
this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var y=l.extFonts,J=0;null!=y&&J<y.length;J++){var G=document.getElementById("extFont_"+y[J].name);null!=G&&G.parentNode.removeChild(G)}l.extFonts=[];for(J=0;null!=this.previousExtFonts&&J<this.previousExtFonts.length;J++)this.ui.editor.graph.addExtFont(this.previousExtFonts[J].name,this.previousExtFonts[J].url);
this.previousExtFonts=y};this.put("fontFamily",new Menu(mxUtils.bind(this,function(l,y){for(var J=mxUtils.bind(this,function(O,W,X,Z,Y){var ba=c.editor.graph;Z=this.styleChange(l,Z||O,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],null,y,function(){"1"!=urlParams["ext-fonts"]?ba.setFont(O,W):(document.execCommand("fontname",!1,O),ba.addExtFont(O,W));c.fireEvent(new mxEventObject("styleChanged",
"keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],"cells",[ba.cellEditor.getEditingCell()]))},function(){ba.updateLabelElements(ba.getSelectionCells(),function(fa){fa.removeAttribute("face");fa.style.fontFamily=null;"PRE"==fa.nodeName&&ba.replaceElement(fa,"div")});"1"==urlParams["ext-fonts"]&&ba.addExtFont(O,W)});X&&(X=document.createElement("span"),
X.className="geSprite geSprite-delete",X.style.cursor="pointer",X.style.display="inline-block",Z.firstChild.nextSibling.nextSibling.appendChild(X),mxEvent.addListener(X,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(fa){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[O.toLowerCase()];for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==O&&this.customFonts[aa].url==W){this.customFonts.splice(aa,1);c.fireEvent(new mxEventObject("customFontsChanged"));
break}}else{var da=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=da&&0<da.length)for(aa=0;aa<da.length;aa++)if(da[aa].name==O){da.splice(aa,1);break}var ra=mxUtils.clone(this.customFonts);for(aa=0;aa<ra.length;aa++)if(ra[aa].name==O){ra.splice(aa,1);break}aa=new f(this.editorUi,da,ra);this.editorUi.editor.graph.model.execute(aa)}this.editorUi.hideCurrentMenu();mxEvent.consume(fa)})));Graph.addFont(O,W);Z.firstChild.nextSibling.style.fontFamily=O;null!=Y&&Z.setAttribute("title",Y)}),
G={},P=0;P<this.defaultFonts.length;P++){var p=this.defaultFonts[P];"string"===typeof p?J(p):null!=p.fontFamily&&null!=p.fontUrl&&(G[encodeURIComponent(p.fontFamily)+"@"+encodeURIComponent(p.fontUrl)]=!0,J(p.fontFamily,p.fontUrl))}l.addSeparator(y);if("1"!=urlParams["ext-fonts"]){p=function(O){var W=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!G[W]){for(var X=O.name,Z=0;null!=I[X.toLowerCase()];)X=O.name+" ("+ ++Z+")";null==z[W]&&(Q.push({name:O.name,url:O.url,label:X,
title:O.url}),I[X.toLowerCase()]=O,z[W]=O)}};var z={},I={},Q=[];for(P=0;P<this.customFonts.length;P++)p(this.customFonts[P]);for(var N in Graph.recentCustomFonts)p(Graph.recentCustomFonts[N]);Q.sort(function(O,W){return O.label<W.label?-1:O.label>W.label?1:0});if(0<Q.length){for(P=0;P<Q.length;P++)J(Q[P].name,Q[P].url,!0,Q[P].label,Q[P].url);l.addSeparator(y)}l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),
y);l.addSeparator(y)}else{N=this.editorUi.editor.graph.extFonts;if(null!=N&&0<N.length){p={};var T=!1;for(P=0;P<this.customFonts.length;P++)p[this.customFonts[P].name]=!0;for(P=0;P<N.length;P++)p[N[P].name]||(this.customFonts.push(N[P]),T=!0);T&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(P=0;P<this.customFonts.length;P++)N=this.customFonts[P].name,p=this.customFonts[P].url,J(N,p,!0),this.editorUi.editor.graph.addExtFont(N,
p,!0);l.addSeparator(y);l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var O=new f(this.editorUi,[],[]);c.editor.graph.model.execute(O)}),y);l.addSeparator(y)}}l.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,W=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],X="s",Z=null;if("1"!=urlParams["ext-fonts"]&&O.isEditing()){var Y=O.getSelectedEditingElement();null!=Y&&(Y=mxUtils.getCurrentStyle(Y),null!=
Y&&(W=Graph.stripQuotes(Y.fontFamily),Z=Graph.getFontUrl(W,null),null!=Z&&(Graph.isGoogleFontUrl(Z)?(Z=null,X="g"):X="w")))}else Y=O.getView().getState(O.getSelectionCell()),null!=Y&&(W=Y.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(Y=Y.style.fontSource,null!=Y&&(Y=decodeURIComponent(Y),Graph.isGoogleFontUrl(Y)?X="g":(X="w",Z=Y))):(X=Y.style.FType||X,"w"==X&&(Z=this.editorUi.editor.graph.extFonts,Y=null,null!=Z&&(Y=Z.find(function(fa){return fa.name==W})),Z=null!=Y?Y.url:mxResources.get("urlNotFound",
null,"URL not found"))));null!=Z&&Z.substring(0,PROXY_URL.length)==PROXY_URL&&(Z=decodeURIComponent(Z.substr((PROXY_URL+"?url=").length)));var ba=null;document.activeElement==O.cellEditor.textarea&&(ba=O.cellEditor.saveSelection());X=new FontDialog(this.editorUi,W,Z,X,mxUtils.bind(this,function(fa,aa,da){null!=ba&&(O.cellEditor.restoreSelection(ba),ba=null);if(null!=fa&&0<fa.length)if("1"!=urlParams["ext-fonts"]&&O.isEditing())O.setFont(fa,aa);else{O.getModel().beginUpdate();try{O.stopEditing(!1);
"1"!=urlParams["ext-fonts"]?(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)):(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),"s"!=da&&(O.setCellStyles("FType",da),0==aa.indexOf("http://")&&(aa=PROXY_URL+"?url="+encodeURIComponent(aa)),this.editorUi.editor.graph.addExtFont(fa,aa)));da=!0;for(var ra=0;ra<this.customFonts.length;ra++)if(this.customFonts[ra].name==fa){da=!1;break}da&&(this.customFonts.push({name:fa,
url:aa}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(X.container,380,Editor.enableWebFonts?250:180,!0,!0);X.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.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";u!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,v){u=v.getProperty("edit").changes;for(v=0;v<u.length;v++)if(u[v]instanceof RenamePage||u[v]instanceof MovePage||u[v]instanceof mxRootChange){this.updateTabContainer();
	'voice': 'plugins/voice.js',
	'tickets': 'plugins/tickets.js', 'flow': 'plugins/flow.js',
	'voice',
	'tickets',
			}), null, null, 360, 120, null, mxUtils.bind(this, function()
			var scrollState = this.saveScrollState();
	/**
	 * Saves scroll position
	 */
	EditorUi.prototype.saveScrollState = function()
	{
		var t = this.editor.graph.view.translate;
		var off = mxUtils.getOffset(this.diagramContainer);
		var x = this.diagramContainer.scrollLeft - off.x;
		var y = this.diagramContainer.scrollTop - off.y;

		if (this.embedViewport != null)
		{
			if (!Editor.inlineFullscreen)
			{
				x += this.embedViewport.x;
				y += this.embedViewport.y;
			}
			else
			{
				x -= this.embedViewport.x;
				y -= this.embedViewport.y;
			}
		}

		return {x: x, y: y, tx: t.x, ty: t.y};
	};
   
	/**
	 * Dynamic change of dark mode.
	 */
	EditorUi.prototype.restoreScrollState = function(state)
	{
		var s = this.editor.graph.view.scale;
		var t = this.editor.graph.view.translate;
		var off = mxUtils.getOffset(this.diagramContainer);
		
		this.diagramContainer.scrollLeft = state.x + off.x + (t.x - state.tx) * s;
		this.diagramContainer.scrollTop = state.y + off.y + (t.y - state.ty) * s;
	};

		editorUi.actions.put('about', new Action(mxResources.get('about') + ' ' + EditorUi.VERSION + '...', function(arg1, evt)
			if (evt != null && mxEvent.isShiftDown(evt))
			{
				mxLog.show();

				if (window.console != null)
				{
					console.log(editorUi, window);
				}
			}
			else if (editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
			{
				editorUi.alert(editorUi.editor.appName + ' ' + EditorUi.VERSION);
			}
			else
			{
				editorUi.openLink('https://www.drawio.com/');
			}
					changes[i] instanceof MovePage ||
                    console.log('layers', layers);
                    if (rotation !== 0) {
                        edge = graph.insertEdge(parent, null, null, source, target, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                        var label = edgeShape.createLabelSubShape(graph, edge);
                        if (label != null) {
                            label.setStyle(label.getStyle() + ";rotation=" + (rotation > 60 && rotation < 240 ? (rotation + 180) % 360 : rotation));
                            var geo = label.getGeometry();
                            geo.x = (0);
                            geo.y = (0);
                            geo.relative = (true);
                            geo.offset = (new mxPoint(-geo.width / 2, -geo.height / 2));
                        }
                    else {
                        edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(true), source, target, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                        var lblOffset = edgeShape.getLblEdgeOffset(graph.getView(), points);
                        edge.getGeometry().offset = (lblOffset);
                        
                        //add entry/exit points when edge, src, and trg are not rotated
                        if (fromConstraint != null)
            			{
            				graph.setConnectionConstraint(edge, source, true,
            						new mxConnectionConstraint(fromConstraint, false));
            			}
                        
                        if (removeFirstPt)
                    	{
	                        points.shift();
                    	}
                        
            			if (toConstraint != null)
            			{
            				graph.setConnectionConstraint(edge, target, false,
            						new mxConnectionConstraint(toConstraint, false));
            			}
            			
            			if (removeLastPt)
        				{
	        				points.pop();
                        }
                    if (rotation !== 0) {
                        if (edgeShape.getShapeIndex() === 0) {
                            edge = graph.insertEdge(parent, null, null, null, null, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                        }
                        else {
                            edge = graph.createEdge(parent, null, null, null, null, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                            edge = graph.addEdge(edge, parent, null, null, edgeShape.getShapeIndex() + this.shapeIndexShift++);
                        }
                        var label = edgeShape.createLabelSubShape(graph, edge);
                        if (label != null) {
                            label.setStyle(label.getStyle() + ";rotation=" + (rotation > 60 && rotation < 240 ? (rotation + 180) % 360 : rotation));
                            var geo = label.getGeometry();
                            geo.x = (0);
                            geo.y = (0);
                            geo.relative = (true);
                            geo.offset = (new mxPoint(-geo.width / 2, -geo.height / 2));
                        }
                        if (edgeShape.getShapeIndex() === 0) {
                            edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(true), null, null, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                        }
                        else {
                            edge = graph.createEdge(parent, null, edgeShape.getTextLabel(true), null, null, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                            edge = graph.addEdge(edge, parent, null, null, edgeShape.getShapeIndex() + this.shapeIndexShift++);
                        }
                        var lblOffset = edgeShape.getLblEdgeOffset(graph.getView(), points);
                        edge.getGeometry().offset = (lblOffset);
		var cssTxt = 'margin: 0;padding: 0;background-image: ' + gridImage + ';background-position: ' + position;
				preview.backgroundColor = bg;
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var C=0;C<F.length;C++){var t=F[C];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[u]);if(F){for(var C in F)lb+=C+"="+F[C]+";";return F.fontFamily?"font-family: "+F.fontFamily:
""}if("Liberation Sans"!=u)return lb="fontFamily="+u+";","font-family: "+u+";"}}catch(t){}return""}function A(u){return Math.round(10*u)/10}function B(u,F,C){function t(la,Ma){var ya="",za=la.t,Qb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Qb.v)null==za&&(Na&&(ya+=N(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=N(!0));Na=za.v;Ka=Qb.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(Qb.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:C.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var ea=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=
Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(ea=Va.v),Va=aa[++Ma]}catch(Gb){console.log(Gb)}ea=T(ea);null!=ea&&(ea=ea.substring(0,7),ya+="color:"+ea+";");xb&&(ya+="font-size:"+A(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=ea=la.a?la.a.v:C.TextAlign||"center","left"==ea?xb="flex-start":"right"==ea&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+ea+"; align-items: baseline; font-size: 0; line-height: 1.25;");la.il&&(ya+="margin-left: "+
Math.max(0,A(.75*la.il.v-(Na?28:0)))+"px;");la.ir&&(ya+="margin-right: "+A(.75*la.ir.v)+"px;");la.mt&&(ya+="margin-top: "+A(.75*la.mt.v)+"px;");la.mb&&(ya+="margin-bottom: "+A(.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?A(.75*la.s.v):"13")+"px;";la.c&&(za=T(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:C.Font&&(za=C.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 N(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 Qb=Ba.pop();la+="</"+Qb+">"}while(za&&0<Ba.length);return la}var q={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 q[la.n]});for(var U=[0],wa=0;0<(wa=u.indexOf("\n",wa));)wa++,U.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>U[wa])F.splice(ja,0,{s:U[wa],n:"a",v:C.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==U[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=U[wa]&&F.push({s:U[wa],n:"a",v:C.TextAlign||
"center"});U="";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=u.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},U+=r(u,La,Ia,!0),l=La=Ia,U+=N());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:u.length;U+=t(ma,na);ua&&(U+=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&&(U+=e(na)+r(u,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];U+=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);U+=r(u,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}U+=r(null,null,null,!0);ua&&(l!=Ia&&(U+=e({dummy:1})+r(u,l,Ia)),U+=N(!0));return U}function m(u,F){G=!1;var C=null!=u.Text&&u.Text.t?u.Text:null!=u.Value&&u.Value.t?u.Value:
null!=u.Lane_0&&u.Lane_0.t?u.Lane_0:null;null==C&&null!=u.State?u.State.t&&(C=u.State):null==C&&null!=u.Note?u.Note.t&&(C=u.Note):null==C&&null!=u.Title?u.Title.t&&(C=u.Title):u.t&&(C=u);null==C&&null!=u.TextAreas?null!=u.TextAreas.Text&&null!=u.TextAreas.Text.Value&&u.TextAreas.Text.Value.t&&(C=u.TextAreas.Text.Value):null==C&&null!=u.t0&&u.t0.t&&(C=u.t0);if(null!=C){if(null!=C.t){var t=C.t;t=t.replace(/\u2028/g,"\n");C=C.m;try{/   /.test(t)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<C.length;e++)if(0<
C[e].s||null!=C[e].e&&C[e].e<t.length||"t"==C[e].n||"ac"==C[e].n||"lk"==C[e].n){G=!0;break}if(G=G||F)return B(t,C,u)}catch(N){console.log(N)}t=t.replace(/</g,"&lt;");return t=t.replace(/>/g,"&gt;")}if(null!=C.Value&&null!=C.Value.t)return C.Value.t=C.Value.t.replace(/</g,"&lt;"),C.Value.t=C.Value.t.replace(/>/g,"&gt;"),C.Value.t}return""}function g(u){return null!=u.Action?u.Action:u}function b(u){if(null!=u.Text){if(null!=u.Text.m)return u.Text.m}else if(null!=u.TextAreas){if(null!=u.TextAreas.Text&&
null!=u.TextAreas.Text.Value&&null!=u.TextAreas.Text.Value.m)return u.TextAreas.Text.Value.m}else{if(null!=u.m)return u.m;if(null!=u.Title){if(null!=u.Title.m)return u.Title.m}else if(null!=u.State){if(null!=u.State.m)return u.State.m}else if(null!=u.Note&&null!=u.Note.m)return u.Note.m}return null}function a(u,F){u="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(u)+k(u)+p(u)+x(u)+E(u)+I(u)+J(u)+O(u)+M(u))+L(u)+H(u)+Zb(mxConstants.STYLE_ALIGN,u.TextAlign,"center");lb=
"";return u}function c(u,F,C,t,e,N){N=null==N?!1:N;var r="",q=!1,Z=!1;if(null!=u)if(N){N=u.split(";");u="";for(var aa=0;aa<N.length;aa++)"fillColor=none"==N[aa]?Z=!0:"strokeColor=none"==N[aa]?q=!0:""!=N[aa]&&(u+=N[aa]+";")}else""!=u&&";"!=u.charAt(u.length-1)&&(r=";");r+=(Xc(u,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(u,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(u,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,u,F,C,t)+d(mxConstants.STYLE_FONTFAMILY,u,F,C,t)+d(mxConstants.STYLE_FONTCOLOR,
u,F,C,t)+d(mxConstants.STYLE_FONTSTYLE,u,F,C,t)+d(mxConstants.STYLE_ALIGN,u,F,C,t)+d(mxConstants.STYLE_SPACING_LEFT,u,F,C,t)+d(mxConstants.STYLE_SPACING_RIGHT,u,F,C,t)+d(mxConstants.STYLE_SPACING_TOP,u,F,C,t)+d(mxConstants.STYLE_SPACING_BOTTOM,u,F,C,t))+d(mxConstants.STYLE_ALIGN+"Global",u,F,C,t)+d(mxConstants.STYLE_SPACING,u,F,C,t)+d(mxConstants.STYLE_VERTICAL_ALIGN,u,F,C,t)+d(mxConstants.STYLE_STROKECOLOR,u,F,C,t)+d(mxConstants.STYLE_OPACITY,u,F,C,t)+d(mxConstants.STYLE_ROUNDED,u,F,C,t)+d(mxConstants.STYLE_ROTATION,
u,F,C,t)+d(mxConstants.STYLE_FLIPH,u,F,C,t)+d(mxConstants.STYLE_FLIPV,u,F,C,t)+d(mxConstants.STYLE_SHADOW,u,F,C,t)+d(mxConstants.STYLE_FILLCOLOR,u,F,C,t)+d(mxConstants.STYLE_DASHED,u,F,C,t)+d(mxConstants.STYLE_STROKEWIDTH,u,F,C,t)+d(mxConstants.STYLE_IMAGE,u,F,C,t)+d(mxConstants.STYLE_POINTER_EVENTS,u,F,C,t);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");q&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(u,F,C,t,e){if(!Xc(F,u))switch(u){case mxConstants.STYLE_FONTSIZE:return f(C);
case mxConstants.STYLE_FONTFAMILY:return k(C);case mxConstants.STYLE_FONTCOLOR:return p(C);case mxConstants.STYLE_FONTSTYLE:return x(C);case mxConstants.STYLE_ALIGN:return E(C);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,C.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(C);case mxConstants.STYLE_SPACING_RIGHT:return J(C);case mxConstants.STYLE_SPACING_TOP:return O(C);case mxConstants.STYLE_SPACING_BOTTOM:return M(C);case mxConstants.STYLE_SPACING:return L(C);
case mxConstants.STYLE_VERTICAL_ALIGN:return H(C);case mxConstants.STYLE_STROKECOLOR:return K(C,t);case mxConstants.STYLE_OPACITY:return R(C,t,e);case mxConstants.STYLE_ROUNDED:return u=!e.edge&&!e.style.includes("rounded")&&null!=C.Rounding&&0<C.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+A(.75*C.Rounding)+";":"",u;case mxConstants.STYLE_ROTATION:return ha(C,t,e);case mxConstants.STYLE_FLIPH:return u=C.FlipX?"flipH=1;":"",u;case mxConstants.STYLE_FLIPV:return u=C.FlipY?"flipV=1;":"",u;case mxConstants.STYLE_SHADOW:return X(C);
case mxConstants.STYLE_FILLCOLOR:return ca(C,t);case mxConstants.STYLE_DASHED:return qa(C);case mxConstants.STYLE_STROKEWIDTH:return sa(C);case mxConstants.STYLE_IMAGE:return Fa(C,t);case mxConstants.STYLE_POINTER_EVENTS:return C.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("s"==C.n&&C.v)return"fontSize="+A(.75*C.v)+";";F++}return"fontSize=13;"}function k(u){var F=b(u);if(null!=F)for(var C=
0;C<F.length;C++)if("f"==F[C].n&&F[C].v){var t=F[C].v;break}!t&&u.Font&&(t=u.Font);y(t);return lb}function n(u){return"ext"==u.tp?u.url:"ml"==u.tp?"mailto:"+u.eml:"pg"==u.tp?"data:page/id,"+(LucidImporter.pageIdsMap[u.id]||0):"c"==u.tp?"data:confluence/id,"+u.ccid:null}function p(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("c"==C.n&&null!=C.v)return u=T(C.v).substring(0,7),"#000000"==u&&(u="default"),mxConstants.STYLE_FONTCOLOR+"="+u+";";F++}return""}function x(u){return z(b(u))}function z(u){if(null!=
u){var F=0,C=!1;if(null!=u)for(var t=0;!C&&t<u.length;){var e=u[t];"b"==e.n?null!=e.v&&e.v&&(C=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(C=!0,F+=1);t++}C=!1;if(null!=u)for(t=0;!C&&t<u.length;)e=u[t],"i"==e.n&&null!=e.v&&e.v&&(C=!0,F+=2),t++;C=!1;if(null!=u)for(t=0;!C&&t<u.length;)e=u[t],"u"==e.n&&null!=e.v&&e.v&&(C=!0,F+=4),t++;if(0<F)return"fontStyle="+F+";"}return""}function E(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("a"==C.n&&null!=C.v)return"align="+C.v+";";F++}return""}function I(u){u=
b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if(null!=C.v&&"il"==C.n)return"spacingLeft="+A(.75*C.v)+";";F++}return""}function J(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("ir"==C.n&&null!=C.v)return"spacingRight="+A(.75*C.v)+";";F++}return""}function O(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("mt"==C.n&&null!=C.v)return"spacingTop="+A(.75*C.v)+";";F++}return""}function M(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("mb"==C.n&&null!=C.v)return"spacingBottom="+
A(.75*C.v)+";";F++}return""}function L(u){return"number"===typeof u.InsetMargin?"spacing="+Math.max(0,A(.75*u.InsetMargin))+";":""}function H(u){return null!=u.Text_VAlign&&"string"===typeof u.Text_VAlign?"verticalAlign="+u.Text_VAlign+";":null!=u.Title_VAlign&&"string"===typeof u.Title_VAlign?"verticalAlign="+u.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,u.TextVAlign,"middle")}function K(u,F){return 0==u.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,V(u.LineColor),
"#000000")}function P(u){return null!=u?mxConstants.STYLE_FILLCOLOR+"="+V(u)+";":""}function Q(u){return null!=u?"swimlaneFillColor="+V(u)+";":""}function R(u,F,C){F="";if("string"===typeof u.LineColor&&(u.LineColor=T(u.LineColor),7<u.LineColor.length)){var t="0x"+u.LineColor.substring(u.LineColor.length-2,u.LineColor.length);C.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(t)/2.55)+";")}"string"===typeof u.FillColor&&(u.FillColor=T(u.FillColor),7<u.FillColor.length&&(u=
"0x"+u.FillColor.substring(u.FillColor.length-2,u.FillColor.length),C.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(u)/2.55)+";")));return F}function ha(u,F,C){var t="";if(null!=u.Rotation){u=mxUtils.toDegree(parseFloat(u.Rotation));var e=!0;0!=u&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==u||270==u)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(u+=90,C.geometry.rotate90(),C.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
F.Class)?(u-=90,C.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(u+=180);0!=u&&(t+="rotation="+u+";");e||(t+="horizontal=0;")}return t}function X(u){return null!=u.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function T(u){if(u){if("object"===typeof u)try{u=u.cs[0].c}catch(F){console.log(F),u="#ffffff"}"rgb"==u.substring(0,3)?u="#"+u.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=u.charAt(0)&&(u="#"+u)}return u}function V(u){return(u=T(u))?
u.substring(0,7):null}function oa(u,F){return(u=T(u))&&7<u.length?F+"="+Math.round(parseInt("0x"+u.substr(7))/2.55)+";":""}function ca(u,F){if(null!=u.FillColor)if("object"===typeof u.FillColor){if(null!=u.FillColor.cs&&1<u.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,V(u.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,V(u.FillColor.cs[1].c))}else return"string"===typeof u.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,V(u.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
"dashed32"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=u.StrokeStyle&&"dashed"==u.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(u){return null!=u.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,A(.75*parseFloat(u.LineWidth)),"1"):""}function Fa(u,F,C){var t="";u.FillColor&&u.FillColor.url?(C=u.FillColor.url,"fill"==u.FillColor.pos&&(t="imageAspect=0;")):"ImageSearchBlock2"==F.Class?C=u.URL:"UserImage2Block"==
F.Class&&null!=u.ImageFillProps&&null!=u.ImageFillProps.url&&(C=u.ImageFillProps.url);return null!=C?"image="+h(C)+";"+t:""}function ka(u,F,C){null!=F.Link&&0<F.Link.length&&C.setAttributeForCell(u,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&C.setAttributeForCell(u,"Notes",F.NoteHint.t);var t=[],e=C.convertValueToString(u),N=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var q=match[0];N=!0;if(2<q.length){var Z=q.substring(2,q.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":
match.index+q.length}}N&&(t.push(e.substring(r)),C.setAttributeForCell(u,"label",t.join("")),C.setAttributeForCell(u,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var U=F[aa],wa=mxUtils.trim(U.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(u,wa,U.Value,C)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(u,F,C,t){for(var e=F,N=0;null!=t.getAttributeForCell(u,e);)N++,e=F+"_"+N;t.setAttributeForCell(u,
e,null!=C?C:"")}function yb(u,F,C,t,e,N){var r=g(F);if(null!=r){var q=Od[r.Class];null!=q?(u.style+=q,";"!=u.style.charAt(u.style.length-1)&&(u.style+=";")):u.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);q=null!=r.Properties?r.Properties:r;if(null!=q&&(u.value=N?"":m(q),u.style+=c(u.style,q,r,u,G,!0),u.style.includes("strokeColor")||(u.style+=K(q,r)),ka(u,q,C),q.Title&&q.Title.t&&q.Text&&q.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(C=u.geometry,C=new mxCell(m(q.Title),
new mxGeometry(0,C.height,C.width,10),"strokeColor=none;fillColor=none;"),C.vertex=!0,u.insert(C),C.style+=a(q.Title,G)),u.edge)){u.style=null!=q.Rounding&&"diagonal"!=q.Shape?u.style+("rounded=1;arcSize="+q.Rounding+";"):u.style+"rounded=0;";if(C="curve"==q.Shape)u.style+="curved=1;";else if("diagonal"!=q.Shape)if(null!=q.ElbowPoints&&0<q.ElbowPoints.length)for(u.geometry.points=[],r=0;r<q.ElbowPoints.length;r++)u.geometry.points.push(new mxPoint(Math.round(.75*q.ElbowPoints[r].x+wc),Math.round(.75*
q.ElbowPoints[r].y+xc)));else if("elbow"==q.Shape||null!=q.Endpoint1.Block&&null!=q.Endpoint2.Block)u.style+="edgeStyle=orthogonalEdgeStyle;";if(q.LineJumps||LucidImporter.globalProps.LineJumps)u.style+="jumpStyle=arc;";null!=q.Endpoint1.Style&&(N=Ee[q.Endpoint1.Style],null!=N?(N=N.replace(/xyz/g,"start"),u.style+="startArrow="+N+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint1.Style)));null!=q.Endpoint2.Style&&(N=Ee[q.Endpoint2.Style],null!=
N?(N=N.replace(/xyz/g,"end"),u.style+="endArrow="+N+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint2.Style)));N=null!=q.ElbowControlPoints&&0<q.ElbowControlPoints.length?q.ElbowControlPoints:q.Joints;if(C&&null!=q.BezierJoints&&0<q.BezierJoints.length){N=[];C=q.BezierJoints[q.BezierJoints.length-1];C.p.x=q.Endpoint2.x;C.p.y=q.Endpoint2.y;for(r=0;r<q.BezierJoints.length;r++)C=q.BezierJoints[r],N.push({x:C.p.x+C.nt.x*C.lcps*.75,y:C.p.y+C.nt.y*
C.lcps*.75}),N.push({x:C.p.x+C.nt.x*C.rcps*.75,y:C.p.y+C.nt.y*C.rcps*.75});N=N.slice(1,N.length-1)}else C&&(N=[],N.push({x:q.Endpoint1.x+(.1>q.Endpoint1.LinkX?-250:.9<q.Endpoint1.LinkX?250:0),y:q.Endpoint1.y+(.1>q.Endpoint1.LinkY?-250:.9<q.Endpoint1.LinkY?250:0)}),N.push({x:q.Endpoint2.x+(.1>q.Endpoint2.LinkX?-250:.9<q.Endpoint2.LinkX?250:0),y:q.Endpoint2.y+(.1>q.Endpoint2.LinkY?-250:.9<q.Endpoint2.LinkY?250:0)}));if(null!=N)for(u.geometry.points=[],r=0;r<N.length;r++)C=N[r].p?N[r].p:N[r],u.geometry.points.push(new mxPoint(Math.round(.75*
C.x+wc),Math.round(.75*C.y+xc)));C=!1;if((null==u.geometry.points||0==u.geometry.points.length)&&null!=q.Endpoint1.Block&&q.Endpoint1.Block==q.Endpoint2.Block&&null!=t&&null!=e){C=new mxPoint(Math.round(t.geometry.x+t.geometry.width*q.Endpoint1.LinkX),Math.round(t.geometry.y+t.geometry.height*q.Endpoint1.LinkY));N=new mxPoint(Math.round(e.geometry.x+e.geometry.width*q.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*q.Endpoint2.LinkY));wc=C.x==N.x?Math.abs(C.x-t.geometry.x)<t.geometry.width/
2?-20:20:0;xc=C.y==N.y?Math.abs(C.y-t.geometry.y)<t.geometry.height/2?-20:20:0;var Z=new mxPoint(C.x+wc,C.y+xc),aa=new mxPoint(N.x+wc,N.y+xc);Z.generated=!0;aa.generated=!0;u.geometry.points=[Z,aa];C=C.x==N.x}null!=t&&t.geometry.isRotated||(Z=Fe(u,q.Endpoint1,!0,C,null,t));null!=t&&null!=Z&&(null==t.stylePoints&&(t.stylePoints=[]),t.stylePoints.push(Z),LucidImporter.stylePointsSet.add(t));null!=e&&e.geometry.isRotated||(aa=Fe(u,q.Endpoint2,!1,C,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=
[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(u.style+=";lucidId="+F.id+";");u.lucidchartObject=F}function vb(u,F){var C=g(u).Properties,t=C.BoundingBox;null==u.Class||"AWS"!==u.Class.substring(0,3)&&"Amazon"!==u.Class.substring(0,6)||u.Class.includes("AWS19")||(t.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*t.x+wc),Math.round(.75*t.y+xc),Math.round(.75*t.w),Math.round(.75*t.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;yb(v,u,F);
v.zOrder=C.ZOrder;Ge(v,C);C.Hidden&&(v.visible=!1);return v}function yf(u,F,C,t){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;yb(e,u,F,C,t,!0);var N=g(u).Properties,r=null!=N?N.TextAreas:u.TextAreas;if(null!=r){for(var q=0;void 0!==r["t"+q];){var Z=r["t"+q];null!=Z&&(e=Pd(Z,e,u,C,t,F));q++}for(q=0;void 0!==r["m"+q]||1>q;)Z=r["m"+q],null!=Z&&(e=Pd(Z,e,u,C,t,F)),q++;null!=r.Text&&(e=Pd(r.Text,e,u,C,t,F));r=null!=N?N.TextAreas:u.TextAreas;null!=
r.Message&&(e=Pd(r.Message,e,u,C,t,F))}u.Hidden&&(e.visible=!1);return e}function Pd(u,F,C,t,e,N){var r=2*(parseFloat(u.Location)-.5);isNaN(r)&&null!=u.Text&&null!=u.Text.Location&&(r=2*(parseFloat(u.Text.Location)-.5));N=m(u);var q=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=C;if(G)aa=lb;else{var U="13",wa="";if(null!=u&&null!=u.Value&&null!=u.Value.m){wa=z(u.Value.m);for(var ja=0;ja<u.Value.m.length;ja++)if("s"==u.Value.m[ja].n&&u.Value.m[ja].v)U=A(.75*parseFloat(u.Value.m[ja].v));
else if("c"==u.Value.m[ja].n){var na=T(u.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="+U+";"}q=new q(N,r,Z+aa);q.geometry.relative=!0;q.vertex=!0;if(u.Side)try{C.Action&&C.Action.Properties&&(C=C.Action.Properties);if(null!=t&&null!=e){var ra=t.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*C.Endpoint1.LinkX-(Aa.x+Aa.width*C.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*C.Endpoint1.LinkY-(Aa.y+Aa.height*
C.Endpoint2.LinkY))}else ma=Math.abs(C.Endpoint1.x-C.Endpoint2.x),Ba=Math.abs(C.Endpoint1.y-C.Endpoint2.y);var Pa=mxUtils.getSizeForString(N.replace(/\n/g,"<br>"));q.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(C.Endpoint1.y-C.Endpoint2.y)*u.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(C.Endpoint2.x-C.Endpoint1.x)*u.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}q.lucidchartObject=u;F.insert(q);return F}function Zb(u,F,C,t){null!=F&&null!=t&&(F=t(F));return null!=F&&F!=C?u+"="+F+";":
""}function Fe(u,F,C,t,e,N){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!=N&&N.style&&-1<N.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=N&&N.style&&-1<N.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),u.style+=(t?"":(C?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(C?"exitY":"entryY")+"="+F.LinkY+";")+(C?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(u,F,C,t,e){try{var N=function(ma,
Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)N(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,q=Math.min(q,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),U=Math.max(U,(ma.y+(ma.height?ma.height:0))*Ba)};null!=u.Action&&null!=u.Action.Properties&&(u=u.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=u.ZOrder;var q=Infinity,Z=Infinity,aa=-Infinity,U=-Infinity,wa=u.Members;e=[];for(var ja in wa){var na=
F[ja];null!=na?e.push(na):null!=t[ja]&&(e.push(t[ja]),C[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(C=F=0;C<e.length;C++)if(na=e[C],na.vertex)N(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;N(ra.Endpoint1,!0);N(ra.Endpoint2,!0);N(ra.ElbowPoints,!0);N(ra.ElbowControlPoints,!0);N(ra.BezierJoints,!0);N(ra.Joints,!0)}r.geometry.x=q;r.geometry.y=Z;
r.geometry.width=aa-q;r.geometry.height=U-Z;if(null!=r.children)for(C=0;C<r.children.length;C++){var Aa=r.children[C].geometry;Aa.x-=q;Aa.y-=Z}u.IsState?(r.lucidLayerInfo={name:u.Name,visible:!u.Hidden,locked:u.Restrictions.b&&u.Restrictions.p&&u.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):u.Hidden&&(r.visible=!1);r.lucidchartObject=u;return r}catch(ma){console.log(ma)}}function zf(u,F,C){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;u.getModel().beginUpdate();
try{var t=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?N[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?N[ua.Endpoint2.Block]:null,l=yf(Ca,u,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(u.addCell(l,Ca,null,Ka,La))},e=[],N={},r={},q={},Z=[];null!=F.Lines&&(q=F.Lines);if(null!=
F.Blocks){Object.assign(q,F.Blocks);for(var aa in F.Blocks){var U=F.Blocks[aa];U.id=aa;var wa=!1;null!=Od[U.Class]&&"mxCompositeShape"==Od[U.Class]&&(N[U.id]=Ie(U,e,u),Z.push(U),wa=!0);wa||(N[U.id]=vb(U,u),Z.push(U))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,u,N)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)U=F.Objects[ja],q[U.id]=U,null!=U.Action&&"mxCompositeShape"==
Od[U.Action.Class]?N[U.id]=Ie(U,e,u):U.IsBlock&&null!=U.Action&&null!=U.Action.Properties?N[U.id]=vb(U,u):U.IsGenerator&&U.GeneratorData&&U.GeneratorData.p&&("OrgChart2018"==U.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(U.GeneratorData.id,U.GeneratorData.p,U.GeneratorData.gs,u,N)):LucidImporter.hasUnknownShapes=!0),Z.push(U);for(ja=0;ja<F.Objects.length;ja++)if(U=F.Objects[ja],U.IsGroup){var na=He(U,N,r,q,u);na&&(N[U.id]=na,Z.push(U))}}if(null!=F.Groups)try{for(aa in F.Groups)if(U=
F.Groups[aa],U.id=aa,na=He(U,N,r,q,u))N[U.id]=na,Z.push(U)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)U=F.Lines[aa],U.id=aa,Z.push(U);Z.sort(function(Ca,ua){Ca=g(Ca);ua=g(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++){U=Z[ja];var ra=N[U.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;u.addCell(Aa,u.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
Pa),Cf(u,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),u),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}C||u.setSelectionCells(e)}finally{u.getModel().endUpdate()}}function Cf(u,F){if(u.model.contains(F)&&F.edge){var C=u.view.getState(F);if(null!=C&&null!=F.children){var t=mxRectangle.fromRectangle(C.paintBounds);t.grow(5);for(var e=0;e<F.children.length;e++){var N=u.view.getState(F.children[e]);
null==N||mxUtils.contains(t,N.paintBounds.x,N.paintBounds.y)||(N.cell.geometry.offset=new mxPoint(0,0))}}u=F.lucidchartObject;null!=u&&"elbow"==u.Shape&&null==u.ElbowControlPoints&&null==u.ElbowPoints&&null!=C.style.exitX&&null!=C.style.exitY&&null!=C.style.entryX&&null!=C.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*C.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*C.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*C.style.entryX)/
20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*C.style.entryY)/20))}}function Bf(u,F){if(u.model.contains(F)&&null!=F.style&&""!=F.style){u=F.style.split(";");for(var C={},t=[],e=u.length-1;0<=e;e--){var N=u[e].split("=");if(2!=N.length||null==C[N[0]])C[N[0]]=N[1],""!=u[e]&&t.push(u[e])}F.style=t.reverse().join(";")+";"}}function Af(u,F){if(u.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var C=null,t=0;t<F.children.length;t++)if(F.children[t].vertex){var e=
F.children[t].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=C)return;C=F.children[t]}}F=C;if(null!=F&&(C=F.parent,""==u.convertValueToString(C))){if(null!=F.edges)for(t=0;t<F.edges.length;t++)F.edges[t].source==F&&F.edges[t].setTerminal(F.parent,!0),F.edges[t].target==F&&F.edges[t].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),t=0;t<e.length;t++)C.insert(e[t]);u.cellLabelChanged(C,u.convertValueToString(F));
C.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var u=new Graph;u.setExtendParents(!1);u.setExtendParentsOnAdd(!1);u.setConstrainChildren(!1);u.setHtmlLabels(!0);u.getModel().maintainEdgeParent=!1;return u}function Qd(u,F,C,t,e,N,r,q){this.nurbsValues=[1,3,0,0,100*(u+C),100-100*(1-(F+t)),0,1,100*(e+r),100-100*(1-(N+q)),0,1]}function Ke(u,F){try{for(var C=[],t=F.BoundingBox.w,e=F.BoundingBox.h,N=0;N<F.Shapes.length;N++){var r=
F.Shapes[N],q=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,U=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=U[Aa.p1].x,Ba=U[Aa.p1].y;ma=100*ma/t;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=U[Aa.p2].x,Ca=U[Aa.p2].y,ua=t,Na=e,Ka=new Qd(U[Aa.p1].x/t,U[Aa.p1].y/e,Aa.n1.x/t,Aa.n1.y/e,U[Aa.p2].x/t,U[Aa.p2].y/
Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=U[Aa.p2].x,Ba=U[Aa.p2].y,ma=100*ma/t,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>");C.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:q,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[u]={text:F.Text,w:t,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
stencils:C}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(u,F,C,t,e,N,r,q){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;r.insert(u);N=[u];C=C.clone();q.insertEdge(C,!1);u.insertEdge(C,!0);N.push(C);t.push(e.addCell(C,null,null,null,null))}function fb(u,F,C,t,e,N,r,q,Z){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;Z.insert(u);C=new mxCell("",new mxGeometry(C,t,0,0),"strokeColor=none;fillColor=none;");
C.vertex=!0;Z.insert(C);q=[C];e=e.clone();u.insertEdge(e,!0);C.insertEdge(e,!1);q.push(e);N.push(r.addCell(e,null,null,null,null))}function Sa(u,F,C,t,e,N){t.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";t.style+=c(t.style,e,N,t);F=m(e);t.vertex=!0;u=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+u+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
u.style+=c(u.style,e,N,u,G);u.geometry.relative=!0;u.geometry.offset=new mxPoint(5,-12);u.vertex=!0;t.insert(u)}function Wa(u,F,C,t,e,N,r,q){e="transparent"!=u?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";N.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";N.style+=c(N.style,r,q,N);N.value=m(r);N.vertex=!0;u=new mxCell(null,new mxGeometry(.5,0,.7*t*F,.7*t*C),e+u+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
u.geometry.relative=!0;u.geometry.offset=new mxPoint(-F*t*.35,10+(1-C)*t*.35);u.vertex=!0;u.style+=c(u.style,r,q,u,G);N.insert(u)}function Xc(u,F){return null!=u&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),u.includes(";"+F+"=")||u.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(u,F){function C(t){t=Math.round(parseInt("0x"+t)*F).toString(16);return 1==t.length?"0"+t:t}return"#"+C(u.substr(1,2))+C(u.substr(3,2))+C(u.substr(5,2))}function Ie(u,F,C){var t=g(u),e=t.Properties,
N=e.BoundingBox,r=Math.round(.75*N.w),q=Math.round(.75*N.h),Z=Math.round(.75*N.x+wc),aa=Math.round(.75*N.y+xc);null==u.Class||"GCPInputDatabase"!==u.Class&&"GCPInputRecord"!==u.Class&&"GCPInputPayment"!==u.Class&&"GCPInputGateway"!==u.Class&&"GCPInputLocalCompute"!==u.Class&&"GCPInputBeacon"!==u.Class&&"GCPInputStorage"!==u.Class&&"GCPInputList"!==u.Class&&"GCPInputStream"!==u.Class&&"GCPInputMobileDevices"!==u.Class&&"GCPInputCircuitBoard"!==u.Class&&"GCPInputLive"!==u.Class&&"GCPInputUsers"!==u.Class&&
new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=c(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=c(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"");v.style+=c(v.style,e,t,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+p(e[ma])+k(e[ma])+x(e[ma])+E(e[ma],v)+I(e[ma])+J(e[ma])+O(e[ma])+M(e[ma]))+L(e[ma])+H(e[ma]));for(var ya=0,za=[],Qb="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;":""),ea=e.Rotation=0;ea<Ka;ea++){if(null==Ba){var xb=parseFloat(e.Lanes[ea].p);
l=parseInt(e.Lanes[ea].tid)||ea;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[ea]/r,l=ea,Va=Ba[ea];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,q-vc,r*xb):new mxGeometry(rc,vc,r*xb,q-vc),Qb));za[ea].vertex=!0;v.insert(za[ea]);za[ea].value=m(e[Va]);za[ea].style+=c(za[ea].style,e,t,za[ea],G)+(G?"fontSize=13;":f(e[Va])+p(e[Va])+x(e[Va])+E(e[Va],za[ea])+I(e[Va])+J(e[Va])+O(e[Va])+M(e[Va]))+L(e[Va])+H(e[Va])+P(e[Pa+l])+Q(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
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(ea=0;ea<Gb;ea++){if(null==Lb){var Sd=.75*parseInt(e.Rows[ea].height);l=parseInt(e.Rows[ea].id)||ea;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[ea],Sb=Lb[ea];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+=c(Hc.style,e,t,Hc,G)+(G?"fontSize=13;":f(e[Sb])+p(e[Sb])+x(e[Sb])+E(e[Sb],
Hc)+I(e[Sb])+J(e[Sb])+O(e[Sb])+M(e[Sb]))+L(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(ea=Z=0;ea<Rb;ea++){if(null==$b){var Yc=.75*parseInt(e.Columns[ea].width);l=parseInt(e.Columns[ea].id)||ea;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[ea],Tb=$b[ea];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,q),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=c(Ic.style,e,t,Ic,G)+(G?"fontSize=13;":
f(e[Tb])+p(e[Tb])+x(e[Tb])+E(e[Tb],Ic)+I(e[Tb])+J(e[Tb])+O(e[Tb])+M(e[Tb]))+L(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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");var zb=
new mxCell("",new mxGeometry(0,25,r,q-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=c(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb)}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+=c(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,he,r,q-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
zb.value=m(e.Text,!0);zb.style+=c(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ha(e,t,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*q),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
!0,v.insert($c))}v.style+=c(v.style,e,t,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,q-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");
ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,e,t,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");ib.vertex=
hd.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,e,t,v);break;case "AndroidListItems":var Cb=q,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Cb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Cb/=bc);var W=[];Qa=[];for(l=0;l<bc;l++)W[l]=new mxCell("",
new mxGeometry(0,zc+l*Cb,r,Cb),"strokeColor=none;fillColor=none;"),W[l].vertex=!0,v.insert(W[l]),W[l].value=m(e["Item_"+l]),W[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Cb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,e,t,v);
new mxCell("",new mxGeometry(e.Selected*Hb+2,q-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,e,t,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,
0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,e,t,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=c(v.style,e,
t,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=c(v.style,e,t,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";
new mxGeometry(20,5,2,q-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,e,t,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,e,t,v);
break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,q-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,e,t,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*
r,.15*q,.7*r,.7*q),"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+=c(v.style,e,t,v);break;case "AndroidCheckBox":var ie=
null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-q,r,.8*q),"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+=c(v.style,e,t,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+=c(v.style,e,t,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,e,t,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),
"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,t):Ta[l].style+"fillColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=c(v.style,e,t,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),
Math.round(.5*q)),"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*q)),"strokeColor=none;"+ca(e,t));zd.vertex=!0;v.insert(zd);v.style+=c(v.style,e,t,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,e,t,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,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=c(v.style,e,t,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*q,.4*q,.4*q),"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+=c(v.style,e,t,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*
r,.2*q,.3*q,.5*q),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=c(v.style,e,t,v);0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),"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])+p(e["Tab_"+l])+x(e["Tab_"+l])+E(e["Tab_"+l])+I(e["Tab_"+l])+J(e["Tab_"+l])+O(e["Tab_"+l])+M(e["Tab_"+l])+L(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*q),"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,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*q),"strokeColor=none;fillColor=none;");
.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",
"strokeColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+p(e.text)+x(e.text))+H(e.text);v.style+=c(v.style,e,t,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=
!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=c(v.style,e,t,v,G);
var cb=new mxCell("",new mxGeometry(0,.4*q,r,.6*q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=
new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=c(v.style,e,t,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=
Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=
c(v.style,e,t,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+p(e.subtext)+x(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+
lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
Da=new mxCell("",new mxGeometry(0,0,r,.4*q),"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)+p(e.text)+x(e.text);Db=new mxCell("",new mxGeometry(0,.6*q,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Db.vertex=!0;v.insert(Db);Db.value=m(e["bottom-text"]);Db.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+p(e["bottom-text"])+x(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)+p(e.text)+x(e.text);v.style+=c(v.style,e,t,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var w=new mxCell("",new mxGeometry(0,0,.9*r,.9*q),"rounded=1;arcSize=3;part=1;");w.vertex=!0;v.insert(w);w.style+=K(e,t)+ca(e,t)+R(e,t,w)+X(e)+sa(e);var D=new mxCell("",new mxGeometry(.1*r,.1*q,.9*r,.9*
q),"rounded=1;arcSize=3;part=1;");D.vertex=!0;v.insert(D);D.value=m(e.Text);D.style+=K(e,t)+ca(e,t)+R(e,t,D)+X(e)+sa(e)+a(e,G);e.Future&&(w.style+="dashed=1;fixDash=1;",D.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+=K(e,t)+ca(e,t)+R(e,t,v)+X(e)+sa(e)+a(e,G);v.style+=c(v.style,e,t,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":w=
!0;v.insert(w);w.value=m(e.Text);w.style+=a(e,G);v.style+=c(v.style,e,t,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(0,.1*q,.9*r,.9*q),"part=1;");D.vertex=!0;v.insert(D);D.value=m(e.Text);D.style+=a(e.Text,G);D.style+=c(D.style,e,t,D,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*q,q),"shape=curlyBracket;rounded=1;");
Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*q,0,.25*q,q),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*q,0,r-.5*q,q),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);Bc.style+=R(e,t,Bc);Cc.style+=R(e,t,Cc);na.style+=p(e,na);Bc.style+=c(Bc.style,e,t,Bc);Cc.style+=c(Cc.style,e,t,Cc);na.style+=c(na.style,e,t,na,G);break;case "UMLTextBlock":v.value=
m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=c(v.style,e,t,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ha(e,t,v);e.Rotatio=null;var Vb=c(v.style,e,t,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,q),"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;"+c(v.style,e,t,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=ha(e,t,v);e.Rotatio=null;Vb=c(v.style,e,t,v,
w.geometry.offset=new mxPoint(4,5);break;case 7:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),w.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,t);Y=K(e,t);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");w.style+=Rc+Y+"part=1;"}else w.style+=ca(e,t)+K(e,t)+"part=1;";w.geometry.relative=!0;w.vertex=!0;v.insert(w)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
0!=e.bpmnActivityMarker2&&Bd++;var Eb=0;1==Bd?Eb=-7.5:2==Bd&&(Eb=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);Y=K(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",
new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+K(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}2==Bd&&(Eb=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,
-20);w.style+=ca(e,t)+K(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);
Y=K(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+K(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}v.style+=c(v.style,e,t,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+=
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+=c(v.style,e,t,v,G);break;case "BPMNChoreography":try{var ia=V(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+=c(v.style,e,t,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+=c(Dc.style,e,t,Dc,G);Wb+=pc;W=[];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);W[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;W[l].vertex=!0;v.insert(W[l]);W[l].style+=a(Ud,G);W[l].style+=c(W[l].style,e,t,W[l],G);
W[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&&(w=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),w.geometry.offset=new mxPoint(-6,-17),w.style+=ca(e,t)+K(e,t),w.geometry.relative=!0,w.vertex=!0,v.insert(w));v.style+=c(v.style,e,t,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+=c(v.style,e,t,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:w=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(-6,-15);w.style+=ca(e,t)+K(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);break;case 2:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");w.geometry.offset=new mxPoint(3,
3);w.style+=ca(e,t)+K(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);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:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),w.geometry.offset=new mxPoint(3,3),w.style+=K(e,t),w.geometry.relative=
!0,w.vertex=!0,v.insert(w),Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),w.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+=c(v.style,e,t,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,q),"fillColor=#000000;strokeColor=none;opacity=30;");
w.vertex=!0;v.insert(w);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,.95*r,.95*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.05*r,.05*q,.95*r,.95*q),"part=1;");D.vertex=!0;v.insert(D);D.value=m(e.Text);D.style+=a(e.Text,G);D.style+=c(D.style,e,t,D,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);
v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,.2*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Number);w.style+=a(e.Number,G);w.style+=c(w.style,e,t,w,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="+h(e.Photo)}v.value=Te;v.style+=c(v.style,e,t,v,!0);break;case "DefaultTableBlock":try{Gb=
"fillOpacity")||If;r=Cd[ea];var cf=q;Yc=r;for(var Nb=l+1;Nb<l+Xd.h;Nb++)if(null!=Vd[Nb]){cf+=Vd[Nb];Dd[Nb+","+ea]=!0;for(var Tc=ea+1;Tc<ea+Xd.w;Tc++)Dd[Nb+","+Tc]=!0}for(Nb=ea+1;Nb<ea+Xd.w;Nb++)if(null!=Cd[Nb])for(Yc+=Cd[Nb],Dd[l+","+Nb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Nb]=!0;var pa=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,V($e),
V(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;":""));pa.vertex=!0;pa.value=m(qc);pa.style+=c(pa.style,e,t,pa,G)+(G?"fontSize=13;":f(qc)+p(qc)+x(qc)+E(qc,pa)+I(qc)+J(qc)+O(qc)+M(qc))+L(qc)+H(qc);v.insert(pa);Z+=r}}aa+=q}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
"VSMDedicatedProcessBlock"==u.Class?v.value=m(e.Text):"VSMProductionControlBlock"==u.Class&&(v.value=m(e.Resources));v.style+=c(v.style,e,t,v,G);"VSMDedicatedProcessBlock"==u.Class&&(w=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(4,-13),w.vertex=!0,v.insert(w),w.style+=c(w.style,e,t,w));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+=c(v.style,e,t,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*q,.8*r,.6*q),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=c(Da.style,e,t,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=c("part=1;",e,t,v);0<bc&&(Cb/=bc);W=[];Qa=[];for(l=1;l<=bc;l++)W[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),ia),W[l].vertex=!0,v.insert(W[l]),W[l].value=m(e["cell_"+l]),W[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+=c(v.style,e,t,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=c("part=1;fillColor=none;",e,t,v);0<bc&&(Cb/=bc);W=[];Ub=[];for(l=1;l<=bc;l++)W[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ia),W[l].vertex=!0,v.insert(W[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"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+=c(v.style,e,t,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.17*r,.2*q,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");w.vertex=!0;v.insert(w);
w.style+=c(w.style,e,t,w);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.05*r,.1*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);D.vertex=!0;v.insert(D);D.style+=c(D.style,
e,t,D);var S=new mxCell("",new mxGeometry(0,.2*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);S.vertex=!0;v.insert(S);S.value=m(e.Text);S.style+=c(S.style,e,t,S,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,q),"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;C.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,35,40),
"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.Beanstalk?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),
D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.EC2?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),D.geometry.relative=
!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.Subnet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),D.geometry.relative=!0,D.geometry.offset=
new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.VPC?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,
0),D.vertex=!0,v.insert(D)):e.AWS?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):
e.Corporate?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):
(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+=c(v.style,e,t,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+=c(v.style,e,t,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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");pa.vertex=!0;v.insert(pa);var Oa=[pa];pa.style+=ca(e,t);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,C,Oa,v,pa);sc(.855*r,.145*q,va,F,C,Oa,v,pa);sc(r,.5*q,va,F,C,Oa,v,pa);sc(.855*r,.855*q,va,F,C,Oa,v,pa);sc(.5*r,q,va,F,C,Oa,v,pa);sc(.145*r,.855*q,va,F,C,Oa,v,pa);sc(0,.5*q,va,F,C,Oa,v,pa);sc(.145*r,.145*q,va,F,C,Oa,v,pa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(0,.5*q-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");
pa.vertex=!0;v.insert(pa);Oa=[pa];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=[pa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,C,Oa,v,pa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,q,va,F,C,Oa,v,pa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=c(v.style,e,t,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+=c(v.style,e,t,v,G);"EIMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==
new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==u.Class&&(w=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(-10,-7));w.geometry.relative=!0;w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);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*q,.85*r,.25*q,va,F,C,Oa,v,pa);break;
case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.07*q,.21*r,.86*q),"fillColor=#FFFF33;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.26*r,.09*q,.2*r,.82*q),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");D.vertex=!0;v.insert(D);D.style+=c(D.style,e,t,D);S=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
S.geometry.relative=!0;S.geometry.offset=new mxPoint(.4*-r,-10);S.vertex=!0;v.insert(S);S.style+=c(S.style,e,t,S);da=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;");da.geometry.relative=!0;da.edge=!0;w.insertEdge(da,!0);D.insertEdge(da,!1);da.style+=K(e,t);F.push(C.addCell(da,null,null,null,null));ba=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;");
ba.geometry.relative=!0;ba.edge=!0;D.insertEdge(ba,!0);S.insertEdge(ba,!1);F.push(C.addCell(ba,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+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);var Fd=
e.Messages,oe=(q-17)/Fd;D=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;D[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");D[l].vertex=!0;v.insert(D[l]);switch(u.Class){case "EIMessageBlock":D[l].value=m(e["message_"+(l+1)]);D.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":D[l].value="C";D[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":D[l].value="D";D[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":D[l].value="E",D[l].style+=
"fontStyle=1;fontSize=13;"}D[l].style+=c(D[l].style,e,t,D[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;w.insertEdge(va[l],!1);D[l].insertEdge(va[l],!0);va[l].style+=c(va[l].style,e,t,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(C.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.45*r,.25*q,.3*r,.5*q),"part=1;fillColor=#ffffff");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);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*q,.4*r,.5*q,va,F,C,Oa,v,pa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);var 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(.05*r,.5*q,.85*r,.5*q,da,F,C,Oa,v,pa);var ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.85*
r,.15*q,ba,F,C,Oa,v,pa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*q,.85*r,.85*q,xa,F,C,Oa,v,pa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
da.geometry.relative=!0;da.edge=!0;da.style+=K(e,t);fb(.05*r,.5*q,.95*r,.5*q,da,F,C,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ba.geometry.relative=!0;ba.edge=!0;ba.style+=K(e,t);fb(.3*r,.1*q,.3*r,.5*q,ba,F,C,Oa,v,pa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
xa.geometry.relative=!0;xa.edge=!0;xa.style+=K(e,t);fb(.7*r,.1*q,.7*r,.5*q,xa,F,C,Oa,v,pa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=K(e,t);fb(.5*r,.5*q,.5*r,.9*q,Ya,F,C,Oa,v,pa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,
e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.21*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);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(.45*r,.33*q,.8*r,.33*q,da,F,C,Oa,v,pa);D=new mxCell("",new mxGeometry(.64*r,.55*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");D.vertex=!0;v.insert(D);D.style+=c(D.style,
e,t,D);ba=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;");ba.geometry.relative=!0;ba.edge=!0;fb(.55*r,.67*q,.2*r,.67*q,ba,F,C,Oa,v,pa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.1*r,.15*q,.8*r,.7*q),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");w.vertex=!0;v.insert(w);
w.style+=c(w.style,e,t,w);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.04*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.2*r,.56*q,.2*r,.32*q),"part=1;");D.vertex=!0;v.insert(D);D.value="A";D.style+="fontStyle=1;fontSize=13;";w.style+=c(w.style,e,t,w);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;w.insertEdge(da,!1);D.insertEdge(da,!0);da.style+=c(da.style,e,t,da);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*q));da.geometry.points=Kc;F.push(C.addCell(da,null,null,null,null));S=new mxCell("",new mxGeometry(.6*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");S.vertex=!0;v.insert(S);S.style+=K(e,t)+sa(e);S.style+=c(S.style,e,t,S);ta=new mxCell("",new mxGeometry(.76*
r,.56*q,.2*r,.32*q),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=K(e,t)+R(e,t,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=c(ta.style,e,t,ta);ba=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;");ba.geometry.relative=!0;ba.edge=!0;S.insertEdge(ba,!1);ta.insertEdge(ba,!0);ba.style+=c(ba.style,e,t,ba);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*q));ba.geometry.points=
df;F.push(C.addCell(ba,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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=c(xa.style,e,t,xa);F.push(C.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("1",new mxGeometry(.2*r,.4*q,.1*r,.19*q),
"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("2",new mxGeometry(.45*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");D.vertex=!0;v.insert(D);D.style+=c(D.style,e,t,D);S=new mxCell("3",new mxGeometry(.7*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");S.vertex=!0;v.insert(S);S.style+=c(S.style,e,t,S);da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
w.insertEdge(da,!1);D.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.375*r,aa+.15*q)];da.geometry.relative=!0;da.edge=!0;da.style+=c(da.style,e,t,da);F.push(C.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");D.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.geometry.points=[new mxPoint(Z+.675*r,aa+.15*q)];ba.geometry.relative=!0;ba.edge=!0;ba.style+=c(ba.style,e,t,ba);F.push(C.addCell(ba,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.3*r,.2*q,.4*r,.6*q),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.38*r,.42*q,.24*r,.16*q),"part=1;fillColor=#aefe7d;");
w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*q),"part=1;");D.vertex=!0;v.insert(D);D.style+=c(D.style,e,t,D);S=new mxCell("",new mxGeometry(.76*r,.23*q,.24*r,.16*q),"");S.vertex=!0;v.insert(S);S.style=D.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*q,.24*r,.16*q),"");ta.vertex=!0;v.insert(ta);ta.style=D.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*q,.24*r,.16*q),"");Yd.vertex=!0;v.insert(Yd);Yd.style=D.style;var Zd=new mxCell("",new mxGeometry(0,
.61*q,.24*r,.16*q),"");Zd.vertex=!0;v.insert(Zd);Zd.style=D.style;var $d=new mxCell("",new mxGeometry(0,.23*q,.24*r,.16*q),"");$d.vertex=!0;v.insert($d);$d.style=D.style;da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(da,!1);D.insertEdge(da,!0);da.edge=!0;da.style+=c(da.style,e,t,da);F.push(C.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.edge=!0;ba.style+=c(ba.style,e,t,ba);
F.push(C.addCell(ba,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=c(xa.style,e,t,xa);F.push(C.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=c(Ya.style,e,t,Ya);F.push(C.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Lc,
!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=c(Lc.style,e,t,Lc);F.push(C.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=c(Mc.style,e,t,Mc);F.push(C.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);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*q,.6*r,.25*q,da,F,C,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.6*r,.75*q,ba,F,C,Oa,v,pa);w=new mxCell("",new mxGeometry(.7*r,.1*q,.15*r,.32*q),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"shape=mxgraph.eip.control_bus;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);S=new mxCell("",
new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");S.vertex=!0;v.insert(S);S.style+=c(S.style,e,t,S);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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=c(xa.style,e,t,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(C.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,
q-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+=c(ta.style,e,t,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;w.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=c(Ya.style,e,t,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+q-10)];F.push(C.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(q-75)/Fd;D=[];va=
[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,D[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),D[l].vertex=!0,D[l].value=m(e["message_"+(l+1)]),D.style+=a(e["message_"+(l+1)],G),v.insert(D[l]),D[l].style+=c(D[l].style,e,t,D[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,S.insertEdge(va[l],!1),D[l].insertEdge(va[l],!0),va[l].style+=c(va[l].style,e,t,va[l]),Kc=[],Kc.push(new mxPoint(Z+
r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(C.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,e,t,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=c(v.style,e,t,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+=c(v.style,e,t,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,r,.25*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)D[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*q,ff,.75*q),"ellipse;part=1;"),
D[l].vertex=!0,v.insert(D[l]),D[l].style+=c(D[l].style,e,t,D[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)w[l]=new mxCell("",new mxGeometry(gf*l,0,gf,q),"part=1;shape=mxgraph.floorplan.sink_2;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=c(w[l].style,e,t,w[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=.1*r/e.StallCount;w=new mxCell("",new mxGeometry(0,
0,Fb,q),"fillColor=#000000;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);var Ob=(r-Fb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=K(e,t);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=c(re,e,t,v);var se=c("",e,t,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,q),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),q-.92*(Ob-Fb),.9*(Ob-Fb),.92*(Ob-Fb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),
Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.2*(Ob-Fb),0,.6*(Ob-Fb),.8*(Ob-Fb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob,.42*q,.15*(Ob-Fb),.12*(Ob-Fb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=K(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=",
"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=c(Uc,e,t,v);da=new mxCell("",new mxGeometry(0,0,0,0),ae);da.geometry.relative=!0;da.edge=!0;fb(0,.5*q,.65*r,.5*q,da,F,C,Oa,v,pa);var fa=q/e.numLines;ba=[];var Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(.65*r,.5*q,.96*r,(l+.5)*fa,ba[l],F,C,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=
"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=K(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=c(Uc,e,t,v);fa=q/e.numLines;ba=[];Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(0,(l+.5)*fa,.96*r,(l+.5)*fa,ba[l],F,C,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),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+=c(v.style,e,t,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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.2*q,r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
w.vertex=!0;v.insert(w);w.style+=ia;w.style+=c(w.style,e,t,w);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=c(da.style,e,t,da),fb(0,0,0,.2*q,da,F,C,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=c(ba.style,e,t,ba),fb(r,.67*q,r,q,ba,F,C,Oa,v,pa)):(w.style+="flipH=1;",da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=
!0,da.edge=!0,da.style+=ia,da.style+=c(da.style,e,t,da),fb(0,0,0,.33*q,da,F,C,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=c(ba.style,e,t,ba),fb(r,.8*q,r,q,ba,F,C,Oa,v,pa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=c(xa.style,e,t,xa),fb(.2*r,.5*q,.8*r,.5*q,xa,F,C,Oa,v,pa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.2*q,.6*r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(u.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+=c(v.style,e,t,v);"PEIndicator2Block"==u.Class||"PESharedIndicator2Block"==u.Class?(w=new mxCell("",
new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(w=new mxCell("",new mxGeometry(0,0,r,.5*q),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,.5*q,r,.5*q),"part=1;strokeColor=none;fillColor=none;"));
D.vertex=!0;v.insert(D);D.value=m(e.BotText);D.style+=a(e.BotText,G);D.style+=c(D.style,e,t,D,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"==u.Class?1!=e.poweredHandOperated&&(te=!0):1!=
e.handOperated&&(te=!0);if(te){e=g(u).Properties;N=e.BoundingBox;var Sf=N.h;N.h="PEAngleValveBlock"==u.Class||"PEAngleGlobeValveBlock"==u.Class?.7*N.h:.6*N.h;v=new mxCell("",new mxGeometry(Math.round(.75*N.x+wc),Math.round(.75*(N.y+Sf-N.h)+xc),Math.round(.75*N.w),Math.round(.75*N.h)),"");v.vertex=!0;yb(v,u,C)}if("PEPoweredValveBlock"==u.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=c(v.style,e,t,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",
w=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*q),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),w.vertex=!0,v.insert(w),w.value=m(e.PoweredText),w.style+=(G?"":p(e.PoweredText)+x(e.PoweredText)+E(e.PoweredText)+I(e.PoweredText)+J(e.PoweredText)+M(e.PoweredText)+L(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),w.style+=c(w.style,e,t,w,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(u.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+=c(v.style,e,t,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,t,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)+p(e.Title)+x(e.Title));1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,t,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=c(w.style,e,t,w,G);D=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");D.geometry.relative=!0;D.geometry.offset=new mxPoint(-25,-10);
D.vertex=!0;w.insert(D);1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(-20,30),S.vertex=!0,v.insert(S),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+=c(v.style,e,t,v);e.Text=null;break;case "UI2AccordionBlock":w=[];fa=25;for(l=0;l<=e.Panels-1;l++)w[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"):
l==e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,q-(e.Panels-e.Selected)*fa+(l-e.Selected)*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Panel_"+(l+1)]),w[l].style+=a(e["Panel_"+(l+1)],G),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=5;");var Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?
new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-20-(e.Panels-e.Selected)*fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,e.Selected*fa),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",D.style+=Ua,D.style+=c(D.style,
e,t,D));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*fa),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=c(S.style,e,t,S));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-
20-(e.Panels-e.Selected)*fa),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"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+=c(v.style,e,t,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];D=[];fa=25;var Ib=3,Ha=(r+Ib)/
(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),""),D[l].vertex=!0,v.insert(D[l])):(w[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=
!0,w[l].insert(D[l])),D[l].value=m(e["Tab_"+(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G),0>D[l].style.indexOf(";align=")&&(D[l].style+="align=left;spacingLeft=2;"),D[l].style+=c(D[l].style,e,t,D[l]);Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,fa),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",D.style+=Ua,D.style+=c(D.style,e,t,D));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=
Ua,S.style+=c(S.style,e,t,S));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];D=[];fa=25;Ib=3;Ha=(r+Ib)/e.Tabs;hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),""),D[l].vertex=!0,v.insert(D[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=
c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l])),D[l].value=m(e["Tab_"+(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G),0>D[l].style.indexOf(";align=")&&(D[l].style+="align=left;spacingLeft=2;");Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,fa),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",D.style+=Ua,D.style+=c(D.style,e,t,D));1==e.hScroll&&(S=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;"),
S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=c(S.style,e,t,S));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];D=[];Ib=3;fa=25+Ib;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,q),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),""),D[l].vertex=!0,v.insert(D[l]),D[l].value=m(e["Tab_"+
(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G)):(w[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha,fa-Ib),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].value=m(e["Tab_"+(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G)),0>D[l].style.indexOf(";align=")&&(D[l].style+="align=left;spacingLeft=2;"),D[l].style+=c(D[l].style,
e,t,D[l]);Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,0),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",
D.style+=Ua,D.style+=c(D.style,e,t,D));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=c(S.style,e,t,S));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
fa=q/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,l*fa+.5*fa-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2,
2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=c(D[l].style,e,t,D[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=
a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=c(D[l].style,e,t,D[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";fa=q/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,
l*fa+.5*fa-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=
c(D[l].style,e,t,D[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=K(e,t),
Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=c(D[l].style,e,t,D[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"==u.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=c(v.style,e,t,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(0,0,.6*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Date);w.style+=a(e.Date,G);v.style+=c(v.style,e,t,v);Y=K(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");D=new mxCell("",new mxGeometry(.75*r,0,.25*r,q),"part=1;shape=mxgraph.gmdl.calendar;");
D.vertex=!0;v.insert(D);D.style+=Y;D.style+=c(D.style,e,t,D);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+=c(v.style,e,t,v,G);break;case "UI2NumericStepperBlock":Y=K(e,t);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+=c(v.style,e,t,v,G);break;case "UI2TableBlock":try{kb=V(e.FillColor);var Kd=V(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:V(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:V(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
e["Cell_"+l+"_"+ea],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?V(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[ea])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=c(v.style,e,t,v);w=[];D=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),""),D[l].vertex=!0,v.insert(D[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"strokeColor=none;"),
w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l])),D[l].value=m(e["Button_"+(l+1)]),D[l].style+=a(e["Button_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,e,t,v);w=[];D=[];fa=q/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),""),D[l].vertex=!0,v.insert(D[l])):
(w[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,r,fa),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l])),D[l].value=m(e["Button_"+(l+1)]),D[l].style+=a(e["Button_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=[];D=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=
l?(D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),D[l].style+=c(D[l].style,e,t,D[l])):D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),D[l].vertex=!0,v.insert(D[l]),D[l].value=m(e["Link_"+(l+1)]),D[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=[];D=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)w[l]=new mxCell("",new mxGeometry(l*
Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Link_"+(l+1)]),w[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)D[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),D[l].geometry.relative=!0,D[l].geometry.offset=new mxPoint(-3,-5),D[l].vertex=!0,v.insert(D[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);w=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)w[l]=l!=e.Selected-
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+=c(v.style,e,t,v);W=[];nb=[];var jd=[];fa=q/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+p(e["Item_"+(l+1)])+x(e["Item_"+(l+1)])),W[l]=new mxCell("",new mxGeometry(0,l*q/e.Lines,r,fa),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),
W[l].vertex=!0,v.insert(W[l]),W[l].style+=ia,W[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=W[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,W[l].insert(nb[l]),Y=K(e,t),
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)])+p(e["Shortcut_"+(l+1)])+x(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*q/e.Lines,.4*r,fa),"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]&&(W[l]=new mxCell("",new mxGeometry(.05*r,l*q/e.Lines,.9*
r,fa),"shape=line;strokeWidth=1;"),W[l].vertex=!0,v.insert(W[l]),W[l].style+=K(e,t));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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=c(w.style,e,t,w,G);D=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");D.geometry.relative=!0;D.geometry.offset=
new mxPoint(-25,-10);D.vertex=!0;w.insert(D);var Uf=45*e.Buttons+(10*e.Buttons-1);S=[];for(l=0;l<e.Buttons;l++)S[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),S[l].geometry.relative=!0,S[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),S[l].vertex=!0,v.insert(S[l]),S[l].value=m(e["Button_"+(l+1)]),S[l].style+=a(e["Button_"+(l+1)],G),S[l].style+=c(S[l].style,e,t,S[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,t);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+=c(v.style,e,t,v,G);W=[];var ue=[],wb=db/q;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])),fa=0,0==e.Attributes?fa=l=1:l<e.Attributes?(fa=e["Text"+(l+1)+"Percent"],wb+=fa):fa=1-wb,pc=Math.round((q-db)*fa)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),W[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,W[l].vertex=!0,v.insert(W[l]),W[l].style+=
ia+R(e,t,W[l])+a(e["Text"+(l+1)],G),W[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+=c(v.style,e,t,v,G);break;case "ERDEntityBlock":ia=ca(e,t);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+=c(v.style,e,t,v,G);e.ShadedHeader?(ia=V(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,t);W=[];wb=db/q;Wb=db;for(l=0;l<e.Fields;l++)fa=0,pc=.75*e["Field"+(l+1)+"_h"],W[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,W[l].vertex=!0,v.insert(W[l]),
W[l].style+=ia+a(e["Field"+(l+1)],G),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;opacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,t);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,t);v.style+=c(v.style,e,t,v,G);W=[];var Ga=[];wb=db;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+R(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),W[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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;"),W[l].vertex=!0,v.insert(W[l]),W[l].style+=
ia+a(e["Field"+(l+1)],G),v.style+=c(v.style,e,t,v),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;fillOpacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=c(v.style,e,t,v,G);W=[];Ga=[];wb=db;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+R(e,t,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=c(Ga[l].style,e,t,Ga[l],G),W[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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;"),
W[l].vertex=!0,v.insert(W[l]),W[l].style+=ia+a(e["Type"+(l+1)],G),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;fillOpacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Type"+(l+1)]),W[l].style+=c(W[l].style,e,t,W[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=c(v.style,e,t,v,G);W=[];Ga=[];var Kb=[];wb=db;Jb=30;var ce=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+R(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=c(Ga[l].style,e,t,Ga[l],G),W[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-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;"),
W[l].vertex=!0,v.insert(W[l]),W[l].style+=ia+a(e["Field"+(l+1)],G),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;fillOpacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Field"+(l+1)]),W[l].style+=c(W[l].style,e,t,W[l],G),Kb[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;"),
Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ia+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+R(e,t,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=c(Kb[l].style,e,t,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,q,v,e,t);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,q,v,e,t);break;case "GCPServiceCardBlankBlock":Sa("blank",
1,.66,r,q,v,e,t);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,q,v,e,t);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,q,v,e,t);break;case "GCPInputRetail":Wa("retail",1,.89,r,q,v,e,t);break;case "GCPInputReport":Wa("report",1,1,r,q,v,e,t);break;case "GCPInputPhone":Wa("phone",.64,1,r,q,v,e,t);break;case "GCPInputBlank":Wa("transparent",1,1,r,q,v,e,t);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=c(v.style,
e,t,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,q)*.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="+h(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==U.indexOf("Bracket")?"size=0;arcSize=50;":"",of=c(v.style,e,t,v,G);mb=ha(e,t,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:q),100),xe=
new mxCell("",new mxGeometry(0,0,we,q),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,q),"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+=c(v.style,e,t,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=
"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,q),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=c(kd.style,e,t,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=ha(e,t,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
e.LineWidth);pa.style+=c(pa.style,ob,t,pa,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;pa.style+=c(pa.style,e,t,pa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;pa.vertex=!0;pa.geometry.relative=!0;v.insert(pa)}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,q),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=
c(ra.style,pf,t,ra,G);ra.style+=c(ra.style,e,t,ra,G);e.Rotation=mb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var eb=Pb.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+=c(ra.style,eb,t,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Pb.w);eb.h&&(Yb.height*=eb.h/Pb.h);eb.x&&(Yb.x=eb.x/Pb.w);eb.y&&(Yb.y=eb.y/Pb.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/q);eb.fx&&(Yb.x=(0<
eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/q)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,q),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*q/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=c(v.style,
e,t,v,G);break;case "DoubleArrowBlock":ze=e.Head*q/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=c(v.style,e,t,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(U){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld=
30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=c(v.style,e,t,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(ea=0;ea<e.Vertices.length;ea++)Qa=e.Vertices[ea],0==ea?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+=c(v.style,e,t,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="+V(od)+";"+oa(od,"fillOpacity");v.style+=c(v.style,e,t,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+V(kb)+";"+oa(kb,"fillOpacity"));ab.style+=c(ab.style,e,t,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="+V(kb)+";"+oa(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=c(v.style,e,t,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="+V(od)+";"+oa(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=c(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
V(od)+";"+oa(od,"fillOpacity"),v.style+=c(v.style,e,t,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,q),"strokeColor=none;fillColor="+V(kb)+";"+oa(kb,"fillOpacity")),ab.style+=c(ab.style,e,t,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+=c(v.style,e,t,v,G);break;case "PersonRoleBlock":try{ia=ca(e,t);db=q/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+=c(v.style,
e,t,v,G);var Ec=new mxCell("",new mxGeometry(0,q/2,r,q/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+=c(Ec.style,e,t,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);ka(v,e,C);e.Hidden&&(v.visible=!1);return v}function Ge(u,F){if(F.Text_TRotation||F.TextRotation)try{var C=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(C)&&0!=C&&u.value){var t=u.geometry.width,e=u.geometry.height,N=t,r=e,q=0,Z=0;if(-90==C||-270==C){N=e;r=t;var aa=(e-t)/2;q=-aa/t;Z=aa/e}C+=mxUtils.toDegree(F.Rotation);var U=u.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&
0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(u.value,new mxGeometry(q,Z,N,r),U+"fillColor=none;strokeColor=none;rotation="+C+";");u.value=null;wa.geometry.relative=!0;wa.vertex=!0;u.insert(wa)}}catch(ja){console.log(ja)}}function Je(u,F,C,t,e){function N(Lb,$b){var Xa="";try{for(var pb=0;pb<Lb.text.length;pb++){var Nc=Lb.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:"+A(.75*Gc)+"px;";break;case "color":Xa+="color:"+T(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+T(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Lb,$b,Xa){Lb=Aa+Lb;ra[Lb]=$b;$b="";for(var pb=0;pb<U.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[U[pb]]||"&nbsp;")+"</div>";pb=
mxUtils.getSizeForString($b);Xa=h(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[Lb]=Xa;t.addCell(Xa,aa)},q=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;t.addCell(aa);var U=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||
{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(u||Date.now())+"_";4==q&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=c("",ja.props,{},aa,!0);0==q?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==q||2==q?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=q&&(Ca=!1);for(u=0;u<U.length;u++)ma.push(N(ja,U[u]));if(C.Items)for(var Na=C.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(u=0;u<U.length;u++)U[u]=Ia.f[U[u]]||U[u]}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(u=0;u<U.length;u++)U[u]=l[Ka].nfs[U[u]]||U[u];var Ea;for(Ea in C){La=C[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&
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(u){return Math.round(100*this.nurbsValues[4*(u+1)])/100};Qd.prototype.getY=function(u){return Math.round(100*this.nurbsValues[4*(u+1)+1])/100};LucidImporter.importState=function(u,F,C){function t(q){null!=q.state&&EditorUi.debug("convertLucidChart addPages",
q);if(q.Properties){for(var Z in q.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),q.Properties[Z]);LucidImporter.globalProps=q.Properties}for(var aa in q.Pages)Z=q.Pages[aa],Z.id=aa,Z.Data=q.Data,e.push(Z);e.sort(function(U,wa){return U.Properties.Order<wa.Properties.Order?-1:U.Properties.Order>wa.Properties.Order?1:0});for(q=0;q<e.length;q++)LucidImporter.pageIdsMap[e[q].id]=q}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=C;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())+'">'];C&&C.transparentEdgeLabels&&(ge=ge.replace("labelBackgroundColor=default;",
"labelBackgroundColor=none;"));var e=[];null!=u.state?t(JSON.parse(u.state)):null==u.Page&&null!=u.Pages?t(u):e.push(u);u=Df();C=new mxCodec;for(var N=0;N<e.length;N++){F.push("<diagram");null!=e[N].Properties&&null!=e[N].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[N].Properties.Title)+'"');F.push(' id="'+N+'"');zf(u,e[N],!0);var r=C.encode(u.getModel());null!=e[N].Properties&&(e[N].Properties.FillColor&&"#ffffff"!=e[N].Properties.FillColor&&r.setAttribute("background",V(e[N].Properties.FillColor)),
e[N].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[N].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[N].Properties.Size.w),r.setAttribute("pageHeight",.75*e[N].Properties.Size.h)),null!=e[N].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[N].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);u.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=
null;return F.join("")}})();function VsdxExport(h){function y(H,K){var P={"[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>",
Q;for(Q in P)if(1<K&&Q==J.CONTENT_TYPES_XML){for(var R=mxUtils.parseXml(P[Q]),ha=R.documentElement,X=ha.children,T=null,V=0;V<X.length;V++){var oa=X[V];"/visio/pages/page1.xml"==oa.getAttribute(J.PART_NAME)&&(T=oa)}for(V=2;V<=K;V++)X=T.cloneNode(),X.setAttribute(J.PART_NAME,"/visio/pages/page"+V+".xml"),ha.appendChild(X);z(H,Q,R,!0)}else H.file(Q,P[Q])}function A(H,K,P){return null!=H.createElementNS?H.createElementNS(K,P):H.createElement(P)}function B(H){var K=M[H];null==K&&(K=L++,M[H]=K);return K}
function m(H){var K={};try{var P=H.getGraphBounds().clone(),Q=H.view.scale,R=H.view.translate,ha=Math.round(P.x/Q)-R.x,X=Math.round(P.y/Q)-R.y,T=H.pageFormat.width,V=H.pageFormat.height;0>ha&&(ha+=Math.ceil((R.x-P.x/Q)/T)*T);0>X&&(X+=Math.ceil((R.y-P.y/Q)/V)*V);var oa=Math.max(1,Math.ceil((P.width/Q+ha)/T)),ca=Math.max(1,Math.ceil((P.height/Q+X)/V));K.gridEnabled=H.gridEnabled;K.gridSize=H.gridSize;K.guidesEnabled=H.graphHandler.guidesEnabled;K.pageVisible=H.pageVisible;K.pageScale=H.pageScale;K.pageWidth=
H.pageFormat.width*oa;K.pageHeight=H.pageFormat.height*ca;K.backgroundClr=H.background;K.mathEnabled=H.mathEnabled;K.shadowVisible=H.shadowVisible}catch(qa){}return K}function g(H,K,P,Q){return b(H,K/J.CONVERSION_FACTOR,P,Q)}function b(H,K,P,Q){P=A(P,J.XMLNS,"Cell");P.setAttribute("N",H);P.setAttribute("V",K);Q&&P.setAttribute("F",Q);return P}function a(H,K,P,Q,R){var ha=A(R,J.XMLNS,"Row");ha.setAttribute("T",H);ha.setAttribute("IX",K);ha.appendChild(g("X",P,R));ha.appendChild(g("Y",Q,R));return ha}
function c(H,K,P){var Q=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(Q&&"none"!=Q){if(K.appendChild(b("FillForegnd",Q,P)),(Q=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=Q){K.appendChild(b("FillBkgnd",Q,P));Q=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var R=28;if(Q)switch(Q){case mxConstants.DIRECTION_EAST:R=25;break;case mxConstants.DIRECTION_WEST:R=27;break;case mxConstants.DIRECTION_NORTH:R=30}K.appendChild(b("FillPattern",R,P))}}else K.appendChild(b("FillPattern",
0,P));(Q=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=Q?K.appendChild(b("LineColor",Q,P)):K.appendChild(b("LinePattern",0,P));(Q=H.style[mxConstants.STYLE_STROKEWIDTH])&&K.appendChild(g("LineWeight",Q,P));(R=H.style[mxConstants.STYLE_OPACITY])?Q=R:(Q=H.style[mxConstants.STYLE_FILL_OPACITY],R=H.style[mxConstants.STYLE_STROKE_OPACITY]);Q&&K.appendChild(b("FillForegndTrans",1-parseInt(Q)/100,P));R&&K.appendChild(b("LineColorTrans",1-parseInt(R)/100,P));if(1==H.style[mxConstants.STYLE_DASHED]){Q=
H.style[mxConstants.STYLE_DASH_PATTERN];R=9;if(Q)switch(Q){case "1 1":R=10;break;case "1 2":R=3;break;case "1 4":R=17}K.appendChild(b("LinePattern",R,P))}1==H.style[mxConstants.STYLE_SHADOW]&&(K.appendChild(b("ShdwPattern",1,P)),K.appendChild(b("ShdwForegnd","#000000",P)),K.appendChild(b("ShdwForegndTrans",.6,P)),K.appendChild(b("ShapeShdwType",1,P)),K.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",P)),K.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",P)),K.appendChild(b("ShapeShdwScaleFactor",
"1",P)),K.appendChild(b("ShapeShdwBlur","0.05555555555555555",P)),K.appendChild(b("ShapeShdwShow",2,P)));1==H.style[mxConstants.STYLE_FLIPH]&&K.appendChild(b("FlipX",1,P));1==H.style[mxConstants.STYLE_FLIPV]&&K.appendChild(b("FlipY",1,P));1==H.style[mxConstants.STYLE_ROUNDED]&&K.appendChild(g("Rounding",.1*H.cell.geometry.width,P));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&K.appendChild(b("TextBkgnd",H,P))}function d(H,K,P,Q,R,ha){var X=A(Q,J.XMLNS,"Shape");X.setAttribute("ID",
H);X.setAttribute("NameU","Shape"+H);X.setAttribute("LineStyle","0");X.setAttribute("FillStyle","0");X.setAttribute("TextStyle","0");H=K.width/2;var T=K.height/2;X.appendChild(g("PinX",K.x+H+(ha?0:O.shiftX),Q));X.appendChild(g("PinY",R-K.y-T-(ha?0:O.shiftY),Q));X.appendChild(g("Width",K.width,Q));X.appendChild(g("Height",K.height,Q));X.appendChild(g("LocPinX",H,Q));X.appendChild(g("LocPinY",T,Q));X.appendChild(b("LayerMember",P+"",Q));return X}function f(H,K){H=J.ARROWS_MAP[(null==H?"none":H)+"|"+
(null==K?"1":K)];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,K,P,Q,R,ha){var X=P.view.getState(H,!0);if(null==X||null==X.absolutePoints||null==X.cellBounds)return null;P=A(Q,J.XMLNS,"Shape");var T=B(H.id);P.setAttribute("ID",T);P.setAttribute("NameU","Dynamic connector."+T);P.setAttribute("Name","Dynamic connector."+T);P.setAttribute("Type","Shape");P.setAttribute("Master","4");var V=O.state;T=X.absolutePoints;var oa=X.cellBounds,ca=
oa.width/2,qa=oa.height/2;P.appendChild(g("PinX",oa.x+ca+(ha?0:O.shiftX),Q));P.appendChild(g("PinY",R-oa.y-qa-(ha?0:O.shiftY),Q));P.appendChild(g("Width",oa.width,Q));P.appendChild(g("Height",oa.height,Q));P.appendChild(g("LocPinX",ca,Q));P.appendChild(g("LocPinY",qa,Q));O.newEdge(P,X,Q);ca=function(sa,Fa,ka){var Za=sa.x;sa=sa.y;Za=Za*V.scale-oa.x+V.dx+(ka||ha?0:O.shiftX);sa=(Fa?0:oa.height)-sa*V.scale+oa.y-V.dy-(ka||ha?0:O.shiftY);return{x:Za,y:sa}};qa=ca(T[0],!0);P.appendChild(g("BeginX",oa.x+qa.x,
Q,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));P.appendChild(g("BeginY",R-oa.y+qa.y,Q,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(T[T.length-1],!0);P.appendChild(g("EndX",oa.x+qa.x,Q,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));P.appendChild(g("EndY",R-oa.y+qa.y,Q,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));P.appendChild(b("BegTrigger","2",Q,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));P.appendChild(b("EndTrigger","2",Q,H.target?"_XFTRIGGER(Sheet."+
B(H.target.id)+"!EventXFMod)":null));P.appendChild(b("ConFixedCode","6",Q));P.appendChild(b("LayerMember",K+"",Q));c(X,P,Q);K=X.style[mxConstants.STYLE_STARTSIZE];H=f(X.style[mxConstants.STYLE_STARTARROW],X.style[mxConstants.STYLE_STARTFILL]);P.appendChild(b("BeginArrow",H,Q));P.appendChild(b("BeginArrowSize",k(K),Q));K=X.style[mxConstants.STYLE_ENDSIZE];H=f(X.style[mxConstants.STYLE_ENDARROW],X.style[mxConstants.STYLE_ENDFILL]);P.appendChild(b("EndArrow",H,Q));P.appendChild(b("EndArrowSize",k(K),
Q));null!=X.text&&X.text.checkBounds()&&(O.save(),X.text.paint(O),O.restore());X=A(Q,J.XMLNS,"Section");X.setAttribute("N","Geometry");X.setAttribute("IX","0");for(H=0;H<T.length;H++)K=ca(T[H],!1,!0),X.appendChild(a(0==H?"MoveTo":"LineTo",H+1,K.x,K.y,Q));X.appendChild(b("NoFill","1",Q));X.appendChild(b("NoLine","0",Q));P.appendChild(X);return P}function p(H,K,P,Q,R,ha,X){var T=H.geometry,V=T;if(null!=T)try{T.relative&&ha&&(V=T.clone(),T.x*=ha.width,T.y*=ha.height,H.vertex&&null!=T.offset&&(T.x+=T.offset.x,
T.y+=T.offset.y),T.relative=0);var oa=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(oa+"10000",T,K,Q,R,X);ca.setAttribute("Type","Group");var qa=A(Q,J.XMLNS,"Shapes");O.save();O.translate(-T.x,-T.y);var sa=T.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=p(H,K,P,Q,T.height,T,!0);delete H.treatAsSingle;H.setGeometry(T);null!=Fa&&qa.appendChild(Fa);for(R=0;R<H.getChildCount();R++)Fa=p(H.children[R],K,P,Q,T.height,T,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);
O.restore();return ca}if(H.vertex){ca=d(oa,T,K,Q,R,X);var ka=P.view.getState(H,!0);null!=ka&&(c(ka,ca,Q),O.newShape(ca,ka,Q),null!=ka.text&&ka.text.checkBounds()&&(O.save(),ka.text.paint(O),O.restore()),null!=ka.shape&&ka.shape.checkBounds()&&(O.save(),ka.shape.paint(O),O.restore()),ca.appendChild(O.getShapeGeo()),O.endShape(),ca.setAttribute("Type",O.getShapeType()));return ca}return n(H,K,P,Q,R,X)}finally{H.geometry=V}else return null}function x(H,K){var P=mxUtils.createXmlDocument(),Q=A(P,J.XMLNS,
"PageContents");Q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",J.XMLNS);Q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",J.XMLNS_R);var R=A(P,J.XMLNS,"Shapes");Q.appendChild(R);var ha=H.model,X=H.view.translate,T=H.view.scale,V=H.getGraphBounds();O.shiftX=0;O.shiftY=0;if(V.x/T<X.x||V.y/T<X.y)O.shiftX=Math.ceil((X.x-V.x/T)/H.pageFormat.width)*H.pageFormat.width,O.shiftY=Math.ceil((X.y-V.y/T)/H.pageFormat.height)*H.pageFormat.height;O.save();O.translate(-X.x,-X.y);O.scale(1/T);O.newPage();
T=H.model.getChildCells(H.model.root);X={};for(V=0;V<T.length;V++)X[T[V].id]=V;for(var oa in ha.cells)T=ha.cells[oa],V=null!=T.parent?X[T.parent.id]:null,null!=V&&(T=p(T,V,H,P,K.pageHeight),null!=T&&R.appendChild(T));H=A(P,J.XMLNS,"Connects");Q.appendChild(H);for(oa in ha.cells)T=ha.cells[oa],T.edge&&(T.source&&(K=A(P,J.XMLNS,"Connect"),K.setAttribute("FromSheet",B(T.id)),K.setAttribute("FromCell","BeginX"),K.setAttribute("ToSheet",B(T.source.id)),H.appendChild(K)),T.target&&(K=A(P,J.XMLNS,"Connect"),
K.setAttribute("FromSheet",B(T.id)),K.setAttribute("FromCell","EndX"),K.setAttribute("ToSheet",B(T.target.id)),H.appendChild(K)));P.appendChild(Q);O.restore();return P}function z(H,K,P,Q){H.file(K,(Q?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(P,"\n"))}function E(H,K,P,Q){var R=mxUtils.createXmlDocument(),ha=mxUtils.createXmlDocument(),X=A(R,J.XMLNS,"Pages");X.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",J.XMLNS);X.setAttributeNS("http://www.w3.org/2000/xmlns/",
"xmlns:r",J.XMLNS_R);var T=A(ha,J.RELS_XMLNS,"Relationships"),V=1,oa;for(oa in K){var ca="page"+V+".xml",qa=A(R,J.XMLNS,"Page");qa.setAttribute("ID",V-1);qa.setAttribute("NameU",oa);qa.setAttribute("Name",oa);var sa=A(R,J.XMLNS,"PageSheet"),Fa=Q[oa];sa.appendChild(g("PageWidth",Fa.pageWidth,R));sa.appendChild(g("PageHeight",Fa.pageHeight,R));sa.appendChild(b("PageScale",Fa.pageScale,R));sa.appendChild(b("DrawingScale",1,R));Fa=A(R,J.XMLNS,"Rel");Fa.setAttributeNS(J.XMLNS_R,"r:id","rId"+V);var ka=
A(R,J.XMLNS,"Section");ka.setAttribute("N","Layer");for(var Za=P[oa],yb=0;yb<Za.length;yb++){var vb=A(R,J.XMLNS,"Row");vb.setAttribute("IX",yb+"");ka.appendChild(vb);vb.appendChild(b("Name",Za[yb].name,R));vb.appendChild(b("Color","255",R));vb.appendChild(b("Status","0",R));vb.appendChild(b("Visible",Za[yb].visible?"1":"0",R));vb.appendChild(b("Print","1",R));vb.appendChild(b("Active","0",R));vb.appendChild(b("Lock",Za[yb].locked?"1":"0",R));vb.appendChild(b("Snap","1",R));vb.appendChild(b("Glue",
"1",R));vb.appendChild(b("NameUniv",Za[yb].name,R));vb.appendChild(b("ColorTrans","0",R))}sa.appendChild(ka);qa.appendChild(sa);qa.appendChild(Fa);X.appendChild(qa);qa=A(ha,J.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+V);qa.setAttribute("Type",J.PAGES_TYPE);qa.setAttribute("Target",ca);T.appendChild(qa);z(H,J.VISIO_PAGES+ca,K[oa]);V++}R.appendChild(X);ha.appendChild(T);z(H,J.VISIO_PAGES+"pages.xml",R);z(H,J.VISIO_PAGES+"_rels/pages.xml.rels",ha)}function I(H,K){K=J.VISIO_PAGES_RELS+"page"+
K+".xml.rels";var P=mxUtils.createXmlDocument(),Q=A(P,J.RELS_XMLNS,"Relationships"),R=A(P,J.RELS_XMLNS,"Relationship");R.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");R.setAttribute("Id","rId1");R.setAttribute("Target","../masters/master1.xml");Q.appendChild(R);var ha=O.images;if(0<ha.length)for(var X=0;X<ha.length;X++)R=A(P,J.RELS_XMLNS,"Relationship"),R.setAttribute("Type",J.XMLNS_R+"/image"),R.setAttribute("Id","rId"+(X+2)),R.setAttribute("Target","../media/"+
ha[X]),Q.appendChild(R);P.appendChild(Q);z(H,K,P)}var J=this,O=new mxVsdxCanvas2D,M={},L=1;this.exportCurrentDiagrams=function(H){try{if(h.spinner.spin(document.body,mxResources.get("exporting"))){var K=function(Fa,ka){Fa=Fa.model.getChildCells(Fa.model.root);R[ka]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&R[ka].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},P=new JSZip;O.init(P);M={};L=1;var Q={},R={},ha={},X=null!=
h.pages?h.pages.length:1;if(null!=h.pages){var T=function(Fa){Fa=Fa.getName();var ka=h.editor.graph,Za=null;null!=ka.themes&&"darkTheme"==ka.defaultThemeName&&(Za=ka.stylesheet,ka.stylesheet=ka.getDefaultStylesheet(),ka.refresh());try{var yb=m(ka);Q[Fa]=x(ka,yb);K(ka,Fa);I(P,ca+1);ha[Fa]=yb}finally{null!=Za&&(ka.stylesheet=Za,ka.refresh())}},V=h.editor.graph.getSelectionCells(),oa=h.currentPage;if(H)T(oa);else{for(var ca=0;ca<h.pages.length;ca++){var qa=h.pages[ca];h.currentPage!=qa&&h.selectPage(qa,
!0);T(qa)}oa!=h.currentPage&&h.selectPage(oa,!0);h.editor.graph.setSelectionCells(V)}}else{T=h.editor.graph;var sa=m(T);Q.Page1=x(T,sa);K(T,"Page1");I(P,1);ha.Page1=sa}y(P,X);E(P,Q,R,ha);H=function(){P.generateAsync({type:"base64"}).then(function(Fa){h.spinner.stop();var ka=h.getBaseFilename();h.saveData(ka+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<O.filesLoading?O.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),h.spinner.stop(),!1}}}
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(h){this.filesLoading=0;this.zip=h};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(h){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,h):this.xmlDoc.createElement(h)};
mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var h=this.createElt("Section");h.setAttribute("N","Geometry");h.setAttribute("IX",this.geoIndex++);this.geoSec=h;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(h,y,A){this.geoIndex=0;this.shape=h;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=A;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
mxVsdxCanvas2D.prototype.newEdge=function(h,y,A){this.shape=h;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=A};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};
mxVsdxCanvas2D.prototype.createCellElemScaled=function(h,y,A){return this.createCellElem(h,y/VsdxExport.prototype.CONVERSION_FACTOR,A)};mxVsdxCanvas2D.prototype.createCellElem=function(h,y,A){var B=this.createElt("Cell");B.setAttribute("N",h);B.setAttribute("V",y);A&&B.setAttribute("F",A);return B};
mxVsdxCanvas2D.prototype.createRowScaled=function(h,y,A,B,m,g,b,a,c,d,f,k,n,p){return this.createRowRel(h,y,A/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,g/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,c,d,f,k,n,p)};
mxVsdxCanvas2D.prototype.createRowRel=function(h,y,A,B,m,g,b,a,c,d,f,k,n,p){var x=this.createElt("Row");x.setAttribute("T",h);x.setAttribute("IX",y);x.appendChild(this.createCellElem("X",A,c));x.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&x.appendChild(this.createCellElem("A",m,f));null!=g&&isFinite(g)&&x.appendChild(this.createCellElem("B",g,k));null!=b&&isFinite(b)&&x.appendChild(this.createCellElem("C",b,n));null!=a&&isFinite(a)&&x.appendChild(this.createCellElem("D",a,p));
mxVsdxCanvas2D.prototype.rect=function(h,y,A,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;A*=m.scale;B*=m.scale;var g=this.xmGeo;h=(h-g.x+m.dx)*m.scale;y=(g.height-y+g.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,h,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,h+A,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,h+A,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,
h,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,h,y))};mxVsdxCanvas2D.prototype.roundrect=function(h,y,A,B,m,g){this.rect(h,y,A,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};
mxVsdxCanvas2D.prototype.ellipse=function(h,y,A,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;A*=m.scale;B*=m.scale;var g=this.xmGeo,b=g.height*m.scale,a=g.width*m.scale;h=(h-g.x+m.dx)*m.scale;y=b+(-y+g.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,h+A/2,y-B/2,h,y-B/2,h+A/2,y,"Width*"+(h+A/2)/a,"Height*"+(y-B/2)/b,"Width*"+h/a,"Height*"+(y-B/2)/b,"Width*"+(h+A/2)/a,"Height*"+y/b))};
mxVsdxCanvas2D.prototype.moveTo=function(h,y){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=h;this.lastMoveToY=y;this.lastX=h;this.lastY=y;var A=this.xmGeo,B=this.state;h=(h-A.x+B.dx)*B.scale;y=(A.height-y+A.y-B.dy)*B.scale;var m=A.height*B.scale;A=A.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,h/A,y/m))};
mxVsdxCanvas2D.prototype.lineTo=function(h,y){this.lastX=h;this.lastY=y;var A=this.xmGeo,B=this.state;h=(h-A.x+B.dx)*B.scale;y=(A.height-y+A.y-B.dy)*B.scale;var m=A.height*B.scale;A=A.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,h/A,y/m))};
mxVsdxCanvas2D.prototype.quadTo=function(h,y,A,B){this.lastX=A;this.lastY=B;var m=this.state,g=this.xmGeo,b=g.height*m.scale,a=g.width*m.scale;h=(h-g.x+m.dx)*m.scale;y=(g.height-y+g.y-m.dy)*m.scale;A=(A-g.x+m.dx)*m.scale;B=(g.height-B+g.y-m.dy)*m.scale;h/=a;y/=b;A/=a;B/=b;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,A,B,h,y))};
mxVsdxCanvas2D.prototype.curveTo=function(h,y,A,B,m,g){this.lastX=m;this.lastY=g;var b=this.state,a=this.xmGeo,c=a.height*b.scale,d=a.width*b.scale;h=(h-a.x+b.dx)*b.scale;y=(a.height-y+a.y-b.dy)*b.scale;A=(A-a.x+b.dx)*b.scale;B=(a.height-B+a.y-b.dy)*b.scale;m=(m-a.x+b.dx)*b.scale;g=(a.height-g+a.y-b.dy)*b.scale;h/=d;y/=c;A/=d;B/=c;m/=d;g/=c;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,g,h,y,A,B))};
mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(h,y){var A=this.createElt("ForeignData");A.setAttribute("ForeignType","Bitmap");h=h.toUpperCase();"BMP"!=h&&A.setAttribute("CompressionType",h);h=this.createElt("Rel");h.setAttribute("r:id","rId"+y);A.appendChild(h);this.shape.appendChild(A);this.shapeType="Foreign"};
mxVsdxCanvas2D.prototype.convertSvg2Png=function(h,y,A){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),g=m.getContext("2d");y||(h=String.fromCharCode.apply(null,new Uint8Array(h)),h=window.btoa?btoa(h):Base64.encode(h,!0));y="data:image/svg+xml;base64,"+h;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;g.drawImage(this,0,0);try{A(m.toDataURL("image/png"))}catch(b){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");
try{A(h)}catch(b){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{A(h)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};
mxVsdxCanvas2D.prototype.image=function(h,y,A,B,m,g,b,a){var c=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");g=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(g,!0,function(n){c.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,g,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);
var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;g=new XMLHttpRequest;g.open("GET",m,!0);g.responseType="arraybuffer";g.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?c.convertSvg2Png(this.response,!1,function(p){c.zip.file("visio/media/"+d,p.substring(22),{base64:!0})}):c.zip.file("visio/media/"+d,this.response)),c.filesLoading--,0==c.filesLoading))c.onFilesLoaded()};g.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;A*=m.scale;
B*=m.scale;f=this.xmGeo;h=(h-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",h));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",A));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};
mxVsdxCanvas2D.prototype.text=function(h,y,A,B,m,g,b,a,c,d,f,k,n){var p=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==A&&0==B&&(B=mxUtils.getSizeForString(m,p.cellState.style.fontSize,p.cellState.style.fontFamily),A=2*B.width,B=2*B.height);"html"==c&&("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;A*=d.scale;B*=d.scale;var x=this.createElt("Section");x.setAttribute("N","Character");var z=this.createElt("Section");z.setAttribute("N","Paragraph");var E=this.createElt("Text"),I=0,J=0,O=0,M=0,L=0,H=0,K=0,P=function(T,V,oa,ca,qa){var sa=T.fontSize,Fa=T.fontFamily,ka=mxUtils.getSizeForString(qa,sa,Fa);a&&ka.width>A&&(ka=mxUtils.getSizeForString(qa,sa,Fa,A));T.blockElem?(L+=ka.width,O=Math.min(Math.max(O,L),
A),L=0,H=Math.max(H,ka.height),M+=H+K,K=H,H=0):(L+=ka.width,O=Math.min(Math.max(O,L),A),H=Math.max(H,ka.height),M=Math.max(M,H));ka=p.createElt("Row");ka.setAttribute("IX",I);T.fontColor&&ka.appendChild(p.createCellElem("Color",mxUtils.rgba2hex(T.fontColor)));sa&&ka.appendChild(p.createCellElemScaled("Size",.97*sa));Fa&&ka.appendChild(p.createCellElem("Font",Fa));sa=0;T.bold&&(sa|=17);T.italic&&(sa|=34);T.underline&&(sa|=4);ka.appendChild(p.createCellElem("Style",sa));ka.appendChild(p.createCellElem("Case",
"0"));ka.appendChild(p.createCellElem("Pos","0"));ka.appendChild(p.createCellElem("FontScale","1"));ka.appendChild(p.createCellElem("Letterspace","0"));V.appendChild(ka);V=p.createElt("Row");V.setAttribute("IX",J);switch(T.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}V.appendChild(p.createCellElem("HorzAlign",sa));oa.appendChild(V);oa=p.createElt("cp");oa.setAttribute("IX",I++);ca.appendChild(oa);
T=p.xmlDoc.createTextNode(qa+(T.blockElem?"\n":""));ca.appendChild(T)},Q=function(T,V){V=V||{};for(var oa=0;oa<T.length;oa++){var ca=T[oa];if(3==ca.nodeType){var qa=p.cellState.style.fontStyle;qa={fontColor:V.fontColor||p.cellState.style.fontColor,fontSize:V.fontSize||p.cellState.style.fontSize,fontFamily:V.fontFamily||p.cellState.style.fontFamily,align:V.align||p.cellState.style.align,bold:V.bold||qa&1,italic:V.italic||qa&2,underline:V.underline||qa&4};var sa=!1;oa+1<T.length&&"BR"==T[oa+1].nodeName.toUpperCase()&&
(sa=!0,oa++);P(qa,x,z,E,(V.OL?V.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")||V.bold,italic:"italic"==qa.getPropertyValue("font-style")||V.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||V.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:V.OL,LiIndex:V.LiIndex};if("UL"==sa){var ka=p.createElt("Row");ka.setAttribute("IX",J);ka.appendChild(p.createCellElem("HorzAlign","0"));ka.appendChild(p.createCellElem("Bullet","1"));z.appendChild(ka);ka=p.createElt("pp");ka.setAttribute("IX",J++);E.appendChild(ka)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=oa+1);0<Fa?(Q(ca.childNodes,qa),"UL"==sa&&(ka=p.createElt("Row"),
ka.setAttribute("IX",J),ka.appendChild(p.createCellElem("Bullet","0")),z.appendChild(ka),ka=p.createElt("pp"),ka.setAttribute("IX",J++),E.appendChild(ka)),P(qa,x,z,E,"")):P(qa,x,z,E,(V.OL?V.LiIndex+". ":"")+ca.textContent)}}};"html"==c&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&Q(m.childNodes,{})):P({fontColor:p.cellState.style.fontColor,fontSize:p.cellState.style.fontSize,fontFamily:p.cellState.style.fontFamily},x,z,E,m);c=m=0;B=Math.max(B,
M);A=Math.max(A,O);n=A/2;var R=B/2,ha=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),X=ha*Math.PI/180;switch(g){case "right":0!=ha?(h-=n*Math.cos(X),y-=n*Math.sin(X)):m=O/2;break;case "left":0!=ha?(h+=n*Math.cos(X),y+=n*Math.sin(X)):m=-O/2}switch(b){case "top":0!=ha?(h+=R*Math.sin(X),y+=R*Math.cos(X)):c=M/2;break;case "bottom":0!=ha?(h-=R*Math.sin(X),y-=R*Math.cos(X)):c=-M/2}h=(h-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",
h));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",A));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",R+c));k-=ha;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(x);this.shape.appendChild(z);this.shape.appendChild(E)}};
mxVsdxCanvas2D.prototype.rotate=function(h,y,A,B,m){0!=h&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-h)*Math.PI/180)),y.rotation+=h,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(h,y){this.pos=0;this.buffer=h;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 h=this.buffer;this.fileSize=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.reserved=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.offset=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.headerSize=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.width=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];
this.pos+=4;this.height=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.planes=h[this.pos+1]<<8|h[this.pos];this.pos+=2;this.bitPP=h[this.pos+1]<<8|h[this.pos];this.pos+=2;this.compress=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.rawSize=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.hr=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.vr=h[this.pos+3]<<24|h[this.pos+
2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.colors=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.importantColors=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){h=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(h);for(var y=0;y<h;y++){var A=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],g=this.buffer[this.pos++];
this.palette[y]={red:m,green:B,blue:A,quad:g}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var h="bit"+this.bitPP,y=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=y;this.data=y.data;this[h]()}catch(A){console.log("bit decode error:"+A)}};
BmpDecoder.prototype.bit1=function(){for(var h=Math.ceil(this.width/8),y=h%4,A=this.height-1;0<=A;A--){for(var B=0;B<h;B++)for(var m=this.buffer[this.pos++],g=A*this.width*4+32*B,b=0;8>b;b++)if(8*B+b<this.width){var a=this.palette[m>>7-b&1];this.data[g+4*b]=a.red;this.data[g+4*b+1]=a.green;this.data[g+4*b+2]=a.blue;this.data[g+4*b+3]=255}else break;0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit4=function(){for(var h=Math.ceil(this.width/2),y=h%4,A=this.height-1;0<=A;A--){for(var B=0;B<h;B++){var m=this.buffer[this.pos++],g=A*this.width*4+8*B,b=m&15;m=this.palette[m>>4];this.data[g]=m.red;this.data[g+1]=m.green;this.data[g+2]=m.blue;this.data[g+3]=255;if(2*B+1>=this.width)break;m=this.palette[b];this.data[g+4]=m.red;this.data[g+4+1]=m.green;this.data[g+4+2]=m.blue;this.data[g+4+3]=255}0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit8=function(){for(var h=this.width%4,y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos++],m=y*this.width*4+4*A;B<this.palette.length?(B=this.palette[B],this.data[m]=B.red,this.data[m+1]=B.green,this.data[m+2]=B.blue):(this.data[m]=255,this.data[m+1]=255,this.data[m+2]=255);this.data[m+3]=255}0!=h&&(this.pos+=4-h)}};
BmpDecoder.prototype.bit15=function(){var h=2*this.width%4;0!=h&&(h=4-h);for(var y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,g=(B>>5&31)/31*255|0,b=B>>15?255:0,a=y*this.width*4+4*A;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=g;this.data[a+2]=m;this.data[a+3]=b}this.pos+=h}};
BmpDecoder.prototype.bit16=function(){var h=2*this.width%4;0!=h&&(h=4-h);for(var y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,g=(B>>5&31)/31*255|0,b=y*this.width*4+4*A;this.data[b]=(B>>10&31)/31*255|0;this.data[b+1]=g;this.data[b+2]=m;this.data[b+3]=255}this.pos+=h}};
BmpDecoder.prototype.bit24=function(){var h=3*this.width%4;0!=h&&(h=4-h);for(var y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],g=this.buffer[this.pos++],b=y*this.width*4+4*A;this.data[b]=g;this.data[b+1]=m;this.data[b+2]=B;this.data[b+3]=255}this.pos+=h}};
BmpDecoder.prototype.bit32=function(){for(var h=this.height-1;0<=h;h--)for(var y=0;y<this.width;y++){var A=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],g=this.buffer[this.pos++],b=h*this.width*4+4*y;this.data[b]=m;this.data[b+1]=B;this.data[b+2]=A;this.data[b+3]=g}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(h,y){function A(){this.constructor=h}for(var B in y)y.hasOwnProperty(B)&&(h[B]=y[B]);h.prototype=null===y?Object.create(y):(A.prototype=y.prototype,new A)},com;
(function(h){(function(y){(function(A){var B=function(){function m(g){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=g;this.shapeIndexShift=0}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(g){try{var b=mxUtils.parseXml(g);return 0<b.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:b}catch(a){return null}};m.decodeUTF16LE=function(g){for(var b="",a=0;a<g.length;a+=2)b+=String.fromCharCode(g.charCodeAt(a)|g.charCodeAt(a+1)<<8);return b};m.prototype.scaleGraph=function(g,b){if(1!==b){g=
g.getModel();for(var a in g.cells){var c=g.cells[a],d=g.getGeometry(c);if(null!=d&&(this.scaleRect(d,b),this.scaleRect(d.alternateBounds,b),g.isEdge(c)&&(this.scalePoint(d.sourcePoint,b),this.scalePoint(d.targetPoint,b),this.scalePoint(d.offset,b),c=d.points,null!=c)))for(d=0;d<c.length;d++)this.scalePoint(c[d],b)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];m.prototype.decodeVsdx=function(g,b,a,c){var d=this,f={},k={},n=function(){function E(){M=M.concat(d.RESPONSE_END);
b&&b(M)}for(var I=m.vsdxPlaceholder+"/document.xml",J=f[I]?f[I]:null,O=J.firstChild;null!=O&&1!=O.nodeType;)O=O.nextSibling;if(null!=O&&1==O.nodeType)d.importNodes(J,O,I,f);else return null;d.vsdxModel=new h.mxgraph.io.vsdx.mxVsdxModel(J,f,k);I=d.vsdxModel.getPages();var M=d.RESPONSE_HEADER;var L=function(P){null==P.entries&&(P.entries=[]);return P.entries}(I),H=function(P,Q){var R=L[P].getValue(),ha=K.createMxGraph();ha.getModel().beginUpdate();K.importPage(R,ha,ha.getDefaultParent(),!0);K.scaleGraph(ha,
R.getPageScale()/R.getDrawingScale());ha.getModel().endUpdate();K.postImportPage(R,ha,function(){K.sanitiseGraph(ha);M=M.concat(d.RESPONSE_DIAGRAM_START);M=M.concat(d.processPage(ha,R));M=M.concat(d.RESPONSE_DIAGRAM_END);P<L.length-1?H(P+1,Q):Q()})},K=d;0<L.length?H(0,E):E()},p=0,x=0,z=function(){if(x==p)try{n()}catch(E){console.log(E),null!=c?c(E):b("")}};JSZip.loadAsync(g).then(function(E){0==Object.keys(E.files).length?null!=c&&c():E.forEach(function(I,J){var O=J.name,M=O.toLowerCase();I=M.length;
M.indexOf(".xml")==I-4||M.indexOf(".rels")==I-5?(p++,J.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var H=m.parseXml(L);if(null==H)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))H=m.parseXml(m.decodeUTF16LE(L));else{for(H=0;H<m.incorrectXMLReqExp.length;H++)m.incorrectXMLReqExp[H].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[H].regExp,m.incorrectXMLReqExp[H].repl));H=m.parseXml(L)}null!=H&&(H.vsdxFileName=O,f[O]=H)}x++;z()})):
0===M.indexOf(m.vsdxPlaceholder+"/media")&&(p++,function(L,H){var K=L.length-H.length;L=L.indexOf(H,K);return-1!==L&&L===K}(M,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?J.async("blob").then(function(L){var H=new FormData;H.append("img",L,M);H.append("inputformat","emf");H.append("outputformat","png");var K=new XMLHttpRequest;K.open("POST",EMF_CONVERT_URL);K.responseType="blob";d.editorUi.addRemoteServiceSecurityCheck(K);K.onreadystatechange=mxUtils.bind(this,function(){if(4==K.readyState)if(200<=
K.status&&299>=K.status)try{var P=new FileReader;P.readAsDataURL(K.response);P.onloadend=function(){var Q=P.result.indexOf(",")+1;k[O]=P.result.substr(Q);x++;z()}}catch(Q){console.log(Q),x++,z()}else x++,z()});K.send(H)}):(x++,z()):function(L,H){var K=L.length-H.length;L=L.indexOf(H,K);return-1!==L&&L===K}(M,".bmp")?JSZip.support.uint8array&&J.async("uint8array").then(function(L){L=new BmpDecoder(L);var H=document.createElement("canvas");H.width=L.width;H.height=L.height;H.getContext("2d").putImageData(L.imageData,
0,0);L=H.toDataURL("image/jpeg");k[O]=L.substr(23);x++;z()}):J.async("base64").then(function(L){k[O]=L;x++;z()}))})},function(E){null!=c&&c(E)})};m.prototype.createMxGraph=function(){var g=new Graph;g.setExtendParents(!1);g.setExtendParentsOnAdd(!1);g.setConstrainChildren(!1);g.setHtmlLabels(!0);g.getModel().maintainEdgeParent=!1;return g};m.prototype.processPage=function(g,b){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);var a="";if(null!=b){var c=
mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":"");b=mxUtils.htmlEntities(b.getPageNameU());a+='<diagram name="'+c+'" id="'+b.replace(/\s/g,"_")+'">'}return a+=Graph.compress(g)};m.prototype.scalePoint=function(g,b){null!=g&&(g.x*=b,g.y*=b);return g};m.prototype.scaleRect=function(g,b){null!=g&&(g.x*=b,g.y*=b,g.height*=b,g.width*=b);return g};m.prototype.importNodes=function(g,b,a,c){var d=a.lastIndexOf("/"),f=a,k=a;if(-1!==d&&(f=a.substring(0,d),k=a.substring(d+1,a.length),
a=function(z,E){return z[E]?z[E]:null}(c,f+"/_rels/"+k+".rels"),null!=a)){var n=a.getElementsByTagName("Relationship");a={};for(d=0;d<n.length;d++){k=n.item(d);var p=k.getAttribute("Id");k=k.getAttribute("Target");a[p]=k}b=b.getElementsByTagName("Rel");for(d=0;d<b.length;d++)if(n=b.item(d),k=function(z,E){return z[E]?z[E]:null}(a,n.getAttribute("r:id")),k=f+"/"+k,null!=k&&(p=c[k]?c[k]:null,null!=p)){n=n.parentNode;for(p=p.firstChild;null!=p&&1!=p.nodeType;)p=p.nextSibling;if(null!=p&&1==p.nodeType)for(p=
p.firstChild;null!=p;){if(null!=p&&1==p.nodeType){var x=n.appendChild(g.importNode(p,!0));this.importNodes(g,x,k,c)}p=p.nextSibling}}}};m.prototype.layerIndexToNames=function(g){var b=[];if(g)for(var a=0;a<g.length;a++){var c=parseInt(g[a]);c<this.layerNames.length&&b.push(this.layerNames[c])}return 0<b.length?b:[mxResources.get("background")]};m.prototype.importPage=function(g,b,a,c){var d=g.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),g.getPageName());var f=new mxCell(d.getPageName());
b.addCell(f,b.getModel().getRoot(),0,null,null);this.importPage(d,b,b.getDefaultParent())}var k=g.getLayers();f=g.getShapes();d=[];console.log("layers",k);for(var n=0;n<k.length;n++){var p=k[n],x=p.Name.replace(/\s/g,"_");this.layerNames.push(x);0==p.Visible&&d.push(x)}p=function(z){var E=0;return{next:function(){return E<z.length?z[E++]:null},hasNext:function(){return E<z.length}}}(function(z){null==z.entries&&(z.entries=[]);return z.entries}(f));f=g.getPageDimensions().y;for(n=g.getId();p.hasNext();)k=
p.next(),k=k.getValue(),x=this.addShape(b,k,a,n,f),k=this.layerIndexToNames(k.layerMember),null!=x&&null!=k&&b.addTagsForCells([x],k);for(g=function(z){var E=0;return{next:function(){return E<z.length?z[E++]:null},hasNext:function(){return E<z.length}}}(function(z){null==z.entries&&(z.entries=[]);return z.entries}(g.getConnects()));g.hasNext();)k=g.next(),k=this.addConnectedEdge(b,k.getValue(),n,f),null!=k&&function(z,E){null==z.entries&&(z.entries=[]);for(var I=0;I<z.entries.length;I++)if(null!=
z.entries[I].key.equals&&z.entries[I].key.equals(E)||z.entries[I].key===E)return z.entries.splice(I,1)[0]}(this.edgeShapeMap,k);for(g=function(z){var E=0;return{next:function(){return E<z.length?z[E++]:null},hasNext:function(){return E<z.length}}}(function(z){null==z.entries&&(z.entries=[]);return z.entries}(this.edgeShapeMap));g.hasNext();)k=g.next(),k.getKey().getPageNumber()===n&&(p=this.addUnconnectedEdge(b,function(z,E){null==z.entries&&(z.entries=[]);for(var I=0;I<z.entries.length;I++)if(null!=
z.entries[I].key.equals&&z.entries[I].key.equals(E)||z.entries[I].key===E)return z.entries[I].value;return null}(this.parentsMap,k.getKey()),k.getValue(),f),k=this.layerIndexToNames(k.getValue().layerMember),null!=k&&b.addTagsForCells([p],k));if(0<this.layerNames.length){g=b.getAllTags();n=!1;for(k=0;k<this.layerNames.length;k++)if(0>mxUtils.indexOf(g,this.layerNames[k])){n=!0;break}n&&(a=b.insertVertex(a,null,null,0,0,0,0),b.addTagsForCells([a],this.layerNames),a.setVisible(!1));b.setHiddenTags(d)}c||
this.sanitiseGraph(b);return f};m.prototype.postImportPage=function(g,b,a){try{var c=function(n){if(null!=n){n=n.entries||[];for(var p=0;p<n.length;p++){var x=n[p].value||{};x.toBeCroppedImg&&f.push(x);c(x.getChildShapes())}}},d=this,f=[];c(g.getShapes());if(0<f.length){var k=function(n,p){function x(){n<f.length-1?k(n+1,p):p()}var z=f[n],E=z.toBeCroppedImg,I=function(O,M){null==O.entries&&(O.entries=[]);for(var L=0;L<O.entries.length;L++)if(null!=O.entries[L].key.equals&&O.entries[L].key.equals(M)||
O.entries[L].key===M)return O.entries[L].value;return null}(d.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(g.Id,z.Id)),J=new Image;J.onload=function(){var O=E.iData,M=E.iType;try{var L=J.width/E.imgWidth,H=J.height/E.imgHeight,K=-E.imgOffsetX*L,P=(E.imgHeight-E.height+E.imgOffsetY)*H,Q=document.createElement("canvas");Q.width=E.width*L;Q.height=E.height*H;var R=Q.getContext("2d");R.fillStyle="#FFFFFF";R.fillRect(0,0,Q.width,Q.height);R.drawImage(J,K,P,Q.width,Q.height,0,0,Q.width,Q.height);O=Q.toDataURL("image/jpeg").substr(23);
M="jpg"}catch(ha){console.log(ha)}I.style+=";image=data:image/"+M+","+O;x()};J.src="data:image/"+E.iType+";base64,"+E.iData;J.onerror=function(){I.style+=";image=data:image/"+E.iType+","+E.iData;x()}};k(0,a)}else a()}catch(n){console.log(n),a()}};m.prototype.addShape=function(g,b,a,c,d){b.parentHeight=d;var f=h.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=f&&(function(n,p){return n&&n.equals?n.equals(p):n===p}(f,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(n,p){return n&&n.equals?
n.equals(p):n===p}(f,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(n,p){return n&&n.equals?n.equals(p):n===p}(f,h.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var k=b.getId();if(b.isVertex()){f=null;f=b.isGroup()?this.addGroup(g,b,a,c,d):this.addVertex(g,b,a,c,d);(function(n,p,x){null==n.entries&&(n.entries=[]);for(var z=0;z<n.entries.length;z++)if(null!=n.entries[z].key.equals&&n.entries[z].key.equals(p)||n.entries[z].key===p){n.entries[z].value=x;return}n.entries.push({key:p,value:x,getKey:function(){return this.key},
getValue:function(){return this.value}})})(this.vertexShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,k),b);a=b.getHyperlink();a.extLink?g.setLinkForCell(f,a.extLink):a.pageLink&&g.setLinkForCell(f,"data:page/id,"+a.pageLink.replace(/\s/g,"_"));b=b.getProperties();for(a=0;a<b.length;a++)try{g.setAttributeForCell(f,b[a].key,b[a].val)}catch(n){console.log('Attribute: "',b[a].key,'" with value "',b[a].val,'" not allowed in HTML')}return f}b.setShapeIndex(g.getModel().getChildCount(a));(function(n,p,x){null==
n.entries&&(n.entries=[]);for(var z=0;z<n.entries.length;z++)if(null!=n.entries[z].key.equals&&n.entries[z].key.equals(p)||n.entries[z].key===p){n.entries[z].value=x;return}n.entries.push({key:p,value:x,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,k),b);(function(n,p,x){null==n.entries&&(n.entries=[]);for(var z=0;z<n.entries.length;z++)if(null!=n.entries[z].key.equals&&n.entries[z].key.equals(p)||n.entries[z].key===
p){n.entries[z].value=x;return}n.entries.push({key:p,value:x,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new h.mxgraph.io.vsdx.ShapePageId(c,k),a)}return null};m.prototype.addGroup=function(g,b,a,c,d){var f=b.getDimensions(),k=b.getMaster(),n=b.getStyleFromShape(),p=b.getGeomList();p.isNoFill()&&(n[mxConstants.STYLE_FILLCOLOR]="none",n[mxConstants.STYLE_GRADIENTCOLOR]="none");p.isNoLine()&&(n[mxConstants.STYLE_STROKECOLOR]="none");n.html="1";n[mxConstants.STYLE_WHITE_SPACE]=
"wrap";var x=h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=");n=null;var z=b.getChildShapes();n=null!=z&&0<function(J){null==J.entries&&(J.entries=[]);return J.entries.length}(z);p=b.isDisplacedLabel()||b.isRotatedLabel()||n;n=b.getOriginPoint(d,!0);if(p)n=g.insertVertex(a,null,null,Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),x);else{var E=b.getTextLabel();n=g.insertVertex(a,null,E,Math.floor(Math.round(100*
n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),x)}a=n.geometry.height;for(z=function(J){var O=0;return{next:function(){return O<J.length?J[O++]:null},hasNext:function(){return O<J.length}}}(function(J){null==J.entries&&(J.entries=[]);return J.entries}(z));z.hasNext();)if(x=z.next().getValue(),E=x.getId(),x.isVertex()){var I=h.mxgraph.io.vsdx.VsdxShape.getType(x.getShape());null!=I&&(function(J,O){return J&&J.equals?J.equals(O):
J===O}(I,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(J,O){return J&&J.equals?J.equals(O):J===O}(I,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(J,O){return J&&J.equals?J.equals(O):J===O}(I,h.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&x.isVertex()&&(x.propagateRotation(b.getRotation()),(I=x.isGroup()?this.addGroup(g,x,n,c,f.y):this.addVertex(g,x,n,c,f.y))&&I.geometry&&(a=Math.max(I.geometry.height,a)));null==k&&function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,E),x)}else null==k?(function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,
value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,E),x),function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new h.mxgraph.io.vsdx.ShapePageId(c,E),
n)):this.addUnconnectedEdge(g,n,x,d);if(n.children&&0==n.geometry.height&&0<a)for(n.geometry.height=a,d=0;d<n.children.length;d++)f=n.children[d],f.geometry&&(f.geometry.y+=a);p&&b.createLabelSubShape(g,n);g=b.getRotation();if(0!==g)for(d=n.getGeometry(),k=d.width/2,p=d.height/2,d=0;d<n.getChildCount();d++)f=n.getChildAt(d),h.mxgraph.online.Utils.rotatedGeometry(f.getGeometry(),g,k,p);(function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(c,b.getId()),n);return n};m.rotatedEdgePoint=function(g,b,a,c){b=b*Math.PI/180;var d=Math.cos(b);b=Math.sin(b);var f=g.x-a,k=g.y-c;g.x=Math.round(f*d-k*b+a);g.y=Math.round(k*d+f*b+c)};m.prototype.addVertex=function(g,b,a,c,d){var f="",k=b.isDisplacedLabel()||b.isRotatedLabel();
k||(f=b.getTextLabel());var n=b.getDimensions(),p=b.getStyleFromShape();p.html="1";var x=p.hasOwnProperty(mxConstants.STYLE_SHAPE)||p.hasOwnProperty("stencil");p.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&x||(p[mxConstants.STYLE_FILLCOLOR]="none");x||(p[mxConstants.STYLE_STROKECOLOR]="none");p.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&x||(p[mxConstants.STYLE_GRADIENTCOLOR]="none");p[mxConstants.STYLE_WHITE_SPACE]="wrap";d=b.getOriginPoint(d,!0);return x||null!=f?(p=h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(p,
"="),x=null,x=k?g.insertVertex(a,null,null,Math.floor(Math.round(100*d.x)/100),Math.floor(Math.round(100*d.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),p):g.insertVertex(a,null,f,Math.floor(Math.round(100*d.x)/100),Math.floor(Math.round(100*d.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),p),function(z,E,I){null==z.entries&&(z.entries=[]);for(var J=0;J<z.entries.length;J++)if(null!=z.entries[J].key.equals&&z.entries[J].key.equals(E)||
z.entries[J].key===E){z.entries[J].value=I;return}z.entries.push({key:E,value:I,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(c,b.getId()),x),b.setLabelOffset(x,p),k&&b.createLabelSubShape(g,x),x):null};m.calculateAbsolutePoint=function(g){for(var b=0,a=0;null!=g;){var c=g.geometry;null!=c&&(b+=c.x,a+=c.y);g=g.parent}return new mxPoint(b,a)};m.prototype.processEdgeGeo=function(g,b){try{var a=g.geomList.geomList[0].rows;
for(g=0;g<a.length;g++)if(a[g]instanceof h.mxgraph.io.vsdx.geometry.ArcTo){b.style+="jumpStyle=arc;";break}for(g=0;g<a.length;g++);}catch(c){}};m.prototype.addConnectedEdge=function(g,b,a,c){var d=b.getFromSheet();d=new h.mxgraph.io.vsdx.ShapePageId(a,d);var f=function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.edgeShapeMap,d);if(null==f)return null;
var k=function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.parentsMap,new h.mxgraph.io.vsdx.ShapePageId(a,f.getId()));if(null!=k){var n=g.getModel().getGeometry(k);null!=n&&(c=n.height)}var p=f.getStartXY(c),x=f.getEndXY(c);n=f.getRoutingPoints(c,p,f.getRotation());this.rotateChildEdge(g.getModel(),k,p,x,n);var z=null,E=b.getSourceToSheet();E=null!=
E?function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(a,E)):null;var I=!0;if(null==E||0==E.geometry.width||0==E.geometry.height)E=g.insertVertex(k,null,null,Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),0,0);else if(E.style&&-1==E.style.indexOf(";rotation=")){z=m.calculateAbsolutePoint(E);
var J=m.calculateAbsolutePoint(k),O=E.geometry;z=new mxPoint((J.x+p.x-z.x)/O.width,(J.y+p.y-z.y)/O.height)}else I=!1;p=null;b=b.getTargetToSheet();b=null!=b?function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(a,b)):null;J=!0;null==b||0==b.geometry.width||0==b.geometry.height?b=g.insertVertex(k,null,null,
Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=m.calculateAbsolutePoint(b),p=m.calculateAbsolutePoint(k),O=b.geometry,p=new mxPoint((p.x+x.x-a.x)/O.width,(p.y+x.y-a.y)/O.height)):J=!1;a=f.getStyleFromEdgeShape(c);O=f.getRotation();0!==O?(x=g.insertEdge(k,null,null,E,b,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),I=f.createLabelSubShape(g,x),null!=I&&(I.setStyle(I.getStyle()+";rotation="+(60<O&&240>O?(O+180)%360:O)),
I=I.getGeometry(),I.x=0,I.y=0,I.relative=!0,I.offset=new mxPoint(-I.width/2,-I.height/2))):(x=g.insertEdge(k,null,f.getTextLabel(!0),E,b,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),O=f.getLblEdgeOffset(g.getView(),n),x.getGeometry().offset=O,null!=z&&g.setConnectionConstraint(x,E,!0,new mxConnectionConstraint(z,!1)),I&&n.shift(),null!=p&&g.setConnectionConstraint(x,b,!1,new mxConnectionConstraint(p,!1)),J&&n.pop());I=g.getModel().getGeometry(x);if(E.parent!=b.parent&&null!=k&&1!=k.id&&1==
E.parent.id){b=z=0;do p=k.geometry,null!=p&&(z+=p.x,b+=p.y),k=k.parent;while(null!=k);x.parent=E.parent;for(k=0;k<n.length;k++)n[k].x+=z,n[k].y+=b}I.points=n;a.hasOwnProperty("curved")&&function(M,L){return M&&M.equals?M.equals(L):M===L}(function(M,L){return M[L]?M[L]:null}(a,"curved"),"1")&&(I=g.getModel().getGeometry(x),c=f.getControlPoints(c),I.points=c);this.processEdgeGeo(f,x);f=this.layerIndexToNames(f.layerMember);null!=f&&g.addTagsForCells([x],f);return d};m.prototype.addUnconnectedEdge=function(g,
b,a,c){if(null!=b){var d=g.getModel().getGeometry(b);null!=d&&(c=d.height)}var f=a.getStartXY(c),k=a.getEndXY(c),n=a.getStyleFromEdgeShape(c),p=a.getRoutingPoints(c,f,a.getRotation()),x=a.getRotation();if(0!==x){0===a.getShapeIndex()?d=g.insertEdge(b,null,null,null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(d=g.createEdge(b,null,null,null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),d=g.addEdge(d,b,null,null,a.getShapeIndex()+this.shapeIndexShift++));var z=a.createLabelSubShape(g,
d);null!=z&&(z.setStyle(z.getStyle()+";rotation="+(60<x&&240>x?(x+180)%360:x)),x=z.getGeometry(),x.x=0,x.y=0,x.relative=!0,x.offset=new mxPoint(-x.width/2,-x.height/2))}else 0===a.getShapeIndex()?d=g.insertEdge(b,null,a.getTextLabel(!0),null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(d=g.createEdge(b,null,a.getTextLabel(!0),null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),d=g.addEdge(d,b,null,null,a.getShapeIndex()+this.shapeIndexShift++)),x=a.getLblEdgeOffset(g.getView(),
p),d.getGeometry().offset=x;this.rotateChildEdge(g.getModel(),b,f,k,p);b=g.getModel().getGeometry(d);p.pop();p.shift();b.points=p;b.setTerminalPoint(f,!0);b.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(E,I){return E&&E.equals?E.equals(I):E===I}(function(E,I){return E[I]?E[I]:null}(n,"curved"),"1")&&(b=g.getModel().getGeometry(d),g=a.getControlPoints(c),b.points=g);this.processEdgeGeo(a,d);return d};m.prototype.rotateChildEdge=function(g,b,a,c,d){if(null!=b){var f=g.getGeometry(b);g=
g.getStyle(b);if(null!=f&&null!=g&&(b=g.indexOf("rotation="),-1<b))for(g=parseFloat(g.substring(b+9,g.indexOf(";",b))),b=f.width/2,f=f.height/2,m.rotatedEdgePoint(a,g,b,f),m.rotatedEdgePoint(c,g,b,f),a=0;a<d.length;a++)m.rotatedEdgePoint(d[a],g,b,f)}};m.prototype.sanitiseGraph=function(g){var b=g.getModel().getRoot();this.sanitiseCell(g,b)};m.prototype.sanitiseCell=function(g,b){for(var a=g.getModel(),c=a.getChildCount(b),d=[],f=0;f<c;f++){var k=a.getChildAt(b,f);this.sanitiseCell(g,k)&&d.push(k)}for(g=
0;g<d.length;g++)a.remove(d[g]);d=b.geometry;null!=d&&(0>d.height&&(d.height=Math.abs(d.height),d.y-=d.height,b.style+=";flipV=1;"),0>d.width&&(d.width=Math.abs(d.width),d.x-=d.width,b.style+=";flipH=1;"));0<c&&(c=a.getChildCount(b));d=(new String(a.getValue(b))).toString();g=a.getStyle(b);return 0!==c||!a.isVertex(b)||null!=a.getValue(b)&&0!==d.length||null==g||-1==g.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==g.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=g.indexOf("image=")?!1:!0};
return m}();A.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(m){function g(b){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(g,m);g.prototype.decodeVssx=function(b,a,c,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(b,function(n){k=k.concat(n);var p=f.vsdxModel.getMasterShapes(),x=function(M){var L=0;return{next:function(){return L<M.length?M[L++]:null},hasNext:function(){return L<M.length}}}(function(M){var L=
[];null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)L.push(M.entries[H].value);return L}(f.vsdxModel.getPages())).next();if(null!=p){var z={str:"",toString:function(){return this.str}},E=0===n.length?"":",",I=function(M){return Object.keys(M).map(function(L){return M[L]})}(p);n=function(M){M=I[M];var L=J.createMxGraph(),H=1;if(null!=M.pageSheet){var K=H=1,P=M.pageSheet.DrawingScale;null!=P&&(H=parseFloat(P.getAttribute("V"))||1);P=M.pageSheet.PageScale;null!=P&&(K=parseFloat(P.getAttribute("V"))||
1);H=K/H}K=!1;for(P=0;null!=M.firstLevelShapes&&P<M.firstLevelShapes.length;P++){var Q=M.firstLevelShapes[P].getShape(),R=new h.mxgraph.io.vsdx.VsdxShape(x,Q,!x.isEdge(Q),p,null,J.vsdxModel);Q=null;if(R.isVertex()){J.edgeShapeMap.entries=[];J.parentsMap.entries=[];Q=J.addShape(L,R,L.getDefaultParent(),0,1169);R=function(V){null==V.entries&&(V.entries=[]);return V.entries}(J.edgeShapeMap);for(var ha=0;ha<R.length;ha++){var X=R[ha],T=function(V,oa){null==V.entries&&(V.entries=[]);for(var ca=0;ca<V.entries.length;ca++)if(null!=
V.entries[ca].key.equals&&V.entries[ca].key.equals(oa)||V.entries[ca].key===oa)return V.entries[ca].value;return null}(J.parentsMap,X.getKey());J.addUnconnectedEdge(L,T,X.getValue(),1169)}}else Q=J.addUnconnectedEdge(L,null,R,1169);K|=null!=Q}if(K){J.scaleGraph(L,H);H=J.normalizeGraph(L);J.sanitiseGraph(L);if(0===L.getModel().getChildCount(L.getDefaultParent()))return"continue";z.str=z.str.concat(E);z.str=z.str.concat('{"xml":"');L=m.prototype.processPage.call(J,L,null);z.str=z.str.concat(L);z.str=
z.str.concat('","w":');z.str=z.str.concat(H.width);z.str=z.str.concat(',"h":');z.str=z.str.concat(H.height);z.str=z.str.concat(',"title":');M=M.getName();null==M&&(M="");M=mxUtils.htmlEntities(JSON.stringify(M));z.str=z.str.concat(M);z.str=z.str.concat("}");E=","}};for(var J=f,O=0;O<I.length;O++)n(O);k=k.concat(z)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(M){null!=d?d(M):a("")}},c)};g.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var c=a.sourcePoint;if(b.isEdge()&&null!=
c){this.transPoint(a.targetPoint,c);this.transPoint(a.offset,c);b=a.points;if(null!=b)for(var d=0;d<b.length;d++)this.transPoint(b[d],c);this.transPoint(c,c)}return a};g.prototype.normalizeGraph=function(b){function a(E){null!=E&&(null==c?(c=E.x,d=E.y,f=E.x+(E.width||0),k=E.y+(E.height||0)):(c=Math.min(E.x,c),d=Math.min(E.y,d),f=Math.max(E.x+(E.width||0),f),k=Math.max(E.y+(E.height||0),k)))}var c,d,f,k,n;for(n in b.model.cells){var p=b.model.cells[n],x=p.geometry;if(null!=x&&1==p.parent.id)if(p.vertex)a(x);
else for(a(x.sourcePoint),a(x.targetPoint),p=x.points,x=0;null!=p&&x<p.length;x++)a(p[x])}var z={x:c,y:d};for(n in b.model.cells)if(p=b.model.cells[n],x=p.geometry,null!=x&&1==p.parent.id&&(x.x-=c,x.y-=d,p.isEdge()))for(this.transPoint(x.sourcePoint,z),this.transPoint(x.targetPoint,z),this.transPoint(x.offset,z),p=x.points,x=0;null!=p&&x<p.length;x++)this.transPoint(p[x],z);return{width:f-c,height:k-d}};g.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};g.prototype.processPage=function(b,
a){var c=b.getModel(),d="",f="";for(p in c.cells){var k=c.cells[p];if(b.getDefaultParent()===c.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=c.getStyle(k);k="";if(null!=f&&
(n=f.indexOf(h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var p=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new h.mxgraph.io.vsdx.ShapePageId(a.getId(),p);null==f.entries&&(f.entries=[]);for(var x=0;x<f.entries.length;x++)if(null!=f.entries[x].key.equals&&f.entries[x].key.equals(n)||f.entries[x].key===n){f=f.entries[x].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=
0<d.length?",":"";return d};return g}(h.mxgraph.io.mxVsdxCodec);A.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,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=c;this.y=d}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=
function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();m.Row=g;g.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(c){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var c=parseFloat(a);if(isFinite(c))return c}}catch(d){}return null};b.getRowObj=function(a,c){var d=a.getAttribute("T"),f=b.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=c.length&&(n=c[f-1]);var p=k=c=null,x=null,
z=null,E=null,I=null,J=null;null!=n&&(c=n.x,k=n.y,p=n.getA(),x=n.getB(),z=n.getC(),E=n.getD(),J=n.getFormulaA(),I=n.getFormulaE());a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var O=a[n],M=O.getAttribute("N"),L=O.getAttribute("V");switch(M){case "X":c=b.getDoubleVal(L);break;case "Y":k=b.getDoubleVal(L);break;case "A":p=b.getDoubleVal(L);J=O.getAttribute("V");break;case "B":x=b.getDoubleVal(L);break;case "C":z=b.getDoubleVal(L);break;case "D":E=b.getDoubleVal(L);
break;case "E":I=L}}switch(d){case "MoveTo":return new h.mxgraph.io.vsdx.geometry.MoveTo(f,c,k);case "LineTo":return new h.mxgraph.io.vsdx.geometry.LineTo(f,c,k);case "ArcTo":return new h.mxgraph.io.vsdx.geometry.ArcTo(f,c,k,p);case "Ellipse":return new h.mxgraph.io.vsdx.geometry.Ellipse(f,c,k,p,x,z,E);case "EllipticalArcTo":return new h.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,c,k,p,x,z,E);case "InfiniteLine":return new h.mxgraph.io.vsdx.geometry.InfiniteLine(f,c,k,p,x);case "NURBSTo":return new h.mxgraph.io.vsdx.geometry.NURBSTo(f,
c,k,p,x,z,E,I);case "PolylineTo":return new h.mxgraph.io.vsdx.geometry.PolylineTo(f,c,k,J);case "RelCubBezTo":return new h.mxgraph.io.vsdx.geometry.RelCubBezTo(f,c,k,p,x,z,E);case "RelEllipticalArcTo":return new h.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,c,k,p,x,z,E);case "RelLineTo":return new h.mxgraph.io.vsdx.geometry.RelLineTo(f,c,k);case "RelMoveTo":return new h.mxgraph.io.vsdx.geometry.RelMoveTo(f,c,k);case "RelQuadBezTo":return new h.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,c,k,p,x);case "SplineKnot":return new h.mxgraph.io.vsdx.geometry.SplineKnot(f,
c,k,p);case "SplineStart":return new h.mxgraph.io.vsdx.geometry.SplineStart(f,c,k,p,x,z,E)}}return new h.mxgraph.io.vsdx.geometry.DelRow(f)};return b}();m.RowFactory=g;g.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(){this.colorElementMap={};this.fontElementMap={}}g.__static_initialize=function(){g.__static_initialized||(g.__static_initialized=!0,g.__static_initializer_0())};g.defaultColors_$LI$=function(){g.__static_initialize();null==g.defaultColors&&(g.defaultColors={});return g.defaultColors};g.__static_initializer_0=function(){g.defaultColors_$LI$()["0"]="#000000";g.defaultColors_$LI$()["1"]="#FFFFFF";g.defaultColors_$LI$()["2"]=
"#FF0000";g.defaultColors_$LI$()["3"]="#00FF00";g.defaultColors_$LI$()["4"]="#0000FF";g.defaultColors_$LI$()["5"]="#FFFF00";g.defaultColors_$LI$()["6"]="#FF00FF";g.defaultColors_$LI$()["7"]="#00FFFF";g.defaultColors_$LI$()["8"]="#800000";g.defaultColors_$LI$()["9"]="#008000";g.defaultColors_$LI$()["10"]="#000080";g.defaultColors_$LI$()["11"]="#808000";g.defaultColors_$LI$()["12"]="#800080";g.defaultColors_$LI$()["13"]="#008080";g.defaultColors_$LI$()["14"]="#C0C0C0";g.defaultColors_$LI$()["15"]="#E6E6E6";
g.defaultColors_$LI$()["16"]="#CDCDCD";g.defaultColors_$LI$()["17"]="#B3B3B3";g.defaultColors_$LI$()["18"]="#9A9A9A";g.defaultColors_$LI$()["19"]="#808080";g.defaultColors_$LI$()["20"]="#666666";g.defaultColors_$LI$()["21"]="#4D4D4D";g.defaultColors_$LI$()["22"]="#333333";g.defaultColors_$LI$()["23"]="#1A1A1A"};g.prototype.initialise=function(b,a){if(null!=b){a=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var c=a.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),
d=c.length;for(a=0;a<d;a++){var f=c.item(a),k=f.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(b=a.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),c=b.length,a=0;a<c;a++)k=b.item(a),d=k.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),
this.fontElementMap[d]=k}};g.prototype.getColor=function(b){var a=function(c,d){return c[d]?c[d]:null}(this.colorElementMap,b);return null==a&&(a=function(c,d){return c[d]?c[d]:null}(g.defaultColors_$LI$(),b),null==a)?"":a};g.prototype.getFont=function(b){var a=this.fontElementMap;b=a[b]?a[b]:null;return null==b?"":b};return g}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)}g.prototype.addFromCell=function(b,a){var c=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=
!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,h.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=c&&0!==c.length?
parseFloat(c):-1,d=!1);this.findToPart(b,d)};g.prototype.findToPart=function(b,a){b=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);b=null!=b&&0!==b.length?parseFloat(b):-1;a?this.sourceToPart=b:this.targetToPart=b};g.prototype.getFromSheet=function(){return this.fromSheet};g.prototype.getSourceToSheet=function(){return this.sourceToSheet};g.prototype.getTargetToSheet=function(){return this.targetToSheet};g.prototype.getSourceToPart=function(){return this.sourceToPart};g.prototype.getTargetToPart=
function(){return this.targetToPart};g.prototype.addConnect=function(b){this.endShape=b;var a=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)};return g}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(){}g.SET_VALUES_$LI$=function(){null==g.SET_VALUES&&(g.SET_VALUES=["a","b"]);return g.SET_VALUES};g.MY_SET_$LI$=function(){null==g.MY_SET&&(g.MY_SET=g.SET_VALUES_$LI$().slice(0).slice(0));return g.MY_SET};return g}();m.ANGLE="Angle";m.ARC_TO="ArcTo";m.BACKGROUND="Background";m.BACK_PAGE="BackPage";m.BEGIN_ARROW="BeginArrow";m.BEGIN_ARROW_SIZE="BeginArrowSize";m.BEGIN_X="BeginX";m.BEGIN_Y="BeginY";m.BOTTOM_MARGIN="BottomMargin";
"HideText";m.VSDX_ID="vsdxID";m.CONNECT_TO_PART_WHOLE_SHAPE=3;B.mxVsdxConstants=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),
this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}g.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))||0}catch(a){return 0}};g.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||
null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};g.prototype.processGeoElem=function(b){var a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var c=0;c<b.length;c++)this.rows.push(null)}for(c=0;c<a.length;c++){var d=a[c],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=
function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;c=!1;for(f=0;f<b.length;f++)d=h.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[f],
this.rows),d.getIndex()>a?(this.rows.push(d),c=!0):this.rows[d.getIndex()-1]=d;c&&function(k,n){n.compare?k.sort(function(p,x){return n.compare(p,x)}):k.sort(n)}(this.rows,new g.mxVsdxGeometry$0(this))};g.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};g.prototype.getIndex$=function(){return this.index};g.prototype.isNoFill=function(){return this.noFill};g.prototype.isNoLine=
function(){return this.noLine};g.prototype.isNoShow=function(){return this.noShow};g.prototype.isNoSnap=function(){return this.noSnap};g.prototype.isNoQuickDrag=function(){return this.noQuickDrag};g.prototype.getRows=function(){return this.rows};g.prototype.getPathXML=function(b,a){if(this.noShow)return"";for(var c="",d=0;d<this.rows.length;d++){var f=this.rows[d];c=c.concat(null!=f?f.handle(b,a):"")}return c};return g}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(g){var b=
function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){c=null!=c?c.getIndex():0;d=null!=d?d.getIndex():0;return c-d};return a}();g.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}g.prototype.addGeometry=function(b){b=new h.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(this.geomList.push(b),this.sortNeeded=!0)};g.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare?
b.sort(function(c,d){return a.compare(c,d)}):b.sort(a)}(this.geomList,new g.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};g.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};g.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};g.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&
!a.isNoLine())return!1}return!0};g.prototype.hasGeom=function(){return 0!=this.geomList.length};g.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};g.prototype.rotatedPoint=function(b,a,c){var d=b.y*a+b.x*c;b.x=b.x*a-b.y*c;b.y=d};g.prototype.getRoutingPoints=function(b,a,c){this.sort();b=[];b.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var p=0;p<n.length;p++){var x=
n[p];if(0==p&&null!=x&&x instanceof h.mxgraph.io.vsdx.geometry.MoveTo)d=null!=x.x?x.x:0,f=null!=x.y?x.y:0;else if(null!=x&&x instanceof h.mxgraph.io.vsdx.geometry.LineTo){var z=null!=x.x?x.x:0;x=null!=x.y?x.y:0;var E=new mxPoint(z,x);0!==c&&(c=(360-c)*Math.PI/180,this.rotatedPoint(E,Math.cos(c),Math.sin(c)));z=(E.x-d)*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();z+=a.x;x=(E.y-f)*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;x+=a.y;z=Math.round(100*z)/100;x=Math.round(100*x)/100;
E.x=z;E.y=x;b.push(E)}}}}return b};g.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),c={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=c.str.length;var f=this.processGeo(b,a,c,-1,!0);f=this.processGeo(b,a,c,f,!1);if(c.str.length===d)return"";this.closePath(c,f);c.str=c.str.concat("</foreground></shape>");return c.str};g.prototype.processGeo=function(b,a,c,d,f){var k=b.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+
'" ');for(k=0;k<this.geomList.length;k++){var p=this.geomList[k];if(f!==p.isNoFill()){var x=p.getPathXML(a,b);0!==x.length&&(p=this.getGeoStyle(p),-1===d?c.str=c.str.concat("<path"+n+">"):d!==p&&(this.closePath(c,d),c.str=c.str.concat("<path"+n+">")),c.str=c.str.concat(x),d=p)}}return d};g.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};g.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):
2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return g}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(g){var b=function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){return c.getIndex()-d.getIndex()};return a}();g.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com=
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.masterShape=this.Id=null;this.childShapes={};this.master=b;this.Id=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}g.prototype.processMasterShapes=function(b){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var c=b.getRelationship(a.getAttribute("r:id"),h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),
d=c.getAttribute("Target");c=c.getAttribute("Type");var f=null;null!=c&&function(k,n){var p=k.length-n.length;k=k.indexOf(n,p);return-1!==k&&k===p}(c,"master")&&(f=b.getXmlDoc(h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,b);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},
d=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),c=0;c<d.length;c++)this.pageSheet[d[c].getAttribute("N")]=d[c];a=a.nextSibling}};g.prototype.processMasterShape=function(b,a,c){c||(this.firstLevelShapes=[]);for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(b.nodeName,"Shapes"))for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),
n=new h.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;c||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=b&&1==b.nodeType&&"Connects"==b.nodeName)for(this.connects={},d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new h.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;b=b.nextSibling}};g.prototype.getMasterShape=function(){return this.masterShape};
g.prototype.getSubShape=function(b){var a=this.childShapes;return a[b]?a[b]:null};g.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};g.prototype.getName=function(){return this.master.getAttribute("Name")||""};g.prototype.getUniqueID=function(){var b="";this.master.hasAttribute("UniqueID")&&(b=this.master.getAttribute("UniqueID"));return b};g.prototype.getId=function(){return this.Id};g.prototype.getMasterElement=function(){return this.master};return g}();B.mxVsdxMaster=
m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a,c){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=c;for(b=b.firstChild;null!=b;){if(a=null!=b&&1==b.nodeType)a=b.tagName.toLowerCase(),c=h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(c):a===c;if(a){this.rootElement=b;break}b=b.nextSibling}this.pm=new h.mxgraph.io.vsdx.mxPropertiesManager;
this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}g.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var b=!0,a=1;b;){var c=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"a:theme")){c=new h.mxgraph.io.vsdx.mxVsdxTheme(c);0>
c.getThemeIndex()&&c.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,c.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var p=0;p<f.entries.length;p++)if(null!=f.entries[p].key.equals&&f.entries[p].key.equals(k)||f.entries[p].key===k){f.entries[p].value=n;return}f.entries.push({key:k,
value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,c.getThemeIndex(),c);break}c=c.nextSibling}a++}else b=!1}};g.prototype.initStylesheets=function(){var b=this.rootElement.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<b.length){b=b.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=b.length,c=0;c<a;c++){var d=b.item(c),f=d.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new h.mxgraph.io.vsdx.Style(d,
this);this.stylesheets[f]=d}}for(b=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));b.hasNext();)d=b.next(),d.stylesheetRefs(this)};g.prototype.initMasters=function(){if(null!=this.xmlDocs){var b=function(c,d){return c[d]?c[d]:null}(this.xmlDocs,h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=
b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,h.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,"Master")){var a=new h.mxgraph.io.vsdx.mxVsdxMaster(b,this);this.masters[a.getId()]=a}b=b.nextSibling}break}b=b.nextSibling}}};g.prototype.initPages=function(){if(null!=this.xmlDocs){var b=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+
"/pages/pages.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.tagName,h.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};b={};for(var c=a.length,d=0;d<c;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&
k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})}(b,f.getId(),f);(function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,
f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(c=0;c<a.length;c++)f=a[c].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(b,d),f.setBackPage(d))}break}b=b.nextSibling}}};g.prototype.getPages=function(){return this.pages};g.prototype.getThemes=function(){return this.themes};
g.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};g.prototype.getRelationship=function(b,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==b||0===b.length)return null;a=a.getElementsByTagName("Relationship");for(var c=0;c<a.length;c++){var d=a.item(c);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),
b))return d}return null};g.prototype.getMaster=function(b){var a=this.masters;return a[b]?a[b]:null};g.prototype.createPage=function(b){return new h.mxgraph.io.vsdx.mxVsdxPage(b,this)};g.prototype.getPropertiesManager=function(){return this.pm};g.prototype.setPropertiesManager=function(b){this.pm=b};g.prototype.getMasterShapes=function(){return this.masters};g.prototype.setMasterShapes=function(b){this.masters=b};g.prototype.getStylesheet=function(b){var a=this.stylesheets;return a[b]?a[b]:null};
g.prototype.getXmlDoc=function(b){var a=this.xmlDocs;return a[b]?a[b]:null};g.prototype.getMedia=function(b){var a=this.media;return a[b]?a[b]:null};return g}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=b;this.layers=[];var c=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=c)d=h.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=c&&c.equals?c.equals(d):c===d;this.__isBackground=
d?!0:!1;c=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=c&&0<c.length&&(this.backPageId=parseFloat(c));this.Id=parseFloat(b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<c.length){c=c[0];d=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,
"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Section");for(d=0;d<c.length;d++)if(f=c[d],n=f.getAttribute("N"),"Layer"==n)for(n=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var p={},x=0;x<k.length;x++)p[k[x].getAttribute("N")]=k[x].getAttribute("V");null==p.Name&&(p.Name="Layer "+
f);this.layers[parseInt(n[f].getAttribute("IX"))]=p}}this.parseNodes(b,a,"pages")}g.prototype.parseNodes=function(b,a,c){for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"Connects"))for(f=f.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new h.mxgraph.io.vsdx.mxVsdxConnect(k),p=n.getFromSheet();this.connectsMap[p]=
!0;p=null!=p&&-1<p?function(x,z){null==x.entries&&(x.entries=[]);for(var E=0;E<x.entries.length;E++)if(null!=x.entries[E].key.equals&&x.entries[E].key.equals(z)||x.entries[E].key===z)return x.entries[E].value;return null}(this.connects,p):null;null!=p?p.addConnect(k):function(x,z,E){null==x.entries&&(x.entries=[]);for(var I=0;I<x.entries.length;I++)if(null!=x.entries[I].key.equals&&x.entries[I].key.equals(z)||x.entries[I].key===z){x.entries[I].value=E;return}x.entries.push({key:z,value:E,getKey:function(){return this.key},
getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"Rel")?this.resolveRel(f,a,c):function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};g.prototype.resolveRel=function(b,
a,c){c=a.getRelationship(b.getAttribute("r:id"),h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+c+".xml.rels");b=c.getAttribute("Target");c=c.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(c)).toString(),"page")){var d=null;null!=c&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(c,"page")&&(d=a.getXmlDoc(h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=d)for(c=d.firstChild;null!=c;){if(null!=
c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"PageContents")){d=b.indexOf(".");-1!==d&&this.parseNodes(c,a,b.substring(0,d));break}c=c.nextSibling}}};g.prototype.parseShapes=function(b,a,c){c={};b=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f=a;if(null==f){var k=d.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==k||function(p,x){return p&&p.equals?
p.equals(x):p===x}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(p,x,z){null==p.entries&&(p.entries=[]);for(var E=0;E<p.entries.length;E++)if(null!=p.entries[E].key.equals&&p.entries[E].key.equals(x)||p.entries[E].key===x){p.entries[E].value=
z;return}p.entries.push({key:x,value:z,getKey:function(){return this.key},getValue:function(){return this.value}})})(c,d.getId(),d)}b=b.nextSibling}return c};g.prototype.createCell=function(b,a,c){return new h.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),c,this.model)};g.prototype.isEdge=function(b){if(null!=b&&(b=b.childNodes,null!=b))for(b=b.item(0);null!=b;){if(null!=b&&1==b.nodeType){var a=b;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),
function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginX")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndX")))return!0}b=b.nextSibling}return!1};g.prototype.getPageDimensions=function(){var b=0,a=0,c=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageWidth");null!=c&&(b=parseFloat(c.getAttribute("V"))*
h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),b=Math.round(100*b)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,b)};g.prototype.getDrawingScale=function(){var b=this.cellElements;b=b.DrawingScale?b.DrawingScale:null;return null!=b?parseFloat(b.getAttribute("V"))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};g.prototype.getPageScale=function(){var b=this.cellElements;b=b.PageScale?
b.PageScale:null;return null!=b?parseFloat(b.getAttribute("V"))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};g.prototype.getCellValue=function(b){var a=this.cellElements;b=a[b]?a[b]:null;return null!=b?b.getAttribute("V")||"":null};g.prototype.getCellIntValue=function(b,a){b=this.getCellValue(b);return null!=b?parseInt(b):a};g.prototype.getId=function(){return this.Id};g.prototype.getPageName=function(){return this.pageName};g.prototype.getPageNameU=function(){return this.pageNameU};g.prototype.getShapes=
function(){return this.shapes};g.prototype.getLayers=function(){return this.layers};g.prototype.getConnects=function(){return this.connects};g.prototype.isBackground=function(){return this.__isBackground};g.prototype.getBackPageId=function(){return this.backPageId};g.prototype.setBackPage=function(b){this.backPage=b};g.prototype.getBackPage=function(){return this.backPage};return g}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||
(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var c=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f}};return c(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new h.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new h.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new h.mxgraph.io.vsdx.theme.LineStyle;this.fillStyles=
[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantLineIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));
return f};return c(a)}([4,4]);this.variantEffectIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantFontIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=b;this.name=b.getAttribute("name")||"";b=function(a,c){return a[c]?a[c]:
null}(g.themesIds_$LI$(),this.name);null!=b&&(this.themeIndex=b)}g.__static_initialize=function(){g.__static_initialized||(g.__static_initialized=!0,g.__static_initializer_0(),g.__static_initializer_1())};g.themesIds_$LI$=function(){g.__static_initialize();null==g.themesIds&&(g.themesIds={});return g.themesIds};g.__static_initializer_0=function(){g.themesIds_$LI$().Office=33;g.themesIds_$LI$().Linear=34;g.themesIds_$LI$().Zephyr=35;g.themesIds_$LI$().Integral=36;g.themesIds_$LI$().Simple=37;g.themesIds_$LI$().Whisp=
38;g.themesIds_$LI$().Daybreak=39;g.themesIds_$LI$().Parallel=40;g.themesIds_$LI$().Sequence=41;g.themesIds_$LI$().Slice=42;g.themesIds_$LI$().Ion=43;g.themesIds_$LI$().Retrospect=44;g.themesIds_$LI$().Organic=45;g.themesIds_$LI$().Bubble=46;g.themesIds_$LI$().Clouds=47;g.themesIds_$LI$().Gemstone=48;g.themesIds_$LI$().Lines=49;g.themesIds_$LI$().Facet=50;g.themesIds_$LI$().Prominence=51;g.themesIds_$LI$().Smoke=52;g.themesIds_$LI$().Radiance=53;g.themesIds_$LI$().Shade=54;g.themesIds_$LI$().Pencil=
55;g.themesIds_$LI$().Pen=56;g.themesIds_$LI$().Marker=57;g.themesIds_$LI$().Whiteboard=58};g.colorIds_$LI$=function(){g.__static_initialize();null==g.colorIds&&(g.colorIds={});return g.colorIds};g.__static_initializer_1=function(){(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),
0,"dk1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),1,"lt1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===
a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),2,"accent1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),3,"accent2");
(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),4,"accent3");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=
c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),5,"accent4");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),6,"accent5");(function(b,a,c){null==
b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),7,"accent6")};g.prototype.getThemeIndex=function(){return this.themeIndex};g.prototype.setVariant=function(b){this.themeVariant=b};g.prototype.isPure=function(){return this.__isPure};g.prototype.processTheme=
function(){if(!this.isProcessed){try{for(var b=this.theme.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.nodeName,"a:themeElements"))for(var a=b.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var c=a,d=c.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processColors(c)):function(f,k){return f&&f.equals?
f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFonts(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFormats(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(c)}a=a.nextSibling}b=b.nextSibling}}catch(f){}this.isProcessed=
!0}};g.prototype.processExtras=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(c.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=c.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "a:fillStyleLst":f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var k=0;k<f.length;k++)this.connFillStyles.push(h.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new h.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(k=0;k<f.length;k++)this.connLineStylesExt.push(new h.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new h.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);
break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),f=d=0;f<c.length;f++){k=c[f];this.variantEmbellishment[d]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,p=0;p<k.length;p++){var x=k[p];this.variantFillIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,
"fillIdx");this.variantLineIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"lineIdx");this.variantEffectIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"effectIdx");this.variantFontIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"fontIdx");n++}d++}}}};g.prototype.fillFontStyles=function(b,a,c){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var d=0;d<b.length;d++){var f=
b[d];c.push(h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};g.prototype.processFormats=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=b[a];switch(c.nodeName){case "a:fillStyleLst":c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);
for(var d=0;d<c.length;d++)this.fillStyles.push(h.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(c[d]));break;case "a:lnStyleLst":for(c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),d=0;d<c.length;d++)this.lineStyles.push(new h.mxgraph.io.vsdx.theme.LineStyle(c[d]))}}};g.prototype.processFonts=function(b){};g.prototype.processColors=function(b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var a=b,c=a.nodeName;a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=
(d=c)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(c=c.substring(2),0<a.length&&this.addBasicColor(c,a[0]))}b=b.nextSibling}};g.prototype.addVariantColors=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0,c=0;c<b.length;c++){var d=b[c];this.addVariantColorsSet(a++,d)}}};g.prototype.addVariantColorsSet=
function(b,a){var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[b]=a.hasAttribute("monotone");for(a=0;a<c.length;a++){var d=c[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[b][0]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[b][1]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor3":this.variantsColors[b][2]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[b][3]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[b][4]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor6":this.variantsColors[b][5]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[b][6]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};g.prototype.addBkgndColor=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.bkgndColor=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b)))};
g.prototype.extractThemeIndex=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.themeIndex=parseInt(b.getAttribute("schemeEnum")))};g.prototype.addBasicColor=function(b,a){this.baseColors[b]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};g.prototype.getSchemeColor=function(b){this.processTheme();var a=this.baseColors;b=a[b]?a[b]:null;return null!=b?b.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};g.prototype.getStyleColor=function(b){this.processTheme();
if(8>b){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(g.colorIds_$LI$(),b));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===b){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var c=0;200<=b?c=b-200:
100<=b&&(c=b-100);0<=c&&6>=c&&(a=this.variantsColors[this.themeVariant][c]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};g.prototype.getFillGraientColor=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!0)};g.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!1)};g.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=
function(b,a){this.processTheme();var c=b.getQuickStyleFillColor(),d=null;switch(b.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[b.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(c=100),d=b.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof h.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(c,this).getGradientClr():null:
d.applyStyle(c,this):a?null:this.getStyleColor(c);c=b.getQuickStyleVariation();if(null!=a&&0<(c&8)){c=this.getStyleColor(8).toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);d=b.toHsl();var f=a.toHsl();.1666<=Math.abs(c.getLum()-f.getLum())||(.7292>=c.getLum()?a=new h.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(c.getLum()-d.getLum())>Math.abs(c.getLum()-f.getLum())&&(a=b))}return a};g.prototype.getFillColor=function(b,a){if(!(null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||
null===b)||"boolean"!==typeof a&&null!==a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,a)};g.prototype.getLineStyle=function(b,a){this.processTheme();var c=null;switch(b){case 1:case 2:case 3:case 4:case 5:case 6:c=a[b-1];break;case 100:case 101:case 102:case 103:c=a===this.lineStyles?
this.lineStyles[this.variantLineIdx[this.themeVariant][b-100]-1]:this.defaultLineStyle}return c};g.prototype.getLineStyleExt=function(b,a){this.processTheme();var c=null;switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:c=a[b]}return c};g.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleLineColor();a=this.getLineStyle(b.getQuickStyleLineMatrix(),a);switch(b.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(c=100)}c=null!=a?a.getLineColor(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();b=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var d=b.toHsl(),f=c.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?c=new h.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(c=b))}return c};g.prototype.getLineColor=function(b,a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||
null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};g.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};
g.prototype.getConnLineColor=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};g.prototype.getDefaultLineClr=function(){return this.defaultLineClr};g.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.isDashed():
!1};g.prototype.isLineDashed=function(b,a,c){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,c);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");
};g.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};g.prototype.isConnLineDashed=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};g.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=
function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.getLineDashPattern():null};g.prototype.getLineDashPattern=function(b,a,c){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,
a,c);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};g.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};g.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,
this.connLineStylesExt,this.connLineStyles)};g.prototype.getArrowSize=function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStartSize():c.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStartSize():b.getEndSize():4};g.prototype.getStartSize=function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};g.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};
g.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};g.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};g.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleFontColor(),d=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(c=100),d=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}c=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=c.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var k=a.toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var n=b.toHsl();.1666<=Math.abs(d.getLum()-
f.getLum())||(.7292>=d.getLum()?c=new h.mxgraph.io.vsdx.theme.Color(255,255,255):(n=Math.abs(d.getLum()-n.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(n,k,d),d==n?c=b:d==k&&(c=a)))}return c};g.prototype.getFontColor=function(b,a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof
h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};g.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.fontColors)};g.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};g.prototype.getArrowType=
function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStart():c.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStart():b.getEnd():0};g.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)};g.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};g.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=
function(b,a){b=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=b?b.getLineWidth():0};g.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);
throw Error("invalid overload");};g.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};g.prototype.getConnLineWidth=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};return g}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io=
{}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(){}g.conversionFactor_$LI$=function(){null==g.conversionFactor&&(g.conversionFactor=g.screenCoordinatesPerCm*g.CENTIMETERS_PER_INCHES);return g.conversionFactor};g.getDirectChildNamedElements=function(b,a){var c=[];for(b=b.firstChild;null!=b;b=b.nextSibling){var d;if(d=null!=b&&1==b.nodeType){d=a;var f=b.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&c.push(b)}return c};g.getDirectChildElements=function(b){var a=[];for(b=
b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&a.push(b);return a};g.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};g.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,c){try{var d=b.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return c};g.getIntAttr=function(b,a,c){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof c&&null!==c){if((null==
b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==c)throw Error("invalid overload");return h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,c)};g.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return g.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};g.getStyleString=function(b,a){for(var c="",d=function(p){var x=0;return{next:function(){return x<
p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(function(p){return Object.keys(p).map(function(x){return p[x]})}(b)),f=function(p){var x=0;return{next:function(){return x<p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(Object.keys(b));f.hasNext();){var k=f.next(),n=d.next();if(!function(p,x){return p&&p.equals?p.equals(x):p===x}(k,mxConstants.STYLE_SHAPE)||!function(p,x,z){void 0===z&&(z=0);return p.substr(z,x.length)===x}(b[k]?b[k]:null,"image")&&!function(p,x,z){void 0===
z&&(z=0);return p.substr(z,x.length)===x}(b[k]?b[k]:null,"rounded="))try{c=c+k+a}catch(p){}c=c+n+";"}return c};g.surroundByTags=function(b,a,c){return"<"+a+(c?' style="'+c+'"':"")+">"+b+"</"+a+">"};g.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&amp;").replace(RegExp('"',"g"),"&quot;").replace(RegExp("'","g"),"&prime;").replace(RegExp("<","g"),"&lt;").replace(RegExp(">","g"),"&gt;")};g.toInitialCapital=function(b){b=b.split(" ");for(var a="",c=0;c<b.length;c++){var d=b[c],f=d.substring(0,
1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};g.toSmallCaps=function(b,a){var c="",d=c;if(a&&a.equals?a.equals(d):a===d)c=b;else for(b=b.split(""),d=0;d<b.length;d++){var f=b[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),c+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):c+=f}return c};g.getStyleMap=function(b,
a){var c={};b=b.split(";");for(var d=0;d<b.length;d++){var f=b[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);c[n]=f}return c};g.isInsideTriangle=function(b,a,c,d,f,k,n,p){var x=(b-f)*(d-k)-(c-f)*(a-k);f=(b-n)*(k-p)-(f-n)*(a-p);b=(b-c)*(p-d)-(n-c)*(a-d);return!((0>x||0>f||0>b)&&(0<x||0<f||0<b))};return g}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a,c,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(b);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=c}g.prototype.addText=function(b,a,c){this.values.push(b);this.charIndices.push(a);this.fields.push(c)};g.prototype.getParagraphIndex=function(){return this.paraIndex};g.prototype.getValue=function(b){return this.values[b]};g.prototype.numValues=
function(){return this.values.length};g.prototype.getChar=function(b){return this.charIndices[b]};g.prototype.getField=function(b){return this.fields[b]};return g}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.elem=b}g.prototype.getIndexedCell=function(b,a){for(var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("IX");if(function(x,z){return x&&x.equals?x.equals(z):x===z}(k,b)||null==b){f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var p=f[n];k=p.getAttribute("N");if(function(x,z){return x&&
x.equals?x.equals(z):x===z}(k,a))return p}}}return null};return g}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.pageNumber=0;this.pageNumber=b;this.Id=a}g.prototype.getId=function(){return this.Id};g.prototype.getPageNumber=function(){return this.pageNumber};g.prototype.equals=function(b){return null==b||this.constructor!==b.constructor||this.pageNumber!==b.pageNumber||this.Id!==b.Id?!1:!0};g.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return g}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(A.vsdx||
(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=c;this.blue=d}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue};
b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,Math.min(c,d)),n=(f+k)/2;if(f===k)a=k=0;else{var p=f-k;k=.5<n?p/(2-f-k):p/(f+k);a=(f===a?(c-d)/p+(c<d?6:0):f===c?(d-a)/p+2:(a-c)/p+4)/6}return new h.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};b.prototype.toHsv=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,
Math.min(c,d)),n=f-k;a=f===k?0:(f===a?(c-d)/n+(c<d?6:0):f===c?(d-a)/n+2:(a-c)/n+4)/6;return new h.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var c=this.green.toString(16);c=1==c.length?"0"+c:c;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+c+d};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr=
function(a){this.gradientClr=a};return b}();m.Color=g;g.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.getFillStyle=function(a){var c=null;switch(a.nodeName){case "a:solidFill":c=new h.mxgraph.io.vsdx.theme.SolidFillStyle(h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":c=new h.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":c=new h.mxgraph.io.vsdx.theme.GradFill(a)}return c};return b}();m.FillStyleFactory=
g;g.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.color2=this.color1=null;a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-
1]))));null==this.color1&&(this.color1=this.color2=new h.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,c){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c));return d};return b}();m.GradFill=g;g.__class="com.mxgraph.io.vsdx.theme.GradFill";g.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=c;this.lum=d}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,c,d){0>d&&(d+=1);1<d&&--d;return d<1/6?
a+6*(c-a)*d:.5>d?c:d<2/3?a+(c-a)*(2/3-d)*6:a};b.prototype.toRgb=function(){var a=this.hue;var c=this.sat;var d=this.lum;if(0===c)d=c=a=d;else{var f=.5>d?d*(1+c):d+c-d*c,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);c=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new h.mxgraph.io.vsdx.theme.Color(255*d|0,255*c|0,255*a|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*=
a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();m.HSLColor=g;g.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d){this.h=a;this.s=c;this.v=d}b.prototype.toRgb=function(){var a=6*this.h,c=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-c);var k=this.v*(1-f*c);c=this.v*(1-(1-f)*c);d=(d|0)%6;return new h.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,c,this.v][d]|0,255*[c,this.v,this.v,k,a,a][d]|0,255*[a,a,c,this.v,this.v,k][d]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=
1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();m.HSVColor=g;g.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx=
{}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=
this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var c=a.getAttribute("cap");if(null!=c)switch(c){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}c=
a.getAttribute("cmpd");if(null!=c)switch(c){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<c.length;d++){var f=c[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=
h.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);
this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],p=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,
"d");n=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(p/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,
"w");this.headEndLen=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=
null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}b.prototype.getLineEndType=function(a){var c=null;switch(a.getAttribute("type")){case "none":c=
b.LineEndType.NONE;break;case "triangle":c=b.LineEndType.TRIANGLE;break;case "stealth":c=b.LineEndType.STEALTH;break;case "diamond":c=b.LineEndType.DIAMOND;break;case "oval":c=b.LineEndType.OVAL;break;case "arrow":c=b.LineEndType.ARROW}return c};b.prototype.getLineColor=function(a,c){return null!=this.fillStyle?this.fillStyle.applyStyle(a,c):c.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=
function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();m.LineStyle=g;g.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";
a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(b.CompoundLineType||(b.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(b.LineEndType||(b.LineEndType={}))})(g=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,
"startSize");this.end=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=h.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}b.prototype.getRndg=function(){return this.rndg};b.prototype.getStart=function(){return this.start};b.prototype.getStartSize=
function(){return this.startSize};b.prototype.getEnd=function(){return this.end};b.prototype.getEndSize=function(){return this.endSize};b.prototype.isDashed=function(){return 1<this.pattern};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};return b}();m.LineStyleExt=g;g.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.prototype.applyStyle=function(a,c){return h.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return b}();m.NoFillStyle=g;g.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";g.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}b.prototype.calcColor=
function(a,c){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};b.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,c){if(this.isDynamic||!this.isInitialized)this.calcColor(a,c),this.isInitialized=!0;return this.color};b.prototype.getColor=function(a,c){if("number"!==typeof a&&null!==a||
!(null!=c&&c instanceof h.mxgraph.io.vsdx.mxVsdxTheme||null===c)){if((null!=a&&a instanceof h.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===c)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};b.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};b.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};b.prototype.setShade=
function(a){this.shade=a;this.hasEffects=!0};b.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};b.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};b.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};b.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};b.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};b.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};b.prototype.setHue=function(a){this.hue=a;this.hasEffects=
!0};b.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};b.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};b.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};b.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};b.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};b.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};b.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};b.prototype.setLumMod=function(a){this.lumMod=
a;this.hasEffects=!0};b.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};b.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};b.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};b.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};b.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};b.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};b.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};b.prototype.setBlueOff=
function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};b.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};b.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return b}();m.OoxmlColor=g;g.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.getOoxmlColor=function(a){var c=null;switch(a.nodeName){case "a:scrgbClr":c=new h.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":c=new h.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":c=new h.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),
parseInt(a.getAttribute("lum")));break;case "a:sysClr":c=new h.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":c=new h.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":c=new h.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":c.setTint(k);break;
case "a:shade":c.setShade(k);break;case "a:satMod":c.setSatMod(k);break;case "a:lumMod":c.setLumMod(k);break;case "a:hueMod":c.setHueMod(k)}}return c};return b}();m.OoxmlColorFactory=g;g.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d,f,k,n,p,x,z,E){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=c;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=
n;this.quickStyleLineMatrix=p;this.quickStyleShadowColor=x;this.quickStyleType=z;this.quickStyleVariation=E}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};
b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor=
function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType=
function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();m.QuickStyleVals=g;g.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,c){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};return b}();m.SolidFillStyle=g;g.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";g.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";A.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(){function m(){}m.getRotatedPoint=function(g,b,a,c){var d=g.x-c.x;g=g.y-c.y;return new mxPoint(d*b-g*a+c.x,g*b+d*a+c.y)};m.rotatedGeometry=function(g,b,a,c){b=b*Math.PI/180;var d=Math.cos(b);b=Math.sin(b);var f=g.getCenterX()-a,k=g.getCenterY()-c;g.x=Math.round(f*d-k*b+a-g.width/2);g.y=Math.round(k*d+f*b+c-g.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";A.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(h.mxgraph||
(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),p=Math.floor(Math.round(d.getLastY()*f)/100);c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var x=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();x=f-x;var z=
this.a*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(c-n);p=Math.abs(x-p);n=p=.5*z+(n*n+p*p)/(8*z);var E=Math.abs(p);p=Math.round(100*p/k*100)/100;n=Math.round(100*n/f*100)/100;c=Math.round(100*c/k*100)/100;x=Math.round(100*x/f*100)/100;z=Math.round(100*z)/100;p=Math.abs(p);n=Math.abs(n);f=0>z?"1":"0";z=E<Math.abs(z)?"1":"0";d.setLastX(c);d.setLastY(x);return'<arc rx="'+(new String(p)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(c)).toString()+'" y="'+(new String(x)).toString()+
'" x-axis-rotation="0" large-arc-flag="'+z+'" sweep-flag="'+f+'"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.ArcTo=g;g.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){return b.call(this,c,null,null)||this}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.DelRow=g;g.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=d.getHeight();var f=d.getWidth(),k=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=c-d;var n=this.a*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
p=this.b*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=c-p;var x=this.c*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),z=this.d*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);p=Math.abs(p-d);p=Math.sqrt(n*n+p*p);x=Math.abs(x-k);z=Math.abs(c-z-d);k=100*k/f;z=Math.round(100*Math.sqrt(x*x+z*z)/c/2*100)/100;f=Math.round(100*p/f/2*100)/100;x=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;c=Math.round(100*d/c*100)/100;return'<move x="'+(new String(x)).toString()+
'" y="'+(new String(c)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(z)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(z)).toString()+'" x="'+(new String(x)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.Ellipse=
g;g.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,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();c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var p=this.a*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
x=this.b*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),z=this.c,E=this.d;c=100*c/k;n=100*n/f;var I=d.getLastX()*k/100,J=d.getLastY()*f/100,O=c*k/100,M=n*f/100,L=f-x,H=-z;z=Math.sqrt(I*I+J*J)*Math.cos(Math.atan2(J,I)-H);x=Math.sqrt(I*I+J*J)*Math.sin(Math.atan2(J,I)-H);var K=Math.sqrt(O*O+M*M)*Math.cos(Math.atan2(M,O)-H),P=Math.sqrt(O*O+M*M)*Math.sin(Math.atan2(M,O)-H),Q=Math.sqrt(p*p+L*L)*Math.cos(Math.atan2(L,p)-H),R=Math.sqrt(p*p+L*L)*Math.sin(Math.atan2(L,p)-H),ha=((z-K)*(z+K)*(P-R)-(K-
Q)*(K+Q)*(x-P)+E*E*(x-P)*(P-R)*(x-R))/(2*((z-K)*(P-R)-(K-Q)*(x-P))),X=((z-K)*(K-Q)*(z-Q)/(E*E)+(K-Q)*(x-P)*(x+P)-(z-K)*(P-R)*(P+R))/(2*((K-Q)*(x-P)-(z-K)*(P-R))),T=z-ha,V=x-X;T=Math.sqrt(T*T+V*V*E*E);E=T/E;H=180*H/Math.PI;c=Math.round(100*c)/100;n=Math.round(100*n)/100;T=Math.round(100*T/k*100)/100;E=Math.round(100*E/f*100)/100;H=Math.round(100*H)/100;f=0<(O-I)*(L-J)-(M-J)*(p-I)?"0":"1";k="0";h.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ha,X,z,x,K,P,Q,R)&&(k="1");d.setLastX(c);d.setLastY(n);return'<arc rx="'+
(new String(T)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(c)).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(c,d,f,k,n,p,x,z){f-=c;k-=d;p-=d;n=x-c;z-=d;d=c=0;f=180*(Math.atan2(k,f)-Math.atan2(d,c))/Math.PI;n=180*(Math.atan2(p,n)-Math.atan2(d,c))/Math.PI;c=180*(Math.atan2(z,x)-Math.atan2(d,c))/Math.PI;f=(f-c)%360;n=(n-c)%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}(h.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=g;g.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=g;g.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+
(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);m.LineTo=g;g.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);
d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);m.MoveTo=g;g.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x,z){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;c.formulaE=z;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.formulaE.split("NURBS(").join("");p=p.split(")").join("");
p=new a.Nurbs(this,p,k,f);if(2<=p.getSize()){var x=p.getX(0),z=p.getY(0),E=p.getX(1),I=p.getY(1);c=Math.round(100*c/k*100)/100;n=Math.round(100*(100-100*n/f))/100;x=Math.round(100*x)/100;z=Math.round(100*z)/100;E=Math.round(100*E)/100;I=Math.round(100*I)/100;d.setLastX(c);d.setLastY(n);if(3===p.getDegree()&&p.isOrderedByThree(this.getA())){d=[];f=[];k=[];z=p.getSize();for(x=0;x<z-1;x+=3)d.push(new mxPoint(p.getX(x),p.getY(x))),f.push(new mxPoint(p.getX(x+1),p.getY(x+1))),x<z-2?k.push(new mxPoint(p.getX(x+
2),p.getY(x+2))):k.push(new mxPoint(c,n));c="";for(x=0;x<d.length;x++)c+='<curve x1="'+d[x].x+'" y1="'+d[x].y+'" x2="'+f[x].x+'" y2="'+f[x].y+'" x3="'+k[x].x+'" y3="'+k[x].y+'"/>\n';return c}return'<curve x1="'+(new String(x)).toString()+'" y1="'+(new String(z)).toString()+'" x2="'+(new String(E)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=g;g.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";
(function(b){var a=function(){function c(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}c.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,p=Math.round(100*this.getKnot(f+2))/100;if(k!==
n||k!==p||n!==p)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};c.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};c.prototype.getKnotLast=function(){return this.nurbsValues[0]};c.prototype.getDegree=function(){return this.nurbsValues[1]};c.prototype.getXType=function(){return this.nurbsValues[2]};c.prototype.getYType=function(){return this.nurbsValues[3]};c.prototype.getX=
function(d){return this.nurbsValues[4*(d+1)]};c.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};c.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};c.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return c}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(g=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.formulaA=k;return c}__extends(a,b);a.prototype.handle=function(c,d){c="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;p=Math.round(100*(100-100*p/f))/100;var x=this.formulaA.replace(RegExp("\\s",
"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var z=x&&x.equals?x.equals("inh"):"inh"===x;if(z)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});x=x.split(",").slice(0).slice(0);z=parseFloat(x.splice(0,1));parseFloat(x.splice(0,1));for(var E,I;0<x.length;)E=parseFloat(x.splice(0,1))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
I=parseFloat(x.splice(0,1))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===z&&(E=100*E/k),1===z&&(I=100*I/f),I=100-I,E=Math.round(100*E)/100,I=Math.round(100*I)/100,d.setLastX(E),d.setLastY(I),c+='<line x="'+(new String(E)).toString()+'" y="'+(new String(I)).toString()+'"/>';c+='<line x="'+(new String(n)).toString()+'" y="'+(new String(p)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===p&&(c+="<close/>")}return c};return a}(h.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=g;g.__class=
"com.mxgraph.io.vsdx.geometry.PolylineTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,p=100*this.c,x=100-100*this.d;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;p=Math.round(100*
p)/100;x=Math.round(100*x)/100;d.setLastX(c);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(p)).toString()+'" y2="'+(new String(x)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||
(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);
m.RelMoveTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;d.setLastX(c);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'+
(new String(n)).toString()+'" x2="'+(new String(c)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();c=Math.round(100*c)/100;f=Math.round(100*(100-f))/100;d.setLastX(c);d.setLastY(f)}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);
m.SplineKnot=g;g.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);c=Math.round(100*c)/
100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(c);d.setLastY(f);return"<curve "}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.SplineStart=g;g.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();b=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=b&&0!==b.length?parseFloat(b):-1}catch(c){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}g.__static_initialize=function(){g.__static_initialized||(g.__static_initialized=!0,g.__static_initializer_0(),
g.__static_initializer_1())};g.styleTypes_$LI$=function(){g.__static_initialize();null==g.styleTypes&&(g.styleTypes={});return g.styleTypes};g.__static_initializer_0=function(){g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;
g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$().QuickStyleFillColor=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$().QuickStyleFillMatrix=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]=
h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$().QuickStyleLineColor=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$().QuickStyleLineMatrix=
h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;
g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]=
h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$().QuickStyleFontColor=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$().QuickStyleFontMatrix=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};g.prototype.getTheme=function(){return null};g.prototype.getQuickStyleVals=function(){return null};g.prototype.isVertex=function(){return!1};g.prototype.styleDebug=function(b){g.vsdxStyleDebug&&console.info(b)};g.prototype.stylesheetRefs=function(b){this.styleParents[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
b.getStylesheet(this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=b.getStylesheet(this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=b.getStylesheet(this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=b.getStylesheet("0")};g.prototype.cacheCells=function(b){if(null!=this.shape){var a=this.shape.childNodes;
if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,b),a=a.nextSibling}};g.prototype.parseShapeElem=function(b,a){a=b.nodeName;(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"Cell")?this.cellElements[b.getAttribute("N")]=b:function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Section")&&this.parseSection(b)};g.prototype.parseSection=function(b){var a=new h.mxgraph.io.vsdx.Section(b);this.sections[b.getAttribute("N")]=a};g.prototype.hasProperty=function(b,a){return this.cellElements.hasOwnProperty(a)};
g.prototype.getValue=function(b,a){return null!=b?b.getAttribute("V")||"":a};g.prototype.getValueAsDouble=function(b,a){if(null!=b){var c=b.getAttribute("V");if(null!=c){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(c,"Themed"))return 0;try{var d=parseFloat(c);(function(f,k){return f&&f.equals?f.equals(k):f===k})(b.getAttribute("U"),"PT")&&(d*=h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};g.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=
function(b,a){if(null!=b&&(b=b.getAttribute("V"),null!=b))try{var c=parseFloat(b);return this.getScreenNumericalValue$double(c)}catch(d){}return a};g.prototype.getScreenNumericalValue=function(b,a){if((null==b||1!=b.nodeType)&&null!==b||"number"!==typeof a&&null!==a){if("number"!==typeof b&&null!==b||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(b)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(b,a)};g.prototype.getScreenNumericalValue$double=
function(b){return b*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};g.prototype.getAttribute=function(b,a,c){var d=this.cellElements;b=d[b]?d[b]:null;null!=b&&(c=b.getAttribute(a)||"");return c};g.prototype.getChildValues=function(b,a){var c={};for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=
n&&(k=d.getAttribute(n)||"")}c[f]=k}b=b.nextSibling}return c};g.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(b,a,c){var d=function(p,x){return p[x]?p[x]:null}(this.sections,c),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,b));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(p,x){return p&&p.equals?p.equals(x):p===x}(d,"Inh")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed"))k=!0;else if(function(p,x){return p&&
p.equals?p.equals(x):p===x}(d,"THEMEVAL()")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed")&&null!=this.style){if(function(p,x){return p&&p.equals?p.equals(x):p===x}(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c);if(null!=d)return d}}if(null==f||k)if(k=function(p,x){return p[x]?p[x]:null}(g.styleTypes_$LI$(),c),k=function(p,x){return p[x]?p[x]:null}(this.styleParents,k),null!=k&&(b=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,
a,c),null!=b))return b;return f};g.prototype.getCellElement=function(b,a,c){if("string"!==typeof b&&null!==b||"string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c){if("string"!==typeof b&&null!==b||void 0!==a||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(b)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c)};g.prototype.getCellElement$java_lang_String=function(b){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,
b),c=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))c=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,
b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,
b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,b))return a;d=this.style.getCellElement$java_lang_String(b);if(null!=d)return d}}if(null==a||c)if(c=function(k,n){return k[n]?k[n]:null}(g.styleTypes_$LI$(),b),c=function(k,n){return k[n]?k[n]:null}(this.styleParents,c),null!=c&&(b=c.getCellElement$java_lang_String(b),null!=b))return b;return a};g.prototype.getStrokeColor=function(){var b="";(function(a,c){return a&&a.equals?a.equals(c):a===c})(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),
"1"),"0")?b="none":(b=this.getColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,c){return a&&a.equals?a.equals(c):a===c}("Themed",b)&&(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return b};g.prototype.getFillColor=function(){if(function(c,d){return c&&c.equals?c.equals(d):c===d}("1",this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),
"0"))){var b=function(c,d){return c[d]?c[d]:null}(this.sections,"FillGradient");if(null!=b&&(b=this.getColor(b.getIndexedCell("0","GradientStopColor")),null!=b&&0!==b.length))return b}b=this.getColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(c,d){return c&&c.equals?c.equals(d):c===d})("Themed",b)&&(b=this.getTheme(),null!=b?(b=b.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),b=b.toHexStr()):b="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),
"0");return null!=a&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?"none":b};g.prototype.getColor=function(b){b=this.getValue(b,"");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)||function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};g.prototype.getTextBkgndColor=function(b){b=this.getValue(b,"");return function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")?b:function(a,c){return a&&a.equals?
a.equals(c):a===c}(b,"0")||function(a,c){return a&&a.equals?a.equals(c):a===c}(b,"255")||0===b.length?"none":this.pm.getColor((new String(parseInt(b)-1)).toString())};g.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};g.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),
0)};g.prototype.getNameU=function(){return this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};g.prototype.getName=function(){return this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};g.prototype.getUniqueID=function(){return this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};g.prototype.getId=function(){return this.Id};g.prototype.getTextColor=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR,
b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=this.getValue(b,"#000000");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)?(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};g.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),
0)};g.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN),0)};g.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};g.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),
0)};g.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.STYLE,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};g.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};g.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.POS,
b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};g.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};g.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
return this.getValue(b,"")};g.prototype.getHorizontalAlign=function(b,a){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(b,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};g.prototype.getIndentFirst=
function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};g.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,
0))|0)).toString()};g.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};g.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);
return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};g.prototype.getSpAfter=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};g.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,
b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a=b&&b.equals?b.equals(""):""===b;return a?0:parseFloat(b)};g.prototype.getFlags=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};g.prototype.getLetterSpace=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,
b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};g.prototype.getBullet=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BULLET,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};g.prototype.getShape=function(){return this.shape};g.prototype.setShape=function(b){this.shape=b};g.lineDashPatterns_$LI$=function(){g.__static_initialize();
null==g.lineDashPatterns&&(g.lineDashPatterns=[]);return g.lineDashPatterns};g.__static_initializer_1=function(){g.lineDashPatterns_$LI$().push([]);g.lineDashPatterns_$LI$().push([]);g.lineDashPatterns_$LI$().push([]);var b=[];b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);
b=[];b.push(g.DASH);b.push(g.SPACE);b.push(g.DASH);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.SPACE);b.push(g.SHORT_DASH);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.SPACE);b.push(g.SHORT_DASH);b.push(g.SPACE);b.push(g.SHORT_DASH);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DOT);b.push(g.SHORT_SPACE);
g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SHORT_SPACE);
b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SHORT_SPACE);b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);
b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.XLONG_DASH);b.push(g.LONG_SPACE);b.push(g.DASH);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.XLONG_DASH);b.push(g.LONG_SPACE);b.push(g.DASH);b.push(g.LONG_SPACE);
b.push(g.DASH);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.XSHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b)};g.getLineDashPattern=function(b){return 0<=b&&23>=b?g.lineDashPatterns_$LI$()[b]:g.lineDashPatterns_$LI$()[0]};return g}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(A.vsdx||
(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){var k=b.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=c/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new h.mxgraph.io.vsdx.theme.HSLColor(c,d,f)).toRgb();return k}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=g;g.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||
(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){var d=b.call(this)||this;d.val=c;d.color=new h.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=g;g.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){var d=b.call(this)||this;d.isDynamic=!0;d.val=c;return d}__extends(a,b);a.prototype.calcColor=function(c,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(c):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,c,d)};return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=g;g.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||
(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){var k=b.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=c;k.g=d;k.b=f;k.color=new h.mxgraph.io.vsdx.theme.Color(c,d,f);return k}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=g;g.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){var d=b.call(this)||this;d.hexVal=null;d.hexVal=c;d.color=h.mxgraph.io.vsdx.theme.Color.decodeColorHex(c);return d}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=g;g.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d){var f=b.call(this)||this;f.lastClr=null;f.val=c;f.lastClr=d;if(null==d)switch(c){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=h.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=g;g.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||
(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){return b.call(this,c,d,f,k,n,p,x)||this}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return b.prototype.handle.call(this,
c,d)};return a}(h.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(g){function b(a,c){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=g.call(this,a,c)||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,h.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,h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,g);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",
b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,c){this.theme=a;this.themeVariant=c};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new h.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}};b.prototype.parseShapeElem=function(a,c){g.prototype.parseShapeElem.call(this,a,c);var d=a.nodeName;if(function(z,E){return z&&z.equals?z.equals(E):z===E}(d,"ForeignData")){d=function(z,E){for(z=z.firstChild;null!=z;){if(1==z.nodeType){var I=z;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){z=E.lastIndexOf("/");var J="",O="";try{J=E.substring(0,z),O=E.substring(z,E.length)}catch(M){break}z=c.getRelationship(I,J+"/_rels"+O+".rels");
if(null!=z){E=z.getAttribute("Target")||"";I=z.getAttribute("Type");z=E.lastIndexOf("/");try{E=E.substring(z+1,E.length)}catch(M){break}return{type:I,target:E}}break}}z=z.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",p=null;if(function(z,E){return z&&z.equals?z.equals(E):z===E}(k,"Bitmap"))n=n.toLowerCase();else if(function(z,E){return z&&z.equals?z.equals(E):z===E}(k,"MetaFile"))n="png";else if(function(z,E){return z&&z.equals?
z.equals(E):z===E}(k,"Enhanced Metafile")||function(z,E){return z&&z.equals?z.equals(E):z===E}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(p=d(a,f),0<p.type.indexOf("/oleObject"))if(n=c.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=n){p=n.getAttribute("Target");k=n.getAttribute("Type");try{var x=p.lastIndexOf("/");p=p.substring(x+1,p.length)}catch(z){return}n="png";p={type:k,target:p}}else return}else return;null==p&&(p=d(a,f));k=p.type;p=p.target;null!=k&&function(z,
E){var I=z.length-E.length;z=z.indexOf(E,I);return-1!==z&&z===I}(k,"image")&&(this.imageData={},(a=c.getMedia(h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=a,function(z,E){var I=z.length-E.length;z=z.indexOf(E,I);return-1!==z&&z===I}(p.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(z,E){return z&&z.equals?z.equals(E):z===E})(d,h.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=
a)};b.prototype.parseSection=function(a){var c=a.getAttribute("N");if(function(I,J){return I&&I.equals?I.equals(J):I===J}(c,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,J){return I&&I.equals?I.equals(J):I===J}(c,"Field")){a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){c=a[d];var f=c.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,J){return I&&I.equals?I.equals(J):I===J}("1",
c.getAttribute("Del")))this.fields[f]="";else{for(var k=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell"),n="",p="",x=0;x<k.length;x++){var z=k[x];c=z.getAttribute("N");z=z.getAttribute("V")||z.textContent||"";switch(c){case "Value":n=z;break;case "Format":p=z}}if("esc(0)"==p)this.fields[f]=n;else if(0!==n.length){try{var E=isNaN(n)?new Date(n):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));p="c"==p?0==E.getHours()+E.getMinutes()+E.getSeconds()+E.getMilliseconds()?"m/d/yyyy":
"m/d/yyyy h:MM:ss tt":"ddddd"==p?"m/d/yyyy":"dddddd"==p?"dddd, mmmm dd, yyyy":"C"==p?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==p?"h:MM:ss tt":p.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(E,"UTC:"+p.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else g.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=
this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){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(c){}return 0===this.width&&0<this.height?1:this.width};b.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(c){}return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var c=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(c='<ul style="margin: 0;list-style-type: '+
("4"==a?"square":"disc")+'">'));return c};b.prototype.getTextParagraphFormated=function(a){var c="",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 c+=this.insertAttributes(a,
d)};b.prototype.getTextCharFormated=function(a){var c="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;",p="line-height:"+this.getSpcLine(this.pp),x=";opacity:"+this.getTextOpacity(this.cp),z=this.getTextPos(this.cp),E=this.getTextCase(this.cp);(function(I,J){return I&&I.equals?I.equals(J):
I===J})(E,"1")?a=a.toUpperCase():function(I,J){return I&&I.equals?I.equals(J):I===J}(E,"2")&&(a=h.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,J){return I&&I.equals?I.equals(J):I===J})(z,"1")?a=h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,J){return I&&I.equals?I.equals(J):I===J}(z,"2")&&(a=h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
"i"):a;a=this.isUnderline(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+c+k+n+p+x+'">'+a+"</font>"};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):
c===d}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var c=!1;a=this.getSpLine(a);0<a?a*=h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),c=!0);return(new String(a)).toString()+(c?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,c){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);c=' style="'+h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(c,":")+'"';return a+
c+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,
"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=1===(parseInt(a)&1));return c};b.prototype.isItalic=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=2===(parseInt(a)&2));return c};b.prototype.isUnderline=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&
d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=4===(parseInt(a)&4));return c};b.prototype.isSmallCaps=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=8===(parseInt(a)&8));return c};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
a=this.getValue(a,"0");var c="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),c=(new String(a)).toString());return c};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,c=parseInt(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),
"1"));0===c?a=mxConstants.ALIGN_TOP:2===c&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=
a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};b.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var c=this.getHeight(),d=this.getWidth(),f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),p,x,z=0;z<n.length;z++){var E=
n[z],I=E.getAttribute("N");E=this.getScreenNumericalValue$org_w3c_dom_Element$double(E,0);"X"==I?p=mxUtils.format(E/d):"Y"==I&&(x=mxUtils.format(1-E/c))}null!=p&&null!=x&&a.push({x:p,y:x})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return b}(h.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"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){var m=function(g){function b(a,c,d,f,k,n){var p=this;p.masterShape=null;p.master=null;p.parentHeight=0;p=g.call(this,c,n)||this;p.htmlLabels=!0;p.rootShape=p;p.shapeName=null;p.shapeIndex=0;p.vertex=!0;p.childShapes={};var x=p.getMasterId(),z=p.getShapeMasterId();p.master=null!=x?f[x]?f[x]:null:k;null!=p.master&&(p.masterShape=null==x&&null!=z?p.master.getSubShape(z):p.master.getMasterShape());f=p.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,
k));p.shapeName=f;c=c.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=c&&0<c.length&&(c=c.item(0),p.childShapes=a.parseShapes(c,p.master,!1));c=p.calcRotation();p.rotation=100*c/100;p.rotation%=360;c=a.getCellIntValue("ThemeIndex",-100);-100===c&&(c=parseInt(p.getValue(p.getCellElement$java_lang_String("ThemeIndex"),"0")));c=function(E,I){null==E.entries&&(E.entries=[]);for(var J=0;J<E.entries.length;J++)if(null!=E.entries[J].key.equals&&E.entries[J].key.equals(I)||E.entries[J].key===
I)return E.entries[J].value;return null}(n.getThemes(),c);null==c&&(c=n.getDefaultTheme());n=a.getCellIntValue("VariationColorIndex",0);p.setThemeAndVariant(c,n);f=function(E){null==E.entries&&(E.entries=[]);return E.entries}(p.childShapes);for(k=0;k<f.length;k++)x=f[k].getValue(),x.setRootShape(p),null==x.theme&&x.setThemeAndVariant(c,n);p.quickStyleVals=new h.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=p.masterShape?(p.masterShape.processGeomList(null),p.processGeomList(p.masterShape.getGeomList()),0===p.width&&(p.width=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===p.height&&(p.height=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
0))):p.processGeomList(null);p.vertex=d||!a.connectsMap[p.Id]&&null!=p.childShapes&&!function(E){null==E.entries&&(E.entries=[]);return 0==E.entries.length}(p.childShapes)||null!=p.geomList&&(!p.geomList.isNoFill()||1<p.geomList.getGeoCount());p.layerMember=p.getValue(p.getCellElement$java_lang_String("LayerMember"));p.layerMember&&(p.layerMember=p.layerMember.split(";"));return p}__extends(b,g);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};
b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=
0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
25,"ERmandOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===
c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
29,"ERzeroToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
7,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
11,"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
16,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,c,d){null==
a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),31,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===
c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),32,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
33,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),34,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),36,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<
a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),39,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),40,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),41,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
43,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var c=this.cellElements;c=c[a]?c[a]:
null;return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):c};b.prototype.getTextLabel=function(a){var c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");c="1".equals?"1".equals(c):"1"===c;if(c)return null;c=this.getTextChildren();null==c&&null!=this.masterShape&&(c=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=c)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),
this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow="width"),this.getHtmlTextContent(c)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var c=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":c=this.getIndex(n);break;case "tp":this.getIndex(n);
break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;case "#text":n=n.textContent;var p=this.paragraphs;p=p[d]?p[d]:null;null==p?(p=new h.mxgraph.io.vsdx.Paragraph(n,c,d,f),this.paragraphs[d]=p):p.addText(n,c,f)}}};b.prototype.createHybridLabel=function(a){var c=function(p,x){return p[x]?p[x]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=
0;this.styleMap.fontStyle=(new String(d)).toString();a=c.numValues();d=null;for(var f=0;f<a;f++){var k=c.getValue(f);if(0===k.length&&null!=this.fields){var n=c.getField(f);null!=n&&(k=function(p,x){return p[x]?p[x]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(p,x){return p[x]?p[x]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};b.prototype.getHtmlTextContent=function(a){function c(z){z=h.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(z);
n&&(z="<li>"+z,n=!1);k?(z=z.split("\n"),z[z.length-1]||(z.pop(),n=!0),z=z.join("</li><li>")):z=z.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(h.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(z)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var p=0;p<a.length;p++){var x=a.item(p);(function(z,E){return z&&z.equals?z.equals(E):z===E})(x.nodeName,"cp")?this.cp=this.getIndex(x):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"tp")?this.tp=
this.getIndex(x):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"pp")?(this.pp=this.getIndex(x),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),x=this.getPPList(this.pp),n=k=null!=x,d+=k?x:""):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"fld")?(this.fld=this.getIndex(x),x=null,null!=this.fields&&(x=function(z,E){return z[E]?z[E]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(z,
E){return z[E]?z[E]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=c.call(this,x))):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"#text")&&(x=x.textContent,d+=c.call(this,x))}k&&(d+="</li></ul>");return h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};b.prototype.isConnectorBigNameU=function(a){return function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,
d.length)===d}(a,"45 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree  tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree  tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===
f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Fancy arrow")};
b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=function(a,c){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(x-k);return!c||k===x/2&&n===p/2||0===this.rotation?new mxPoint(d,a):(c=p/2-n,k-=
x/2,x=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+c-(c*x-k*n),c*n+k*x+a-k))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<c?1:a,0===c&&0<a?1:c)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),
0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity=
function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,
"Row");a=this.getColor(a.getIndexedCell(c[c.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(c)?a=this.getColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(c=this.getTheme(),null!=c&&(c=c.getFillGraientColor(this.getQuickStyleVals()),null!=c&&(a=c.toHexStr())));return a};b.prototype.getGradientDirection=
function(){var a="",c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};b.prototype.calcRotation=
function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};b.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};b.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};b.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};b.prototype.getLeftSpacing=function(){return 100*
(this.getTextLeftMargin()/2-2.8)/100};b.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};b.prototype.getLabelRotation=function(){var a=!0,c=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=c;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};b.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",
null,"Hyperlink");a=this.getValue(a,"");var c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");c=this.getValue(c,"");return{extLink:a,pageLink:c}};b.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("N");f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var n=0;n<f.length;n++){var p=f[n];if("Value"==p.getAttribute("N")){a.push({key:k,val:p.getAttribute("V")});break}}}return a};b.prototype.getStyleFromShape=function(){this.styleMap[h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=
"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var c=this.getId();this.styleDebug("ID = "+c+" , Fill Color = "+a);a=this.getGradient();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,p){return n&&n.equals?n.equals(p):n===p}(a,"")||function(n,p){return n&&n.equals?n.equals(p):n===p}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=
a));a=this.getOpacity(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,p,x){void 0===x&&(x=0);return n.substr(x,p.length)===p}(function(n,p){return n[p]?n[p]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=
"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+c+" , Color = "+d+" , stroke transparency = "+f);(function(n,p){return n&&n.equals?n.equals(p):n===p})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=
""+c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=h.mxgraph.io.vsdx.mxVsdxConstants.TRUE);c=Math.round(this.getTopSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c);c=Math.round(this.getBottomSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c);c=Math.round(this.getLeftSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+c);c=Math.round(this.getRightSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c);a=
this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,p){return n&&n.equals?n.equals(p):n===p})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,p){return n&&n.equals?n.equals(p):n===p})("1",c)&&(this.styleMap[mxConstants.STYLE_FLIPV]=
"1");try{var k=this.getConnections();a=[];for(c=0;c<k.length;c++)a.push("["+k[c].x+","+k[c].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a=null,c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(c&&c.equals?c.equals("Themed"):"Themed"===c)?(c=this.getTheme(),null!=c&&(a=this.isVertex()?c.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
c.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(c));if(null!=a&&0!=a.length){c="";for(var d=0;d<a.length;d++)c=c.concat(a[d].toFixed(2)+" ");return c.trim()}return null};b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),c=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else c=parseFloat(a),c=this.getScreenNumericalValue$double(c)}catch(k){}1>c&&(c*=2);return c};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else c=
parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else c=parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getRounding=
function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var c=a;c="Themed".equals?"Themed".equals(c):"Themed"===c;c&&(a="0");return parseFloat(a)};b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map=
function(a){var c={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?c[mxConstants.STYLE_EDGE]=mxConstants.NONE:c[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return c};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId=
function(){return this.shape.hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")};
b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME),c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getName());return a};
b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,c){var d="",f="";this.shape.hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));
if(function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(d,"Organizational unit")||function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
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(z,E){return z&&z.equals?z.equals(E):z===E})(d,"Inh")&&(d="0.0");(function(z,E){return z&&z.equals?z.equals(E):z===E})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");c=c.split(";");for(var n="",p=0;p<c.length;p++){var x=c[p];x=x.trim();(function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E})(x,"tabHeight=")&&
(n=x.split("tabHeight=").join(""))}(function(z,E){return z&&z.equals?z.equals(E):z===E})(n,"")&&(n="20");c=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-c/2);a.getGeometry().offset=d}else if(function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(d,"Domain 3D")||function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(f,"Domain 3D")){k=this.shape.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;
d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(h.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(z,E){return z&&z.equals?z.equals(E):z===E}(d,"Inh")||function(z,E){return z&&z.equals?z.equals(E):z===E}(d,""))d="0.0";if(function(z,E){return z&&z.equals?z.equals(E):
z===E}(f,"Inh")||function(z,E){return z&&z.equals?z.equals(E):z===E}(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}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var c=b.getType(this.getShape());this.styleDebug("shape type = "+c);if(null!=this.imageData||function(M,L){return M&&M.equals?M.equals(L):M===L}(h.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,c)&&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(M,L){return M[L]?M[L]:null}(d,"iType"),k=function(M,L){return M[L]?M[L]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),x=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),z=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
"0")),E=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=p||x!=E||z!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:p,imgWidth:x,imgHeight:z,width:E,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var J=this.parseGeom();if(function(M,L){return M&&M.equals?M.equals(L):M===L}(J,""))return this.styleDebug("No geom found"),a;var O=Graph.compress(J);a[mxConstants.STYLE_SHAPE]=
"stencil("+O+")"}catch(M){}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Off-page reference")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
this.shapeName);if(null!=a&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")){if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a=
(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),c=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,
"F",""),f=this.getAttribute(h.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(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===c||function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"inh"))c=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):
k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):
k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(c.toLowerCase(),"height*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(f.toLowerCase(),"height*")||function(k,
n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(c.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};b.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,
"V","");null!=this.masterShape&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")&&(a=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0.0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY=
function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getEndXY=function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.END_X),
0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getRoutingPoints=function(a,c,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,c,d):null};b.prototype.getControlPoints=function(a){var c=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.GEOM);
if(0<f.length&&(f=f.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var p=new mxPoint,x=n[k+3];p.x=Math.floor(Math.round(100*(c.x+
Math.min(100,Math.abs(a.x-c.x))*n[k+2]))/100);p.y=Math.floor(Math.round(100*(c.y-100*x))/100);d.push(p)}return d}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var c in a)this.styleMap[c]=a[c];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",c=this.getDashPattern(),null!=c&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=
c));c=this.getEdgeMarker(!0);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=c);c=this.getEdgeMarker(!1);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=
c);c=Math.round(this.getStartArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+c);c=Math.round(this.getFinalArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+c);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+c);c=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=h.mxgraph.io.vsdx.mxVsdxConstants.TRUE);
this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,c=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=c));c=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c;c=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c;c=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+
c;c=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c;c=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=c;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var c=a&&a.equals?a.equals(""):""===a;c||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),
"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?h.mxgraph.io.vsdx.mxVsdxConstants.TRUE:h.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var c=this.getValue(this.getCellElement$java_lang_String(a?h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(c,"Themed")){var f=
this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(c)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(b.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=
k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(b.arrowTypes_$LI$(),1));return a};b.prototype.getCellElement$java_lang_String=function(a){var c=g.prototype.getCellElement$java_lang_String.call(this,a);return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):c};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,c,d){var f=g.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,
a,c,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,c,d):f};b.prototype.getCellElement=function(a,c,d){if("string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==c||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,c,d)};b.prototype.createLabelSubShape=
function(a,c){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),
f/2),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),z=this.getValueAsDouble(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),E=this.getTextLabel(1>d||1>f);if(null!=E&&0!==E.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()&&(z+=Math.PI+.01,I.horizontal="0");var J=this.getRotation();0!==z&&(z=360-180*z/Math.PI,z=Math.round((z+J)%360*100)/100,0!==z&&(I.rotation=""+z));I="text;"+h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=c.getGeometry().height-
(x+f-n);k=p-k;0<J&&(p=new mxGeometry(k,n,d,f),k=c.getGeometry(),h.mxgraph.online.Utils.rotatedGeometry(p,J,k.width/2,k.height/2),k=p.x,n=p.y);return a.insertVertex(c,null,E,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};b.prototype.getLblEdgeOffset=function(a,c){if(null!=c&&1<c.length){var d=new mxCellState;d.absolutePoints=c;a.updateEdgeBounds(d);a=a.getPoint(d);d=c[0];var f=c[c.length-1];c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),
0),z=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(z-p+k/2);a=x-n+c/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};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(h.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"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var g=256,b=[];0<g--;)b.push(0);m.IA=b}return m.IA};m.__static_initializer_0=function(){for(var g=m.IA_$LI$(),
b=0;b<g.length;b++)g[b]=-1;g=0;for(b=m.CA_$LI$().length;g<b;g++)m.IA_$LI$()[m.CA_$LI$()[g].charCodeAt(0)]=g;m.IA_$LI$()[61]=0};m.encodeToChar=function(g,b,a){var c=null!=g?g.length-b:0;if(0===c)return[];var d=3*(c/3|0),f=((c-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=b,p=0,x=0;n<d+b;){var z=(g[n++]&255)<<16|(g[n++]&255)<<8|g[n++]&255;k[p++]=m.CA_$LI$()[z>>>18&63];k[p++]=m.CA_$LI$()[z>>>12&63];k[p++]=m.CA_$LI$()[z>>>6&63];k[p++]=m.CA_$LI$()[z&63];a&&19===++x&&p<f-2&&(k[p++]="\r",k[p++]=
"\n",x=0)}a=c-d;0<a&&(z=(g[d+b]&255)<<10|(2===a?(g[c+b-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[z>>12],k[f-3]=m.CA_$LI$()[z>>>6&63],k[f-2]=2===a?m.CA_$LI$()[z&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(g){var b=null!=g?g.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[g[c].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[g[--c].charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(g[c])&&d++;b=(6*(b-a)>>3)-d;a=function(p){for(var x=
[];0<p--;)x.push(0);return x}(b);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[g[d++].charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decode=function(g){if(null!=g&&g instanceof Array&&(0==g.length||null==g[0]||"string"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decode$char_A(g);if(null!=g&&g instanceof Array&&(0==g.length||null==g[0]||"number"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decode$byte_A(g);
if("string"===typeof g||null===g)return h.mxgraph.online.mxBase64.decode$java_lang_String(g);throw Error("invalid overload");};m.decodeFast$char_A=function(g){var b=g.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[g[a].charCodeAt(0)];)a++;for(;0<c&&0>m.IA_$LI$()[g[c].charCodeAt(0)];)c--;var d=61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g[c])?61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g[c-1])?2:1:0,f=c-a+1,k=76<b?(13==function(E){return null==E.charCodeAt?
E:E.charCodeAt(0)}(g[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(E){for(var I=[];0<E--;)I.push(0);return I}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var z=m.IA_$LI$()[g[a++].charCodeAt(0)]<<18|m.IA_$LI$()[g[a++].charCodeAt(0)]<<12|m.IA_$LI$()[g[a++].charCodeAt(0)]<<6|m.IA_$LI$()[g[a++].charCodeAt(0)];b[n++]=z>>16|0;b[n++]=z>>8|0;b[n++]=z|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=z=0;a<=c-d;k++)z|=m.IA_$LI$()[g[a++].charCodeAt(0)]<<18-6*k;for(g=16;n<f;g-=8)b[n++]=z>>g|0}return b};m.decodeFast=function(g){if(null!=
g&&g instanceof Array&&(0==g.length||null==g[0]||"string"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decodeFast$char_A(g);if(null!=g&&g instanceof Array&&(0==g.length||null==g[0]||"number"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decodeFast$byte_A(g);if("string"===typeof g||null===g)return h.mxgraph.online.mxBase64.decodeFast$java_lang_String(g);throw Error("invalid overload");};m.encodeToByte=function(g,b){var a=null!=g?g.length:0;if(0===a)return[];for(var c=3*(a/
3|0),d=((a-1)/3|0)+1<<2,f=d+=b?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,p=0,x=0;n<c;)f=(g[n++]&255)<<16|(g[n++]&255)<<8|g[n++]&255,k[p++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f&63].charCodeAt(0),b&&19===++x&&p<d-2&&(k[p++]=13,k[p++]=10,x=0);b=a-c;0<b&&(f=(g[c]&255)<<10|(2===b?(g[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=
2===b?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(g){for(var b=g.length,a=0,c=0;c<b;c++)0>m.IA_$LI$()[g[c]&255]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[g[--c]&255];)61==g[c]&&d++;c=b=(6*(b-a)>>3)-d;for(a=[];0<c--;)a.push(0);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[g[d++]&255];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$byte_A=function(g){var b=g.length;if(0===
b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[g[a]&255];)a++;for(;0<c&&0>m.IA_$LI$()[g[c]&255];)c--;var d=61==g[c]?61==g[c-1]?2:1:0,f=c-a+1,k=76<b?(13==g[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(b=[];0<n--;)b.push(0);for(var p=n=0,x=3*(f/3|0);n<x;){var z=m.IA_$LI$()[g[a++]]<<18|m.IA_$LI$()[g[a++]]<<12|m.IA_$LI$()[g[a++]]<<6|m.IA_$LI$()[g[a++]];b[n++]=z>>16|0;b[n++]=z>>8|0;b[n++]=z|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=z=0;a<=c-d;k++)z|=m.IA_$LI$()[g[a++]]<<18-6*k;for(g=16;n<f;g-=8)b[n++]=z>>
g|0}return b};m.encodeToString=function(g,b,a){return m.encodeToChar(g,b,a).join("")};m.decode$java_lang_String=function(g){var b=null!=g?g.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[g.charAt(c).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[g.charAt(--c).charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(g.charAt(c))&&d++;b=(6*(b-a)>>3)-d;a=function(p){for(var x=[];0<p--;)x.push(0);return x}(b);for(var f=d=0;f<b;){for(var k=
c=0;4>k;k++){var n=m.IA_$LI$()[g.charAt(d++).charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$java_lang_String=function(g){var b=g.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(a))&255];)a++;for(;0<c&&0>m.IA_$LI$()[function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(c))&255];)c--;var d=61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(c))?
61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(c-1))?2:1:0,f=c-a+1,k=76<b?(13==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(E){for(var I=[];0<E--;)I.push(0);return I}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var z=m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[g.charAt(a++).charCodeAt(0)];b[n++]=z>>16|0;b[n++]=z>>
8|0;b[n++]=z|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=z=0;a<=c-d;k++)z|=m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<18-6*k;for(g=16;n<f;g-=8)b[n++]=z>>g|0}return b};return m}();B.__static_initialized=!1;A.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();
EditorUi.prototype.doImportVisio=function(h,y,A,B){B=B||h.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(h,y,null,A):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(h,y,null,A)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;
mxGraphMlCodec.prototype.decode=function(h,y,A){try{var B=mxUtils.parseXml(h),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);h='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var g=m[B],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(g,b,b.getDefaultParent()),B=0;B<this.edges.length;B++)for(var c=this.edges[B],d=c.edges,f=c.parent,k=c.dx,n=c.dy,
p=0;p<d.length;p++)this.importEdge(d[p],b,f,k,n)}catch(X){throw console.log(X),X;}finally{a.endUpdate()}a.beginUpdate();try{var x=b.getModel().cells,z;for(z in x){var E=x[z];if(E.edge&&0<E.getChildCount())for(B=0;B<E.getChildCount();B++){var I=E.children[B].geometry;if(I.adjustIt){var J=b.view.getState(E),O=J.absolutePoints,M=O[0],L=O[O.length-1],H=I.x,K=I.y;k=L.x-M.x;n=L.y-M.y;var P=M.x+H*k,Q=M.y+H*n,R=Math.sqrt(k*k+n*n);k/=R;n/=R;P-=K*n;Q+=K*k;var ha=b.view.getRelativePoint(J,P,Q);I.x=ha.x;I.y=
ha.y}}}}catch(X){throw console.log(X),X;}finally{a.endUpdate()}h+=this.processPage(b,B+1)}y&&y(h+"</mxfile>")}catch(X){A&&A(X)}};
mxGraphMlCodec.prototype.initializeKeys=function(h){var y=this.getDirectChildNamedElements(h,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 A,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),g=m[mxGraphMlConstants.ID],b=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],c=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(A=g);a=a?a:c;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]=
{key:g,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:g,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:g,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:g,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}h=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA);for(B=0;B<h.length;B++)if(h[B].getAttribute(mxGraphMlConstants.KEY)==A)for(b=this.getDirectChildNamedElements(h[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<b.length;y++)for(a=
this.getDirectChildElements(b[y]),m=0;m<a.length;m++)g=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[g]=a[m];else for(b=this.getDirectChildNamedElements(h[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<b.length;y++)for(a=this.getDirectChildElements(b[y]),m=0;m<a.length;m++)g=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[g]=a[m]};
mxGraphMlCodec.prototype.parseAttributes=function(h,y){if(h=h.attributes)for(var A=0;A<h.length;A++){var B=h[A].nodeValue,m=this.refRegexp.exec(B),g=this.staticRegexp.exec(B);m?(B=m[1],m=this.cachedRefObj[B],m||(m={},m[this.sharedData[B].nodeName]=this.dataElem2Obj(this.sharedData[B]),this.cachedRefObj[B]=m),y[h[A].nodeName]=m):g?(y[h[A].nodeName]={},y[h[A].nodeName][g[1]]=g[2]):y[h[A].nodeName]=B}};
mxGraphMlCodec.prototype.dataElem2Obj=function(h){var y=this.getDirectFirstChildNamedElements(h,mxGraphMlConstants.GRAPHML_REFERENCE)||h.getAttribute(mxGraphMlConstants.REFID),A=null,B=h,m={};if(y){A="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[A])return this.parseAttributes(h,y),y;h=this.sharedData[A]}this.parseAttributes(h,m);for(y=0;y<h.childNodes.length;y++){var g=h.childNodes[y];if(1==g.nodeType){var b=g.nodeName;if(b==mxGraphMlConstants.X_LIST){var a=
[];g=this.getDirectChildElements(g);for(var c=0;c<g.length;c++)b=g[c].nodeName,a.push(this.dataElem2Obj(g[c]));m[b]=a}else b==mxGraphMlConstants.X_STATIC?(b=g.getAttribute(mxGraphMlConstants.MEMBER),a=b.lastIndexOf("."),m[b.substr(0,a)]=b.substr(a+1)):(a=b.lastIndexOf("."),0<a&&(b=b.substr(a+1)),null!=m[b]?(m[b]instanceof Array||(m[b]=[m[b]]),m[b].push(this.dataElem2Obj(g))):m[b]=this.dataElem2Obj(g))}else 3!=g.nodeType&&4!=g.nodeType||!g.textContent.trim()||(m["#text"]=g.textContent)}return A?(h=
{},this.parseAttributes(B,h),h[this.sharedData[A].nodeName]=m,this.cachedRefObj[A]=h):m};mxGraphMlCodec.prototype.mapArray=function(h,y,A){for(var B={},m=0;m<h.length;m++)h[m].name&&(B[h[m].name]=h[m].value||h[m]);this.mapObject(B,y,A)};
mxGraphMlCodec.prototype.mapObject=function(h,y,A){if(y.defaults)for(var B in y.defaults)A[B]=y.defaults[B];for(B in y){for(var m=B.split("."),g=h,b=0;b<m.length&&g;b++)g=g[m[b]];null==g&&h&&(g=h[B]);if(null!=g)if(m=y[B],"string"===typeof g)if("string"===typeof m)A[m]=g.toLowerCase();else if("object"===typeof m){b=g.toLowerCase();switch(m.mod){case "color":0==g.indexOf("#")&&9==g.length?b="#"+g.substr(3)+g.substr(1,2):"TRANSPARENT"==g&&(b="none");break;case "shape":b=mxGraphMlShapesMap[g.toLowerCase()];
break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[g.toLowerCase()];break;case "bpmnSymbol":b=mxGraphMlShapesMap.bpmnSymbol[g.toLowerCase()];break;case "bool":b="true"==g?"1":"0";break;case "scale":try{b=parseFloat(g)*m.scale}catch(a){}break;case "arrow":b=mxGraphMlArrowsMap[g]}null!=b&&(A[m.key]=b)}else m(g,A);else g instanceof Array?this.mapArray(g,m,A):null!=g.name&&null!=g.value?this.mapArray([g],m,A):this.mapObject(g,m,A)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};
mxGraphMlCodec.prototype.importGraph=function(h,y,A){for(var B=this.getDirectChildNamedElements(h,mxGraphMlConstants.NODE),m=A,g=0,b=0;m&&m.geometry;)g+=m.geometry.x,b+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,A,g,b);this.edges.push({edges:this.getDirectChildNamedElements(h,mxGraphMlConstants.EDGE),parent:A,dx:g,dy:b})};
mxGraphMlCodec.prototype.importPort=function(h,y){var A=h.getAttribute(mxGraphMlConstants.PORT_NAME),B={};h=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA);for(var m=0;m<h.length;m++){var g=h[m];g.getAttribute(mxGraphMlConstants.KEY);g=this.dataElem2Obj(g);g.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(g,{"y:FreeNodePortLocationModelParameter.Ratio":function(b,a){b=b.split(",");a.pos={x:b[0],y:b[1]}}},B)}y[A]=B};
mxGraphMlCodec.prototype.styleMap2Str=function(h){var y="",A="",B;for(B in h)A+=y+B+"="+h[B],y=";";return A};
mxGraphMlCodec.prototype.importNode=function(h,y,A,B,m){var g=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA),b=h.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,A);A={graphMlID:b};for(var c=null,d=null,f=null,k=null,n=0;n<g.length;n++){var p=this.dataElem2Obj(g[n]);if(p.key)if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,p,B,m);else if(p.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=
p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)c=p,p["yjs:StringTemplateNodeStyle"]?d=p["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,p,A);else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var x=c=null;for(x in p)if("key"!=x&&"#text"!=x){if("y:ProxyAutoBoundsNode"==x){if(x=p[x]["y:Realizers"])for(var z in x)if("active"!=z&&"#text"!=z){c=x[z][x.active];p={};p[z]=c;break}}else c=
p[x];break}c&&(c[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,c[mxGraphMlConstants.GEOMETRY],B,m),c[mxGraphMlConstants.NODE_LABEL]&&(k=c[mxGraphMlConstants.NODE_LABEL]));c=p;this.addNodeStyle(a,p,A)}}m=this.getDirectChildNamedElements(h,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,A);this.handleFixedRatio(a,A);this.handleCompoundShape(a,A,c,null);0==A.strokeWidth&&(A.strokeColor="none");a.style=this.styleMap2Str(A);h=this.getDirectChildNamedElements(h,
mxGraphMlConstants.GRAPH);for(n=0;n<h.length;n++)this.importGraph(h[n],y,a,B);k&&this.addLabels(a,k,A,y);this.nodesMap[b]={node:a,ports:B}};
mxGraphMlCodec.prototype.addNodeStyle=function(h,y,A){h=function(H,K){if("line"!=H){K.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),K.dashPattern=H)}};h={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",
mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,K){"true"==H&&(K.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,K){"false"==H&&(K.strokeColor="none")},
type:h},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:h,"dashStyle.yjs:DashStyle.dashes":h,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var B=mxUtils.clone(h);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(h);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var g=mxUtils.clone(h);g.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};
var b=mxUtils.clone(h);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(h);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var c=mxUtils.clone(h);c.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(h);d.defaults={shape:"datastore"};var f=mxUtils.clone(h);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=
mxUtils.clone(h);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(h);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 p=mxUtils.clone(h);p.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};p.drawShadow={key:"shadow",mod:"bool"};var x=mxUtils.clone(h);x.defaults={shape:"swimlane",
startSize:20,strokeWidth:4,spacingLeft:10};x.isCollapsible={key:"collapsible",mod:"bool"};x.borderColor={key:"strokeColor",mod:"color"};x.folderFrontColor={key:"fillColor",mod:"color"};var z=mxUtils.clone(h);z.defaults={shape:"swimlane",startSize:20,spacingLeft:10};z["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 E=mxUtils.clone(h);E.defaults={shape:"js:table"};var I=mxUtils.clone(h);I.defaults={shape:"image"};I.image=function(H,K){K.image=H};var J=mxUtils.clone(h);J.defaults={shape:"image"};J["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,K){K.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var O=mxUtils.clone(h);O.defaults={shape:"swimlane",startSize:20};O["y:Shape.type"]=function(H,K){"roundrectangle"==H&&(K.rounded=1,K.arcSize=5)};var M=mxUtils.clone(h);M.defaults={shape:"js:table2"};
var L=mxUtils.clone(h);L.defaults={gradientDirection:"east"};L["y:Fill"].color2={key:"gradientColor",mod:"color"};L["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":h,"demostyle:FlowchartNodeStyle":h,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":g,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":c,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":p,"demostyle:DemoGroupStyle":x,"yjs:CollapsibleNodeStyleDecorator":z,
"bpmn:PoolNodeStyle":E,"yjs:TableNodeStyle":E,"demotablestyle:DemoTableStyle":E,"yjs:ImageNodeStyle":I,"y:ShapeNode":h,"y:GenericNode":L,"y:GenericGroupNode":L,"y:TableNode":M,"y:SVGNode":J,"y:GroupNode":O},A)};
mxGraphMlCodec.prototype.handleTemplates=function(h,y,A,B){if(h){var m=A.geometry.width,g=A.geometry.height;A='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+g+'"><g>';for(var b,a=[],c=/\{TemplateBinding\s+([^}]+)\}/g;null!=(b=c.exec(h));){var d="";switch(b[1]){case "width":d=m;break;case "height":d=g}a.push({match:b[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(b=m.exec(h));)if(g=b[1].split(","),
c=y[g[0]])1<g.length&&g[1].indexOf("Converter=")&&(d=mxGraphMlConverters[g[1].substr(11)])&&(c=[c],g[2]&&c.push(g[2].substr(11)),c=d.apply(null,c)),a.push({match:b[0],repl:mxUtils.htmlEntities(c)});for(b=0;b<a.length;b++)h=h.replace(a[b].match,a[b].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(b=y.exec(h));)c=b[0].substr(0,b[0].length-7)+b[1]+"</text>",a.push({match:b[0],repl:c});for(b=0;b<a.length;b++)h=h.replace(a[b].match,a[b].repl);h=A+h+"</g></svg>";B.shape="image";B.image=
"data:image/svg+xml,"+(window.btoa?btoa(h):Base64.encode(h))}};
mxGraphMlCodec.prototype.handleCompoundShape=function(h,y,A,B){var m=y.shape;if(m&&0==m.indexOf("js:")){switch(m){case "js:bpmnArtifactShadow":y.shadow="1";case "js:bpmnArtifact":y.shape=y.symbol;delete y.fillColor;delete y.strokeColor;delete y.gradientColor;this.handleCompoundShape(h,y,A,B);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":y.shape="note;size=16";A=A["bpmn:DataObjectNodeStyle"]||A["y:GenericNode"]||A["y:GenericGroupNode"];B={};this.mapObject(A,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType",
"com.yworks.bpmn.marker1":"marker1"}},B);if("true"==A.collection||"bpmn_marker_parallel"==B.marker1){var g=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");g.vertex=!0;g.geometry.relative=!0;g.geometry.offset=new mxPoint(-5,-10);h.insert(g)}if("INPUT"==A.type||"data_object_type_input"==B.dataObjectType)g=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),g.vertex=!0,g.geometry.relative=!0,g.geometry.offset=new mxPoint(2,
2),h.insert(g);else if("OUTPUT"==A.type||"data_object_type_output"==B.dataObjectType)g=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),g.vertex=!0,g.geometry.relative=!0,g.geometry.offset=new mxPoint(2,2),h.insert(g);break;case "js:BpmnChoreography":this.mapObject(A,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},y);g=h.geometry;g=new mxCell("",new mxGeometry(0,g.height-
20,g.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");g.vertex=!0;h.insert(g);B&&B.lblTxts&&(h.value=B.lblTxts[0],g.value=B.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":y.shape="ext;rounded=1";B={};A=A["y:GenericNode"]||A["y:GenericGroupNode"];this.mapObject(A,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3",
"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_user":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");
b.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":b=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":b=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_service":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");b.geometry.offset=new mxPoint(4,5);break;case "task_type_script":b=
new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geometry.offset=new mxPoint(4,5)}b&&(b.vertex=!0,b.geometry.relative=!0,h.insert(b),b=null);var a=0;for(g=1;4>=g;g++)B["marker"+g]&&a++;A=-7.5*a-2*(a-1);for(g=1;g<=a;g++){switch(B["marker"+g]){case "bpmn_marker_closed":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_open":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");b.geometry.offset=
new mxPoint(A,-20);var c=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");c.geometry.offset=new mxPoint(-4,-1);c.geometry.relative=!0;c.vertex=!0;b.insert(c);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_sequential":b=new mxCell("",
new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(A,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(A,-18)}b.geometry.relative=!0;b.vertex=!0;h.insert(b);
A+=20}break;case "js:table":y.shape="swimlane;collapsible=0;swimlaneLine=0";B=A["yjs:TableNodeStyle"]||A["demotablestyle:DemoTableStyle"];!B&&A["bpmn:PoolNodeStyle"]&&(B=A["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(B,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",
mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},y);y.swimlaneFillColor=y.fillColor;B=B.table["y:Table"];var d=a=0,f={x:0};A=0;(g=B.Insets)?(g=g.split(","),"0"!=g[0]?(y.startSize=g[0],f.x=parseFloat(g[0]),y.horizontal="0"):"0"!=g[1]&&(y.startSize=g[1],A=parseFloat(g[1]),d+=A)):y.startSize="0";var k={},n={Insets:function(z,E){E.startSize=z.split(",")[0]},
mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);b={};c={Insets:function(z,E){E.startSize=z.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",
"y:StripeDefaults":c},b);g=h.geometry;a=B.Rows["y:Row"];d+=parseFloat(b.startSize);var p=f.x,x=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),g=0;g<a.length;g++)f.x=x,f.lx=x,d=this.addRow(a[g],h,g&1,d,f,n,k),p=Math.max(f.x,p);B=B.Columns["y:Column"];a=p;if(B)for(B instanceof Array||(B=[B]),g=0;g<B.length;g++)a=this.addColumn(B[g],h,g&1,a,A,c,b);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(A,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",
POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=b=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):b=parseFloat(B.tblHHeight);
y.startSize=b?b:n;try{a=A["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];c=A["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);c instanceof Array||(c=[c]);f=parseFloat(B.rowHWidth);for(g=0;g<a.length;g++)a[g]["y:Insets"]&&(f=Math.max(f,parseFloat(a[g]["y:Insets"].left)+parseFloat(a[g]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(g=0;g<c.length;g++)c[g]["y:Insets"]&&(k=Math.max(k,parseFloat(c[g]["y:Insets"].top)+
parseFloat(c[g]["y:Insets"].bottom)));d?(this.addTbl2Rows(h,a,b,n,f,k,d,B),this.addTbl2Cols(h,c,b,n,f,k,d,B)):(this.addTbl2Cols(h,c,b,n,f,k,d,B),this.addTbl2Rows(h,a,b,n,f,k,d,B))}catch(z){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(h=A["y:GenericNode"]["y:Fill"])y.fillColor=h.color2,y.swimlaneFillColor=h.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow=
mxGraphMlCodec.prototype.addTbl2Rows=function(h,y,A,B,m,g,b,a){A+=g;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(b){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].height);p=c&&0==d?g:0;
k.geometry=new mxGeometry(B,A-p,h.geometry.width-B,f+p);A+=f;k.style=this.styleMap2Str(n);h.insert(k)}};
mxGraphMlCodec.prototype.addTbl2Cols=function(h,y,A,B,m,g,b,a){B=m+B;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:g,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!b){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].width);p=c&&0==d?m:0;k.geometry=new mxGeometry(B-p,
A,f+p,h.geometry.height-A);B+=f;k.style=this.styleMap2Str(n);h.insert(k)}};
mxGraphMlCodec.prototype.addRow=function(h,y,A,B,m,g,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(h,g,c);A?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));A=parseFloat(c.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,A);var d=h.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);h=h["y:Row"];m.lx=0;c.startSize&&
(m.lx=parseFloat(c.startSize),m.x+=m.lx);y=c=m.x;d=m.lx;var f=0;if(h){h instanceof Array||(h=[h]);for(var k=0;k<h.length;k++)m.x=c,m.lx=d,f=this.addRow(h[k],a,k&1,f,m,g,b),y=Math.max(m.x,y)}m.x=y;A=Math.max(A,f);a.geometry.height=A;return B+=A};
mxGraphMlCodec.prototype.addColumn=function(h,y,A,B,m,g,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(h,g,c);A?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));A=parseFloat(c.width);a.geometry=new mxGeometry(B,m,A,y.geometry.height-m);var d=h.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);h=h["y:Column"];y=0;if(h)for(h instanceof
Array||(h=[h]),c=0;c<h.length;c++)y=this.addColumn(h[c],a,c&1,y,m,g,b);A=Math.max(A,y);a.geometry.width=A;return B+=A};mxGraphMlCodec.prototype.handleFixedRatio=function(h,y){y=y.shape;h=h.geometry;if(y&&h)if(0<y.indexOf(";aspect=fixed"))y=Math.min(h.height,h.width),y==h.height&&(h.x+=(h.width-y)/2),h.height=y,h.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=h.height;var A=h.width;h.height=A;h.width=y;y=(y-A)/2;h.x-=y;h.y+=y}};
mxGraphMlCodec.prototype.addNodeGeo=function(h,y,A,B){var m=y[mxGraphMlConstants.RECT],g=0,b=0,a=30,c=30;m?(g=m[mxGraphMlConstants.X],b=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],c=m[mxGraphMlConstants.HEIGHT]):(g=y[mxGraphMlConstants.X_L]||g,b=y[mxGraphMlConstants.Y_L]||b,a=y[mxGraphMlConstants.WIDTH_L]||a,c=y[mxGraphMlConstants.HEIGHT_L]||c);h=h.geometry;h.x=parseFloat(g)-A;h.y=parseFloat(b)-B;h.width=parseFloat(a);h.height=parseFloat(c)};
mxGraphMlCodec.prototype.importEdge=function(h,y,A,B,m){var g=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA),b=h.getAttribute(mxGraphMlConstants.ID),a=h.getAttribute(mxGraphMlConstants.EDGE_SOURCE),c=h.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=h.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);h=h.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];c=this.nodesMap[c];A=y.insertEdge(A,null,"",a.node,c.node,"graphMLId="+b);b={graphMlID:b};for(var f=0;f<g.length;f++){var k=
this.dataElem2Obj(g[f]),n=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(A,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(A,k,b):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(A,k,b,y):n&&(this.addEdgeStyle(A,k,b),k=this.addEdgePath(A,n["y:Path"],b,B,m),n["y:EdgeLabel"]&&this.addLabels(A,n["y:EdgeLabel"],
b,y,k),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(b.exitX=y.pos.x,b.exitY=y.pos.y));c.ports&&h&&(y=c.ports[h],y.pos&&(b.entryX=y.pos.x,b.entryY=y.pos.y));A.style=this.styleMap2Str(b);return A};
mxGraphMlCodec.prototype.addEdgeGeo=function(h,y,A,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],g=0;g<y.length;g++){var b=y[g][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),m.push(new mxPoint(parseFloat(b[0])-A,parseFloat(b[1])-B)))}h.geometry.points=m}};
mxGraphMlCodec.prototype.addEdgePath=function(h,y,A,B,m){var g=[];if(y){var b=parseFloat(y.sx),a=parseFloat(y.sy),c=parseFloat(y.tx),d=parseFloat(y.ty),f=h.source.geometry;0!=b||0!=a?(A.exitX=(b+f.width/2)/f.width,A.exitY=(a+f.height/2)/f.height,g.push(new mxPoint(f.x+A.exitX*f.width-B,f.y+A.exitY*f.height-m))):g.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));b=h.target.geometry;0!=c||0!=d?(A.entryX=(c+b.width/2)/b.width,A.entryY=(d+b.height/2)/b.height,A=new mxPoint(b.x+A.entryX*b.width-B,b.y+
A.entryY*b.height-m)):A=new mxPoint(b.x+b.width/2-B,b.y+b.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);c=[];for(d=0;d<y.length;d++)b=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),c.push(b),g.push(b);h.geometry.points=c}g.push(A)}return g};
mxGraphMlCodec.prototype.addEdgeStyle=function(h,y,A){h=function(a,c){c.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),c.dashPattern=a)};var B=function(a,c){c.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,c){c.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},
g={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,c){"line"!=a&&(c.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&&(c.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,c){c.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,c)},target:function(a,c){c.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,c)}},"y:BendStyle":{smoothed:{key:"rounded",
mod:"bool"}}},b=mxUtils.clone(g);b.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,c){c.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:h,"dashStyle.yjs:DashStyle.dashes":h,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":g,"y:GenericEdge":g,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},A)};
mxGraphMlCodec.prototype.addLabels=function(h,y,A,B,m){A=h.getChildCount();var g=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var b=[],a=[];if(g){g instanceof Array||(g=[g]);for(var c=0;c<g.length;c++){var d=g[c],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},p=function(O,M){O&&(O=O.toUpperCase());var L=M.fontStyle||0;switch(O){case "ITALIC":L|=2;break;case "BOLD":L|=1;break;case "UNDERLINE":L|=4}M.fontStyle=L};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(O,M){O&&(M.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
fontSize:"fontSize",fontStyle:p,fontWeight:p,textDecoration:p}},"Style.y:VoidLabelStyle":function(O,M){M.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:p,underlinedText:function(O,M){var L=M.fontStyle||0;"true"==O&&(L|=4);M.fontStyle=L},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),b.push(f),a.push(n))}}for(c=
0;c<y.length;c++)if(y[c]&&(!a[c]||!a[c]["bpmn:ParticipantParameter"])){y[c]=mxUtils.htmlEntities(y[c],!1).replace(/\n/g,"<br/>");n=h.geometry;f=new mxCell(y[c],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[c]));f.vertex=!0;h.insert(f,A);g=f.geometry;if(a[c]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[c],b[c].fontSize,b[c].fontFamily),(d=a[c]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),g.x=parseFloat(d[0]),g.y=parseFloat(d[1]),
g.width=n.width,g.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[c]["y:InteriorLabelModel"]){switch(a[c]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":g.height=1;break;case "West":g.width=n.height,g.height=n.width,g.y=n.height/2-n.width/2,g.x=-g.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"])switch(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"].Position){case "North":g.height=
1;break;case "West":g.width=n.height,g.height=n.width,g.y=n.height/2-n.width/2,g.x=-g.y,f.style+=";rotation=-90;"}else if(a[c]["bpmn:PoolHeaderLabelModel"]){switch(a[c]["bpmn:PoolHeaderLabelModel"]){case "NORTH":g.height=1;break;case "WEST":g.width=n.height,g.height=n.width,g.y=n.height/2-n.width/2,g.x=-g.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[c]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[c]["y:ExteriorLabelModel"])switch(a[c]["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[c]["y:FreeEdgeLabelModelParameter"]){g.relative=!0;g.adjustIt=!0;n=a[c]["y:FreeEdgeLabelModelParameter"];
d=n.Ratio;p=n.Distance;var x=n.Angle;d&&(g.x=parseFloat(d));p&&(g.y=parseFloat(p));x&&(f.style+=";rotation="+parseFloat(x)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[c]["y:EdgePathLabelModelParameter"]){g.relative=!0;n=a[c]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;g.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":g.y=-15;break;case "LeftOfEdge":g.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[c].x),d=parseFloat(a[c].y),a[c].width&&(g.width=
parseFloat(a[c].width)),a[c].height&&(g.height=parseFloat(a[c].height)),h.edge)if(g.relative=!0,g.x=0,g.y=0,f=h.source.geometry.getCenterX()-h.target.geometry.getCenterX(),k=h.source.geometry.getCenterY()-h.target.geometry.getCenterY(),B&&m&&a[c]["y:ModelParameter"]&&a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];x=parseFloat(n.angle);p=parseFloat(n.distance);var z=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var E=
new mxCellState;E.absolutePoints=m;B.view.updateEdgeBounds(E);var I="left"==z?1:-1;if(-1==n&&6.283185307179586==x)g.offset=new mxPoint(1>Math.abs(d)?E.segments[0]*d:d,I*p);else{-1==n&&(n=0);for(var J=x=0;J<n;J++)x+=E.segments[J];x+=E.segments[n]*d;g.x=x/E.length*2-1;g.y=(("center"==z?0:p)+g.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(g.offset=new mxPoint(n+f/2+(0<f?-g.width:g.width),d));else g.x=n||0,g.y=d||0;b[c].rotation&&270==b[c].rotation&&(g.x-=g.height/2)}return{lblTxts:y,
lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(h,y){h=(new mxCodec).encode(h.getModel());h.setAttribute("style","default-style2");h=mxUtils.getXml(h);y='<diagram name="Page '+y+'">'+Graph.compress(h);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(h,y){var A=[];for(h=h.firstChild;null!=h;h=h.nextSibling)null!=h&&1==h.nodeType&&y==h.nodeName&&A.push(h);return A};
mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(h,y){for(h=h.firstChild;null!=h;h=h.nextSibling)if(null!=h&&1==h.nodeType&&y==h.nodeName)return h;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(h){var y=[];for(h=h.firstChild;null!=h;h=h.nextSibling)null!=h&&1==h.nodeType&&y.push(h);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(h){for(h=h.firstChild;null!=h;h=h.nextSibling)if(null!=h&&1==h.nodeType)return h;return null};
var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(h,y){if("string"===typeof h){for(var A=h;20<A.length&&-1<A.indexOf(" ");)A=A.substring(0,A.lastIndexOf(" "));return"true"===y?A:h.substring(A.length)}return""},"orgchartconverters.borderconverter":function(h,y){return"boolean"===typeof h?h?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(h,y){return"string"===typeof h?"string"===typeof y?"#"+h+y:"#"+h:h},"orgchartconverters.intermediateconverter":function(h,
y){return"string"===typeof h&&17<h.length?h.replace(/^(.)(\S*)(.*)/,"$1.$3"):h},"orgchartconverters.overviewconverter":function(h,y){return"string"===typeof h&&0<h.length?h.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open",
EditorUi.prototype.doImportGraphML=function(h,y,A){(new mxGraphMlCodec).decode(h,y,A)};/*!
	this.actions.get('group').setEnabled(!ss.row && !ss.cell &&
		(ss.cells.length > 1 || (ss.vertices.length == 1 &&
		graph.model.getChildCount(ss.cells[0]) == 0 &&
	if (!mxClient.IS_WIN)
	{
		keyHandler.bindAction(90, true, 'redo', true); // Ctrl+Shift+Z
	}
	else
	{
		keyHandler.bindAction(89, true, 'redo'); // Ctrl+Y
	}
	
	var count = 0;
	
		count += this.addActions(div, ['group', 'ungroup',
			'copySize', 'pasteSize', 'swap']) +
			this.addActions(div, ['removeFromGroup']);
/*! @license DOMPurify 3.0.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.0.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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.3",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmod)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.2",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=
new mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled()&&(this.delayedSelection?this.cell=a:this.start(a,b.getX(),b.getY()),
this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)))};mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==
b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("copyData").setEnabled(1==b.cells.length);this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("editStyle").setEnabled(1==b.cells.length);this.actions.get("editTooltip").setEnabled(1==
!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,
!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"format",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(109,!0,"decreaseFontSize",!0),g.bindAction(107,!0,"increaseFontSize",!0),g.bindAction(219,!0,"decreaseFontSize",!0),g.bindAction(221,!0,"increaseFontSize",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){f.isEnabled()&&
f.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var e=0;b.cell||b.row||(e+=this.addActions(a,["group","ungroup","copySize","pasteSize","swap"])+this.addActions(a,["removeFromGroup"]));b=this.addAction(a,"clearWaypoints");null!=b&&(mxUtils.br(a),b.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),e++);e+=this.addActions(a,
["lockUnlock"]);0==e&&(a.style.display="none");return a};
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,m,d){d.ui=g.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.6.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
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,l){function p(G){return"simple"==G||0==e&&"sketch"==G}e=null!=e?e:150;var n=Editor.currentTheme,t=p(n)&&this.isDefaultTheme(c)||this.isDefaultTheme(n)&&p(c),y=t&&"sketch"!=c&&"sketch"!=n;if(t&&!this.themeSwitching){Editor.currentTheme=
c;this.themeSwitching=!0;var A=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms ease-in-out");0==e&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){p(n)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",this.tabContainer.style.display="flex",this.hsplit.style.display=
this.editor.graph.refresh();this.restoreScrollState(A);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&p(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=l&&l()}),e)}),e)}),e)}),0)}return y};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&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||e||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var p=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:
null;e=null!=p&&null!=p.getAttribute("class");if(!e&&null!=p){p=p.getAttribute("title");var n=this.getCurrentFile();n=null!=n?n.savingStatusKey:DrawioFile.prototype.savingStatusKey;p==mxResources.get(n)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(n))+'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";p=32>=c.clientWidth;c.style.visibility=p&&""==this.editor.getStatus()?"hidden":"";if(p||e)this.statusContainer.style.display=
"inline-flex",e=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",
null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);
this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var e=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();
this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=e?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];
null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.setVisible(!1)};EditorUi.prototype.destroyWindows=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.tagsWindow&&
(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var e=this.editor.graph;e.defaultEdgeLength=Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=
Graph.prototype.defaultGridEnabled;e.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);"simple"==c||"sketch"==c?(Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){"simple"==c||"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=
document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"simple"==c||"sketch"==c?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText=
"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),"sketch"==c&&(this.sketchWrapperElt.className="geSketch"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=
function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.style.cssText="position:absolute;padding:9px 12px;overflow:hidden;white-space:nowrap;user-select:none;box-sizing:border-box;";var e=this.createMenu("simple"==c?"view":"diagram","simple"==c?Editor.thinViewImage:Editor.menuImage);this.sketchMainMenuElt.appendChild(e);"simple"==c?(this.sketchMainMenuElt.className="geToolbarContainer geSimpleMainMenu",this.sketchMainMenuElt.style.display=
"flex",this.sketchMainMenuElt.style.height="52px",this.sketchMainMenuElt.style.justifyContent="start",this.sketchMainMenuElt.style.alignItems="center",this.sketchMainMenuElt.style.top="0px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.sketchMainMenuElt.style.gap="10px",e.style.flexShrink="0",e.style.opacity="0.7"):(this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",
Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.borderRadius="4px",this.sketchMainMenuElt.style.height="44px",this.sketchMainMenuElt.style.left="10px",this.sketchMainMenuElt.style.top="10px",this.sketchMainMenuElt.style.zIndex="1");this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=
urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";var e=this.sketchFooterMenuElt;if("simple"!=c){var l=this.createPageMenuTab(!1,"simple"!=c);l.className="geToolbarButton geAdaptiveAsset";l.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px 16px 4px 4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;background-position:right 0px top 8px;background-repeat:no-repeat;background-size:13px;background-image:url("+
mxWindow.prototype.minimizeImage+");";e.appendChild(l);var p=mxUtils.bind(this,function(){l.innerText="";if(null!=this.currentPage){mxUtils.write(l,this.currentPage.getName());var C=null!=this.pages?this.pages.length:1,V=this.getPageIndex(this.currentPage);V=null!=V?V+1:1;var O=this.currentPage.getId();l.setAttribute("title",this.currentPage.getName()+" ("+V+"/"+C+")"+(null!=O?" ["+O+"]":""))}});this.editor.addListener("pagesPatched",p);this.editor.addListener("pageSelected",p);this.editor.addListener("pageRenamed",
p);this.editor.addListener("fileLoaded",p);p();var n=mxUtils.bind(this,function(){l.style.display=this.isPageMenuVisible()?"inline-block":"none"});this.addListener("editInlineStart",mxUtils.bind(this,function(){n();p()}));this.addListener("fileDescriptorChanged",n);this.addListener("pagesVisibleChanged",n);this.editor.addListener("pagesPatched",n);n();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage))}var t=this.createMenu("viewZoom",null,"geToolbarButton geAdaptiveAsset");t.setAttribute("title",
mxResources.get("zoom"));t.innerHTML="100%";t.style.cssText="display:inline-flex;align-items:center;position:relative;padding:4px;box-shadow:none;width:40px;justify-content:center;cursor:pointer;";"simple"==c?(t.style.borderStyle="solid",t.style.borderWidth="1px",t.style.borderRadius="4px",t.style.fontSize="11px",t.style.fontWeight="500",t.style.paddingTop="4px",t.style.paddingRight="14px",t.style.backgroundImage="url("+Editor.thinExpandImage+")",t.style.backgroundPosition="right 0px center",t.style.backgroundRepeat=
"no-repeat",t.style.backgroundSize="18px",t.style.opacity="0.7",t.style.height="12px"):(t.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",t.style.backgroundPosition="right 0px top 8px",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="13px",t.style.paddingRight="16px",t.style.marginRight="-4px");e.appendChild(t);if("simple"==c){var y=this.createMenu("pages",Editor.thinNoteImage);y.style.backgroundSize="24px";y.style.display="inline-block";y.style.width="24px";y.style.height=
"30px";y.style.opacity="0.7";e.appendChild(y);var A=this.createMenuItem("undo",Editor.thinUndoImage);A.style.marginLeft="auto";A.style.flexShrink="0";A.style.opacity="0.7";e.appendChild(A);A=this.createMenuItem("redo",Editor.thinRedoImage);A.style.marginLeft="0px";A.style.flexShrink="0";A.style.opacity="0.7";e.appendChild(A);A=mxUtils.bind(this,function(){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;y.style.display=480>C?"none":"";t.style.display=750>C?
"none":"inline-flex"});mxEvent.addListener(window,"resize",A);A()}mxUtils.bind(this,function(C){mxEvent.addListener(C,"click",mxUtils.bind(this,function(O){mxEvent.isAltDown(O)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(O)):mxEvent.isShiftDown(O)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(O))}));var V=mxUtils.bind(this,function(O,L,P){C.innerText="";mxUtils.write(C,Math.round(100*this.editor.graph.view.scale*(null!=P?P:1))+"%")});
this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,V);this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",V);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(O,L){V(O,L,L.getProperty("factor"))}))})(t);"simple"!=c&&e.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var G=this.createMenuItem("fullscreen",Editor.fullscreenImage);e.appendChild(G);A=mxUtils.bind(this,function(){G.style.backgroundImage="url("+
(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",mxUtils.bind(this,function(){G.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",A);e.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==c?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",
this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;display:flex;text-align:right;user-select:none;box-sizing:border-box;",this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt))}};EditorUi.prototype.createPickerMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchPickerMenuElt){var e=this.editor.graph;
this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";var l=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(l.style,"transition","transform .3s ease-out");var p=document.createElement("a");p.style.padding="0px";p.style.boxShadow="none";p.className="geMenuItem geAdaptiveAsset";p.style.display="simple"==c?"inline-block":"block";p.style.width="100%";p.style.height="14px";p.style.margin="4px 0 2px 0";p.style.backgroundImage="url("+Editor.expandMoreImage+
")";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="22px";mxUtils.setOpacity(p,40);p.setAttribute("title",mxResources.get("collapseExpand"));var n=p.style.margin,t=this.createMenuItem("insertFreehand","simple"==c?Editor.thinGestureImage:Editor.freehandImage,!0);t.style.paddingLeft="simple"==c?"0px":"12px";t.style.backgroundSize="24px";t.style.width="26px";t.style.height="30px";t.style.opacity="0.7";var y=this.createMenu("insert","simple"==c?
Editor.thinAddCircleImage:Editor.addBoxImage);y.style.backgroundSize="24px";y.style.display="simple"==c?"inline-block":"block";y.style.flexShrink="0";y.style.width="30px";y.style.height="30px";y.style.padding="simple"==c?"0px":"4px 4px 0px 4px";y.style.opacity="0.7";var A=this.createMenu("table",Editor.thinTableImage);A.style.backgroundSize="24px";A.style.padding="simple"==c?"0px":"4px 4px 0px 4px";A.style.display="inline-block";A.style.width="30px";A.style.height="30px";A.style.opacity="0.7";var G=
y.cloneNode(!0);G.style.backgroundImage="url("+("simple"==c?Editor.thinShapesImage:Editor.shapesImage)+")";G.style.backgroundSize="24px";G.setAttribute("title",mxResources.get("shapes"));mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){if(this.isShapePickerVisible())this.hideShapePicker();else{var T=mxUtils.getOffset(G);Editor.inlineFullscreen||null==this.embedViewport?"simple"==c?(T.x-=this.diagramContainer.offsetLeft+30,T.y+=G.offsetHeight-19):(T.x+=G.offsetWidth+28,T.y+=20):(T.x=0,T.y=
G.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,T.x)),this.diagramContainer.scrollTop+T.y,null,null,null,null,mxUtils.bind(this,function(f){return e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(f,!0))}),"simple"==c,!1)}mxEvent.consume(P)}));y.style.backgroundSize="24px";"simple"==c?y.style.flexShrink="0":y.style.marginBottom="4px";var C=!1,V=mxUtils.bind(this,function(P){if(P||document.body.contains(l)){P=function(D,E,M,k,x,F){null!=E&&D.setAttribute("title",
E);D.style.cursor="pointer";D.style.margin="simple"==c?"0px":"8px 0px 8px 2px";D.style.display="simple"==c?"inline-block":"block";l.appendChild(D);"simple"==c?D.style.opacity="0.7":null!=k&&(E=x,E=null!=E?E:30,F=null!=F?F:26,D.style.position="relative",D.style.overflow="visible",M=document.createElement("div"),M.style.position="absolute",M.style.fontSize="8px",M.style.left=E+"px",M.style.top=F+"px",mxUtils.write(M,k),D.appendChild(M));return D};l.innerText="";if(!C){var T=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth;"simple"==c&&(this.sidebar.graph.cellRenderer.minSvgStrokeWidth=.9);var f="simple"==c?"0px":"4px 0px 6px 2px";if("simple"!=c||660<=T){var u=this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,"simple"!=c,null,38,38,"simple"==c?Editor.thinTextImage:null,!0);"simple"==c&&(u.className="geToolbarButton",u.style.opacity="0.7");P(u,mxResources.get("text")+
" (A)",null,"A",32).style.margin="simple"==c?"0 -8px 0 0":"0 0 0 -2px"}u=this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=c,null,28,28,"simple"==c?Editor.thinRectangleImage:null);"simple"==c?(600<=T&&(u.className="geToolbarButton",u.style.opacity="0.7",P(u,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=T&&this.sketchPickerMenuElt.appendChild(G),440<=T&&P(t,mxResources.get("freehand")+
" (X)",null,"X"),500<=T&&this.sketchPickerMenuElt.appendChild(A)):(P(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0,null,28,28),mxResources.get("note")+" (S)",null,"S").style.margin=f,P(u,mxResources.get("rectangle")+" (D)",
null,"D").style.margin=f,P(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0,null,28,28),mxResources.get("ellipse")+" (F)",null,"F").style.margin=f,f=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),f.geometry.setTerminalPoint(new mxPoint(0,0),!0),f.geometry.setTerminalPoint(new mxPoint(f.geometry.width,0),!1),f.geometry.points=[],f.geometry.relative=
!0,f.edge=!0,P(this.sidebar.createEdgeTemplateFromCells([f],f.geometry.width,f.geometry.height,mxResources.get("line")+" (C)",!0,null,"simple"!=c,!1,null,28,28),mxResources.get("line")+" (C)",null,"C").margin="1px 0px 1px 2px",f=f.clone(),f.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;",f.geometry.width=this.editor.graph.defaultEdgeLength+20,f.geometry.setTerminalPoint(new mxPoint(0,20),!0),f.geometry.setTerminalPoint(new mxPoint(f.geometry.width,
20),!1),P(this.sidebar.createEdgeTemplateFromCells([f],f.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1,null,28,28),mxResources.get("arrow")).style.margin="1px 0px 1px 2px",P(t,mxResources.get("freehand")+" (X)",null,"X"),this.sketchPickerMenuElt.appendChild(G));("simple"!=c||320<T)&&this.sketchPickerMenuElt.appendChild(y)}"simple"!=c&&"1"!=urlParams.embedInline&&l.appendChild(p);this.sidebar.graph.cellRenderer.minSvgStrokeWidth=this.sidebar.minThumbStrokeWidth}});mxEvent.addListener(p,
"click",mxUtils.bind(this,function(){C?(mxUtils.setPrefixedStyle(l.style,"transform","translate(0, -50%)"),l.style.padding="0px 4px 4px",l.style.width="48px",l.style.top="50%",l.style.bottom="",l.style.height="",p.style.backgroundImage="url("+Editor.expandMoreImage+")",p.style.width="100%",p.style.height="14px",p.style.margin=n,C=!1,V()):(l.innerText="",l.appendChild(p),mxUtils.setPrefixedStyle(l.style,"transform","translate(0, 0)"),l.style.width="auto",l.style.bottom="12px",l.style.padding="0px",
l.style.top="",p.style.backgroundImage="url("+Editor.expandLessImage+")",p.style.width="24px",p.style.height="24px",p.style.margin="0px",C=!0)}));var O=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,L=null;mxEvent.addListener(window,"resize",function(){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;P!=O&&(O=P,null!=L&&window.clearTimeout(L),L=window.setTimeout(function(){L=null;V()},200))});this.editor.addListener("fileLoaded",
V);this.addListener("sketchModeChanged",V);this.addListener("currentThemeChanged",V);Editor.enableCssDarkMode||this.addListener("darkModeChanged",V);V(!0);"simple"==c?(this.sketchPickerMenuElt.style.cssText="position:relative;white-space:nowrap;user-select:none;display:flex;align-items:center;justify-content:flex-end;flex-grow:1;gap:6px;flex-shrink:0;",this.sketchMainMenuElt.appendChild(this.sketchPickerMenuElt)):(this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;z-index:1;width:48px;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;",
this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt));mxClient.IS_POINTER&&(this.sketchPickerMenuElt.style.touchAction="none")}};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var e=this.getCurrentFile();null!=e&&(e.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==e.sync||e.sync.enabled&&e.sync.isRealtimeActive()?null==e.sync||e.sync.isConnected()?e.isRealtimeEnabled()&&e.isRealtimeSupported()&&
1<e.getRealtimeState()&&(c=e.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){if("simple"==c||"sketch"==c){if(null==this.sketchMenubarElt){this.sketchMenubarElt=document.createElement("div");this.sketchMenubarElt.className="geToolbarContainer";if("simple"==
c){this.sketchMenubarElt.style.cssText="position:relative;flex-grow:0.5;overflow:visible;"+("1"!=urlParams.embed?"flex-shrink:0;":"min-width:0;")+"display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;";null==this.commentElt&&(this.commentElt=this.createMenuItem("comments",Editor.thinCommentImage,!0),this.commentElt.style.paddingLeft="0px",this.commentElt.style.backgroundSize="24px",this.commentElt.style.width="26px",this.commentElt.style.height=
"30px",this.commentElt.style.opacity="0.7");if(null==this.shareElt&&"1"!=urlParams.embed&&"draw.io"==this.getServiceName())if(this.shareElt=this.createMenu("share",Editor.thinUserAddImage),this.shareElt.style.backgroundSize="24px",this.shareElt.style.display="inline-block",this.shareElt.style.flexShrink="0",this.shareElt.style.width="24px",this.shareElt.style.height="30px",this.shareElt.style.opacity="0.7",this.isStandaloneApp())this.shareElt.style.backgroundImage="url("+Editor.thinShareImage+")";
else{var e=mxUtils.bind(this,function(){var p=mxResources.get("share"),n=Editor.thinUserAddImage,t=this.getNetworkStatus();null!=t&&(p=p+" ("+t+")",n=Editor.thinUserFlashImage);this.shareElt.style.backgroundImage="url("+n+")";this.shareElt.setAttribute("title",p)});this.addListener("realtimeStateChanged",e);this.editor.addListener("statusChanged",e);mxEvent.addListener(window,"offline",e);mxEvent.addListener(window,"online",e);e()}null==this.mainMenuElt&&(this.mainMenuElt=this.createMenu("diagram",
Editor.thinMenuImage),this.mainMenuElt.style.backgroundSize="24px",this.mainMenuElt.style.display="inline-block",this.mainMenuElt.style.flexShrink="0",this.mainMenuElt.style.width="24px",this.mainMenuElt.style.height="30px",this.mainMenuElt.style.opacity="0.7");if(null==this.formatElt){this.formatElt=this.createMenuItem("format",Editor.thinDesignImage,!0);this.formatElt.style.backgroundSize="24px";this.formatElt.style.marginLeft="1"!=urlParams.embed?"auto":"0";this.formatElt.style.flexShrink="0";
this.formatElt.style.width="20px";this.formatElt.style.opacity="0.7";var l=this.formatElt.className+" geToggleItem";this.formatElt.className=l+(0==this.formatWidth?"":" geActiveItem");this.addListener("formatWidthChanged",function(){this.formatElt.className=l+(0==this.formatWidth?"":" geActiveItem")})}}else this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;overflow:hidden;user-select:none;max-width:calc(100% - 170px);box-sizing:border-box;justify-content:flex-end;z-index:1;padding:7px 12px;display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;",
this.sketchWrapperElt.appendChild(this.sketchMenubarElt);"1"!=urlParams.embedInline&&(e=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var p=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=p?"70px":"10px";this.sketchMenubarElt.style.maxWidth=p?"calc(100% - 230px)":"calc(100% - 170px)"}else"simple"==Editor.currentTheme&&(p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,null!=this.commentElt&&
(this.commentElt.style.display=560<p&&this.commentsSupported()?"":"none"),null!=this.shareElt&&(this.shareElt.style.display=360<p?"":"none"))}),e(),mxEvent.addListener(window,"resize",e),this.editor.addListener("fileLoaded",e));"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)}"simple"==c&&(null!=this.buttonContainer&&(this.buttonContainer.style.padding="0px",this.sketchMenubarElt.appendChild(this.buttonContainer),null!=this.formatElt&&"1"==
urlParams.embed&&(this.formatElt.style.marginLeft="")),null!=this.commentElt&&this.sketchMenubarElt.appendChild(this.commentElt),null!=this.shareElt&&this.sketchMenubarElt.appendChild(this.shareElt),this.sketchMenubarElt.appendChild(this.mainMenuElt),this.sketchMenubarElt.appendChild(this.formatElt));null!=this.statusContainer&&(this.statusContainer.style.flexGrow="1",this.statusContainer.style.flexShrink="1",this.statusContainer.style.marginTop="0px","simple"!=c?this.sketchMenubarElt.appendChild(this.statusContainer):
(this.statusContainer.style.justifyContent="center",this.statusContainer.style.width="22%"));"simple"!=c&&null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement));e=this.menubar.langIcon;null!=e&&(e.style.position="",e.style.height="21px",e.style.width="21px",e.style.flexShrink="0",e.style.opacity="0.7",this.sketchMenubarElt.appendChild(e));"simple"==c?(this.sketchMainMenuElt.appendChild(this.statusContainer),
this.sketchMainMenuElt.appendChild(this.sketchMenubarElt)):null!=this.buttonContainer&&(this.buttonContainer.style.padding="0px",this.sketchMenubarElt.appendChild(this.buttonContainer))}else null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer)),
null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.flexShrink="",e.style.opacity="",this.menubarContainer.parentNode.insertBefore(e,this.menubarContainer)),null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,e,
l,p){l=null!=l?l:"geToolbarButton";var n=this.menus.get(c);p=this.menubar.addMenu(mxResources.get(c),n.funct,null,p);p.className=l;p.style.display="inline-block";p.style.cursor="pointer";p.style.height="24px";p.setAttribute("title",mxResources.get(c));this.menus.menuCreated(n,p,l);null!=e&&(p.style.backgroundImage="url("+e+")",p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="100% 100%",p.style.width="24px",p.innerText="");return p};EditorUi.prototype.createToolbarButton=
function(c,e,l,p){p=null!=p?p:24;var n=document.createElement("a");n.className="geToolbarButton geAdaptiveAsset";n.setAttribute("title",e);n.style.backgroundImage="url("+c+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width=p+"px";n.style.height=p+"px";null!=l&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
function(t){t.preventDefault()})),mxEvent.addListener(n,"click",function(t){"disabled"!=n.getAttribute("disabled")&&l(t);mxEvent.consume(t)}));return n};EditorUi.prototype.createMenuItem=function(c,e,l){var p=this.actions.get(c),n=null!=p?p.funct:null,t=this.createToolbarButton(e,mxResources.get(c)+(null!=p&&null!=p.shortcut?" ("+p.shortcut+")":""),n);null==p||l||(c=function(){p.isEnabled()?(t.removeAttribute("disabled"),t.style.cursor="pointer"):(t.setAttribute("disabled","disabled"),t.style.cursor=
"default");t.style.opacity=p.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),p.addListener("stateChanged",c),c());return t};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,e,mxUtils.bind(this,
function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,p=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(p=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+p-140+"px"):(this.div.style.width=p+"px",this.table.style.width=
this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-p+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(n){mxEvent.getSource(n)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||
document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var B=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):B.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){var e=EditorUi.prototype.hsplitPosition;0==e&&(e=134);var l=this.hsplitPosition,p=mxUtils.bind(this,
function(){this.hsplitPosition=n;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),n=c?e:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==n?"translateX(0)":"translateX(-100%)");0!=n&&p();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==n?"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==n&&p()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var K=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=
this.formatWindow;return null!=c?c.window.isVisible():K.apply(this,arguments)};var J=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var e=this.container.clientWidth;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var p=l.x;var n=l.y;"simple"==Editor.currentTheme&&(n+=this.sketchMainMenuElt.offsetHeight);
this.diagramContainer.style.top=n+"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,e=Math.max(0,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,e-this.splitSize-40))),this.sidebarContainer.style.width=e+"px",this.diagramContainer.style.left=
e+p+"px",this.tabContainer.style.left=e+"px",this.tabContainer.style.right=this.formatWidth+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=e+"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=
l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else J.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var e=mxUtils.bind(this,function(p){p=this.createMenu(p,null,"geTitle");p.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;";c.appendChild(p);return p});if(Editor.enableCustomLibraries&&
("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))e=document.createElement("div"),e.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;",e.className="geTitle",mxUtils.write(e,mxResources.get("newLibrary")),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("newLibrary").funct),
e=e.cloneNode(!1),e.style.left="50%",e.style.borderLeftStyle="solid",mxUtils.write(e,mxResources.get("openLibrary")),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("openLibrary").funct);else{var l=e("newLibrary");l.style.fontSize="11px";l.style.left="0";l=e("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=
Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(p){this.createShapesPanel(p)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),
0)};Editor.createMinimalCss=function(){return(Editor.isDarkMode()?"html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html > body.geEditor > div > a.geItem { background-color: "+
e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,e=mxUtils.getOffset(this.diagramContainer),l=this.diagramContainer.scrollLeft-e.x;e=this.diagramContainer.scrollTop-e.y;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,
e-=this.embedViewport.y):(l+=this.embedViewport.x,e+=this.embedViewport.y));return{x:l,y:e,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var e=this.editor.graph.view.scale,l=this.editor.graph.view.translate,p=mxUtils.getOffset(this.diagramContainer);this.diagramContainer.scrollLeft=c.x+p.x+(l.x-c.tx)*e;this.diagramContainer.scrollTop=c.y+p.y+(l.y-c.ty)*e};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",
JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,p=this.editor.graph;if(Editor.inlineFullscreen)e.style.left="10px",e.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==
this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");
if(null!=n){this.diagramContainer.removeAttribute("data-bounds");p.getGraphBounds();var t=n.split(" ");p=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];this.diagramContainer.style.left=t[1];n=parseInt(t[2]);t=parseInt(t[3]);n=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,n):n,p.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,p.height-80);this.diagramContainer.style.width=n+"px";this.diagramContainer.style.height=t+"px";this.diagramContainer.style.bottom=
"";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}e.style.left=this.diagramContainer.offsetLeft+"px";e.style.top=this.diagramContainer.offsetTop-e.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-
c.offsetWidth+"px";c.style.top=e.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+
(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;e.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);
c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)c.defaultEdgeStyle.fontSize=null,c.defaultVertexStyle.fontSize=null;else{c.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var e=parseInt(this.menus.defaultFontSize)-4;c.defaultEdgeStyle.fontSize=e}"simple"==Editor.currentTheme?(c.defaultEdgeStyle.edgeStyle=
"none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing=
"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultVertexStyle.hachureGap="4",c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=
c.indexOf(",");0<l&&(e=this.getPageById(c.substring(l+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=
mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,l){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"),y=parseInt(n.getAttribute("width")),A=parseInt(n.getAttribute("height"));this.writeImageToClipboard(t,y,A,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),null,null,null!=l?l: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.writeImageToClipboard=function(c,e,l,p){var n=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":n,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](p)};EditorUi.prototype.copyCells=function(c,e){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText=
"";else{var p=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),n=mxUtils.getXml(l.encodeCells(p));mxUtils.setTextContent(c,encodeURIComponent(n));e?(l.removeCells(p,!1),l.lastPasteXml=null):(l.lastPasteXml=n,l.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,l,p,n){n=null!=n?n:!0;var t=this.editor.graph,y=null;t.lastPasteXml==c?t.pasteCounter++:(t.lastPasteXml=c,t.pasteCounter=0);var A=t.pasteCounter*t.gridSize;if(l||this.isCompatibleString(c))y=this.importXml(c,A,A),t.setSelectionCells(y);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,
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",
trees:"plugins/trees/trees.js","import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnDomain=function(){return"test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnDomain()};
new Action(mxResources.get("shadow"),function(){q.setShadowVisible(!q.shadowVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(f,u){null!=u&&mxEvent.isShiftDown(u)?(mxLog.show(),null!=window.console&&console.log(d,window)):d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.drawio.com/")}));
d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var f=new FeedbackDialog(d);d.showDialog(f.container,610,360,!0,!1);f.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});H=d.actions.addAction("tags",mxUtils.bind(this,function(){null==
this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");H.setToggleAction(!0);
H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));H=d.actions.addAction("findReplace",mxUtils.bind(this,function(f,u){var D=(f=q.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=D+"Window";if(null==this[u]){var E="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,M=f?E?330:300:240;this[u]=new FindWindow(d,document.body.offsetWidth-(M+20),100,M,f?E?304:288:170,f);this[u].window.addListener("show",
function(){d.fireEvent(new mxEventObject(D))});this[u].window.addListener("hide",function(){d.fireEvent(new mxEventObject(D))});this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){var f=q.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[f]&&this[f].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",
function(){var f=null==d.pages||1>=d.pages.length;if(f)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatVsdx"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(D);var E=d.addCheckbox(u,mxResources.get("allPages"),!f,f);E.style.marginBottom="16px";f=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!E.checked)}),null,mxResources.get("export"));
d.showDialog(f.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var f=document.createElement("input");f.setAttribute("type","checkbox");f.style.marginRight="8px";f.checked=mxSettings.getShowStartScreen();f.defaultChecked=f.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";
u.style.alignItems="center";u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(f);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(E){mxEvent.getSource(E)!=f&&(f.checked=!f.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(E){d.handleError(E)}})}]];
if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var D=d.actions.get("plugins");null==D||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),D.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(E,M){if(0<M.value.length)try{var k=JSON.parse(M.value),x=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(k)),F=new EmbedDialog(d,x);d.showDialog(F.container,
450,240,!0);F.init()}catch(Q){d.handleError(Q)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(E){d.handleError(E)}})}]])}]);
d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,u,f.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=f.parentNode&&(mxSettings.setShowStartScreen(f.checked),mxSettings.save())})});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(f,u){var D=mxUtils.bind(this,function(M){var k=""==M?mxResources.get("automatic"):mxLanguageMap[M],x=null;""!=k&&(x=f.addItem(k,null,mxUtils.bind(this,
function(){d.setAndPersistLanguage(M);d.alert(mxResources.get("restartForChangeRequired"))}),u),(M==mxLanguage||""==M&&null==mxLanguage)&&f.addCheckmark(x,Editor.checkmarkImage));return x});D("");f.addSeparator(u);for(var E in mxLanguageMap)D(E)})));var I=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(f){var u=I.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=u&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var D=this.get("dynamicAppearance");
if(null!=D){var E=u.addMenu("",D.funct);E.setAttribute("title",mxResources.get("appearance"));E.className="geToolbarButton geAdaptiveAsset";E.style.backgroundPosition="center center";E.style.backgroundRepeat="no-repeat";E.style.backgroundSize="100% 100%";E.style.display="inline-block";E.style.cursor="pointer";E.style.zIndex="1";E.style.position="absolute";E.style.height="18px";E.style.width="18px";"atlas"==Editor.currentTheme?(E.style.filter="invert(100%)",E.style.right="11px",E.style.top="10px"):
(E.style.right="10px",E.style.top="5px");document.body.appendChild(E);u.langIcon=E;D=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;E.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";E.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()||Editor.cssDarkMode?Editor.thinDarkImage:Editor.thinLightImage)+
")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",D);this.editorUi.addListener("darkModeChanged",D);mxEvent.addListener(window,"resize",D);D()}}return u}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,
null,2))});Editor.enableCssDarkMode&&d.actions.put("convertDarkModeColors",new Action("Dark Mode Colors...",function(f){null==d.darkModeColorsWindow&&(d.darkModeColorsWindow=new DarkModeColorsWindow(d,document.body.offsetWidth-520,80,200,100));d.darkModeColorsWindow.window.setVisible(!0)}));H=this.get("viewZoom");var c=H.funct;H.funct=mxUtils.bind(this,function(f,u){c.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(f,["-","outline","fullscreen"],
u)});H=this.get("layout");var e=H.funct;H.funct=function(f,u){e.apply(this,arguments);f.addItem(mxResources.get("orgChart"),null,function(){var D=null,E=20,M=20,k=function(){"undefined"!==typeof mxOrgChartLayout&&null!=D&&d.tryAndHandle(mxUtils.bind(this,function(){var X=d.editor.graph,Z=new mxOrgChartLayout(X,D,E,M),Y=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(Y=X.getSelectionCell());Z.execute(Y)}))},x=document.createElement("div"),F=document.createElement("div");F.style.marginTop=
"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");x.appendChild(F);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";F=[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 N=0;N<F.length;N++){var U=document.createElement("option");
mxUtils.write(U,F[N]);U.value=N;2==N&&U.setAttribute("selected","selected");Q.appendChild(U)}mxEvent.addListener(Q,"change",function(){D=Q.value});x.appendChild(Q);F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");x.appendChild(F);var R=document.createElement("input");R.type="number";R.value=E;R.style.width="200px";R.style.boxSizing="border-box";x.appendChild(R);mxEvent.addListener(R,
"change",function(){E=R.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");x.appendChild(F);var W=document.createElement("input");W.type="number";W.value=M;W.style.width="200px";W.style.boxSizing="border-box";x.appendChild(W);mxEvent.addListener(W,"change",function(){M=W.value});F=mxUtils.button(mxResources.get("custom")+"...",function(){var X=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(Q.value),
parentChildSpacing:parseInt(R.value),siblingSpacing:parseInt(W.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(X,null,2))});F.className="geBtn";x=new CustomDialog(d,x,function(){null==D&&(D=2);d.loadOrgChartLayouts(k)},null,null,null,F);d.showDialog(x.container,355,140,!0,!0)},u,null,v());f.addSeparator(u);f.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var D=new mxParallelEdgeLayout(q);D.checkOverlap=!0;d.prompt(mxResources.get("spacing"),
D.spacing,mxUtils.bind(this,function(E){d.tryAndHandle(mxUtils.bind(this,function(){D.spacing=E;d.executeLayout(function(){D.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),u);f.addSeparator(u);d.menus.addMenuItem(f,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(f,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(f,["about"],u);else{var D=f.addItem("Search:",null,null,u,null,null,
!1);D.style.cursor="default";var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("size","25");E.style.borderWidth="1px";E.style.marginLeft="8px";mxEvent.addListener(E,"keydown",mxUtils.bind(this,function(M){var k=mxUtils.trim(E.value);13==M.keyCode&&0<k.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(k)),E.value="",EditorUi.logEvent({category:"SEARCH-HELP",
action:"search",label:k}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(E.value="")}));D.firstChild.nextSibling.appendChild(E);mxEvent.addGestureListeners(E,function(M){document.activeElement!=E&&E.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){E.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",
function(){d.checkForUpdates()}),this.addMenuItems(f,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(f,["check4Updates"],u),this.addMenuItems(f,["openDevTools","-","about"],u)):this.addMenuItems(f,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(f.addSeparator(u),this.addSubmenu("testDevelop",f,u))})));d.actions.addAction("languageCode...",function(){var f=new FilenameDialog(d,Graph.diagramLanguage||
"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=0<u.length?u:null,Graph.translateDiagram=!0,q.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(f.container,340,96,!0,!0);f.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,["languageCode","-"],u);u=f.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},u);Graph.translateDiagram||
f.addCheckmark(u,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");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");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var f=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(f);f=q.moveCells(f,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(f)))+
"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function f(x){return null==x||null==x.boundingBox||!isNaN(x.boundingBox.x)&&!isNaN(x.boundingBox.y)&&!isNaN(x.boundingBox.width)&&!isNaN(x.boundingBox.height)}var u=q.getGraphBounds(),D=q.view.translate,E=q.view.scale;q.insertVertex(q.getDefaultParent(),null,"",u.x/E-D.x,u.y/E-D.y,u.width/E,u.height/E,"fillColor=none;strokeColor=red;");var M=0,k=0;q.view.states.visit(function(x,F){x=!0;f(F.shape)||(console.log("invalid shape",
F.cell.id,F.shape),x=!1);f(F.text)||(console.log("invalid text",F.cell.id,F.text),x=!1);x||M++;k++});console.log("states checked",k,"invalid",M)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var f=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";f=new TextareaDialog(d,"Paste Data:",f,function(u){if(0<u.length)try{var D=function(F){function Q(aa){if(null==fa[aa]){if(fa[aa]=!0,null!=R[aa]){for(;0<R[aa].length;){var ea=R[aa].pop();
Q(ea)}delete R[aa]}}else mxLog.debug(N+": Visited: "+aa)}var N=F.parentNode.id,U=F.childNodes;F={};for(var R={},W=null,X={},Z=0;Z<U.length;Z++){var Y=U[Z];if(null!=Y.id&&0<Y.id.length)if(null==F[Y.id]){F[Y.id]=Y.id;var ca=Y.getAttribute("parent");null==ca?null!=W?mxLog.debug(N+": Multiple roots: "+Y.id):W=Y.id:(null==R[ca]&&(R[ca]=[]),R[ca].push(Y.id))}else X[Y.id]=Y.id}U=Object.keys(X);0<U.length?(U=N+": "+U.length+" Duplicates: "+U.join(", "),mxLog.debug(U+" (see console)")):mxLog.debug(N+": Checked");
var fa={};null==W?mxLog.debug(N+": No root"):(Q(W),Object.keys(fa).length!=Object.keys(F).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",R)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var E=mxUtils.parseXml(u),M=d.getPagesForNode(E.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var k=d.getHashValueForPages(M);mxLog.debug("Checksum: ",k)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");
var x=E.getElementsByTagName("root");for(u=0;u<x.length;u++)D(x[u]);mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});d.showDialog(f.container,620,460,!0,!0);f.init()}));var l=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var f=new TextareaDialog(d,"Diff/Sync:","",function(u){var D=d.getCurrentFile();if(0<u.length&&null!=D)try{var E=JSON.parse(u);D.patch([E],null,!0,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,
null,null,!0,null,"Patch",null,[["Snapshot",function(u,D){l=d.getPagesForXml(d.getFileData(!0));f.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(l)}],["Diff",function(u,D){try{f.textarea.value=JSON.stringify(d.diffPages(l,d.pages),null,2)}catch(E){d.handleError(E)}}]]);null==l?(l=d.getPagesForXml(d.getFileData(!0)),f.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(l)):f.textarea.value=JSON.stringify(d.diffPages(l,
d.pages),null,2);d.showDialog(f.container,620,460,!0,!0);f.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var f=d.getCurrentFile();null!=d.pages&&null!=f?d.spinner.spin(document.body,mxResources.get("loading"))&&f.getLatestVersion(function(u){d.spinner.stop();var D=d.getHashValueForPages(d.pages),E=f.getCurrentRevisionId(),M=d.getHashValueForPages(u.getShadowPages()),k=u.getDescriptorChecksum(u.getDescriptor()),x=u.getCurrentRevisionId();console.log("Local File",
[f],"modified",f.isModified(),"checksum",D);console.log("Remote File",[u],"rev",x==E,"desc",k==M,"checksum",M);d.alert("Checksums "+(M==D?"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 f=d.getCurrentFile();console.log("editorUi",d,"file",f);if(null!=f&&f.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(f.ownPages));
console.log("Checksum theirPages",d.getHashValueForPages(f.theirPages));console.log("diff ownPages/theirPages",d.diffPages(f.ownPages,f.theirPages));var u=f.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,f.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(f.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(f.theirPages,u)));null!=f.sync&&null!=f.sync.snapshot&&(console.log("Checksum snapshot",
d.getHashValueForPages(f.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(f.ownPages,f.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(f.theirPages,f.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(f.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(f.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(f.theirPages,d.pages)))}null!=f&&console.log("Shadow pages",[d.getXmlForPages(f.getShadowPages())]);
null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var f=d.getCurrentFile();null!=f&&f.isRealtime()&&null!=f.shadowPages&&(console.log("patching actualPages to shadowPages",f.patch([d.diffPages(f.shadowPages,d.pages)])),f.ownPages=d.clonePages(d.pages),f.theirPages=d.clonePages(d.pages),f.shadowPages=d.clonePages(d.pages),null!=f.sync&&(f.sync.snapshot=d.clonePages(d.pages)))}));
d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var f=q.model.cells,u=0,D=[],E=[],M;for(M in f){var k=f[M],x=q.getCurrentCellStyle(k)[mxConstants.STYLE_IMAGE];null!=x&&"data:"==x.substring(0,5)&&(null==D[x]&&(D[x]=(D[x]||0)+1,u++),E.push(k))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,E);console.log("Removed",u,"image(s) from",E.length,"cell(s): ",[E,D])}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 f=new mxImageExport,u=q.getGraphBounds(),D=q.view.scale,E=mxUtils.createXmlDocument(),M=E.createElement("output");E.appendChild(M);E=new mxXmlCanvas2D(M);E.translate(Math.floor((1-u.x)/D),Math.floor((1-u.y)/D));E.scale(1/D);var k=0,x=E.save;E.save=function(){k++;x.apply(this,arguments)};var F=E.restore;E.restore=function(){k--;F.apply(this,arguments)};var Q=f.drawShape;f.drawShape=function(N){mxLog.debug("entering shape",
N,k);Q.apply(this,arguments);mxLog.debug("leaving shape",N,k)};f.drawState(q.getView().getState(q.model.root),E);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",k)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var p=null,n=null,t=null,y=null,A=null,G=null,C=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=p?(q.view.revalidate=p,
p=null):(p=q.view.revalidate,q.view.revalidate=function(){var f=Date.now(),u=p.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=n?(d.selectPage=n,n=null):(n=d.selectPage,d.selectPage=function(){var f=Date.now(),u=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=t?(d.diffPages=t,t=null):(t=d.diffPages,d.diffPages=
function(){var f=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=y?(d.patchPages=y,y=null):(y=d.patchPages,d.patchPages=function(){var f=Date.now(),u=y.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=A?(d.clonePages=A,A=null):(A=d.clonePages,d.clonePages=function(){var f=Date.now(),u=A.apply(this,arguments);
EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=G?(d.getHashValueForPages=G,G=null):(G=d.getHashValueForPages,d.getHashValueForPages=function(){var f=Date.now(),u=G.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=C?(d.resolveCrossReferences=C,C=null):(C=d.resolveCrossReferences,d.resolveCrossReferences=function(){var f=Date.now(),
u=C.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-f+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=p?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),u);var D=f.addItem(mxResources.get("testPerformance"),
null,function(){d.actions.get("testPerformance").funct()},u);null!=p&&f.addCheckmark(D,Editor.checkmarkImage);this.addMenuItems(f,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(f){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(f){q.isEnabled()&&(f=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),f.vertex=!0,f=new EditShapeDialog(d,f,mxResources.get("editShape")+":",630,400),d.showDialog(f.container,640,480,!0,!1),f.init())})).isEnabled=v;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(f){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),
"https://www.drawio.com/doc/faq/embed-html-options",f,function(u,D,E,M,k,x,F,Q,N,U,R){d.createHtml(u,D,E,M,k,x,F,Q,N,U,R,mxUtils.bind(this,function(W,X){var Z=new EmbedDialog(d,W+"\n"+X,null,null,function(){var Y=window.open(),ca=Y.document;if(null!=ca){"CSS1Compat"===document.compatMode&&ca.writeln("<!DOCTYPE html>");ca.writeln("<html>");ca.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');ca.writeln("<body>");ca.writeln(W);var fa=mxClient.IS_IE||
mxClient.IS_EDGE||null!=document.documentMode;fa&&ca.writeln(X);ca.writeln("</body>");ca.writeln("</html>");ca.close();if(!fa){var aa=Y.document.createElement("div");aa.marginLeft="26px";aa.marginTop="26px";mxUtils.write(aa,mxResources.get("updatingDocument"));fa=Y.document.createElement("img");fa.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");fa.style.marginLeft="6px";aa.appendChild(fa);Y.document.body.insertBefore(aa,Y.document.body.firstChild);
window.setTimeout(function(){var ea=document.createElement("script");ea.type="text/javascript";ea.src=/<script.*?src="(.*?)"/.exec(X)[1];ca.body.appendChild(ea);aa.parentNode.removeChild(aa)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(Z.container,450,240,!0,!0);Z.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var f=d.getCurrentFile();null!=f&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
function(u){d.spinner.stop();null!=u?(u=new EmbedDialog(d,'<img src="'+(f.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+f.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(f,u,D,E,M,k){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(f,u,D,E,M,k,function(x){d.spinner.stop();
x=new EmbedDialog(d,x);d.showDialog(x.container,450,240,!0,!0);x.init()},function(x){d.spinner.stop();d.handleError(x)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(f,u,D,E,M,k){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(f,u,D,E,M,k,function(x){d.spinner.stop();x=new EmbedDialog(d,x);d.showDialog(x.container,450,240,!0,!0);
x.init()},function(x){d.spinner.stop();d.handleError(x)})},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(){var f=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(f.height/q.view.scale)+2,function(u,D,E,M,k,x,F,Q,N){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();
var R=[];N&&R.push("tags=%7B%7D");U=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+Q+';" src="'+d.createLink(u,D,E,M,k,x,U,null,R)+'"></iframe>');d.showDialog(U.container,450,240,!0,!0);U.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.textAlign="center";f.style.width="100%";f.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"));f.appendChild(u);mxEvent.addListener(u,"click",function(D){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(D)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(D,E,M,k,x,F,Q,N,U){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
function(R){d.spinner.stop();var W=["border=0"];U&&W.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(D,E,M,k,x,F,R,null,W,!0));d.showDialog(R.container,450,240,!0,!0);R.init()})},!0,"https://www.drawio.com/blog/drawio-notion",f)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(f,u,D,E,M,k,x,F,Q){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(N){d.spinner.stop();
var U=[];Q&&U.push("tags=%7B%7D");N=new EmbedDialog(d,d.createLink(f,u,D,E,M,k,N,null,U));d.showDialog(N.container,450,240,!0,!0);N.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.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(f){d.spinner.stop();f=new GoogleSitesDialog(d,f);d.showDialog(f.container,420,256,!0,!0);f.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)H=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),H.setToggleAction(!0),H.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",
function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});H=d.actions.addAction("search",function(){var f=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!f);isLocalStorage&&(mxSettings.settings.search=!f,mxSettings.save())});H.label=mxResources.get("searchShapes");H.setToggleAction(!0);H.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(f){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&
d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("save").funct=function(f){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 D=d.createLoadMessage("save");D.xml=u;f&&(D.exit=!0);u=JSON.stringify(D)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));f=d.getCurrentFile();
null==f||f.constructor==EmbedFile||f.constructor==LocalFile&&null==f.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var f=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,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(f,u){d.isExportToCanvas()?(this.addMenuItems(f,["exportPng"],u),d.jpgSupported&&this.addMenuItems(f,["exportJpg"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(f,
["exportPng","exportJpg"],u);this.addMenuItems(f,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(f,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(f,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(f,["exportVsdx"],u);this.addMenuItems(f,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(f.addSeparator(u),this.addMenuItem(f,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+
"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(f,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(f.addSeparator(u),d.menus.addSubmenu("embed",f,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(f,u){function D(k){k.pickFile(function(x){d.spinner.spin(document.body,mxResources.get("loading"))&&k.getFile(x,function(F){var Q=
"data:image/"==F.getData().substring(0,11)?M(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),Q="image/svg+xml");E(F.getData(),Q,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},k==d.drive)},!0)}var E=mxUtils.bind(this,function(k,x,F){var Q=q.view,N=q.getGraphBounds(),U=q.snap(Math.ceil(Math.max(0,N.x/Q.scale-Q.translate.x)+4*q.gridSize)),R=q.snap(Math.ceil(Math.max(0,
(N.y+N.height)/Q.scale-Q.translate.y)+4*q.gridSize));"data:image/"==k.substring(0,11)?d.loadImage(k,mxUtils.bind(this,function(W){var X=!0,Z=mxUtils.bind(this,function(){d.resizeImage(W,k,mxUtils.bind(this,function(Y,ca,fa){Y=X?Math.min(1,Math.min(d.maxImageSize/ca,d.maxImageSize/fa)):1;d.importFile(k,x,U,R,Math.round(ca*Y),Math.round(fa*Y),F,function(aa){d.spinner.stop();q.setSelectionCells(aa);q.scrollCellToVisible(q.getSelectionCell())})}),X)});k.length>d.resampleThreshold?d.confirmImageResize(function(Y){X=
Y;Z()}):Z()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(k,x,U,R,0,0,F,function(W){d.spinner.stop();q.setSelectionCells(W);q.scrollCellToVisible(q.getSelectionCell())})}),M=mxUtils.bind(this,function(k){var x="text/xml";/\.png$/i.test(k)?x="image/png":/\.jpe?g$/i.test(k)?x="image/jpg":/\.gif$/i.test(k)?x="image/gif":/\.pdf$/i.test(k)&&(x="application/pdf");return x});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){D(d.drive)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){D(d.oneDrive)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?
f.addItem(mxResources.get("dropbox")+"...",null,function(){D(d.dropbox)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){D(d.gitHub)},u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){D(d.gitLab)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){D(d.trello)},
u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(f.addSeparator(u),f.addItem(mxResources.get("url")+"...",null,function(){var k=new FilenameDialog(d,
"",mxResources.get("import"),function(x){if(null!=x&&0<x.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(x)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(x),function(Q){E(Q,F,x)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(k.container,300,80,!0,!0);k.init()},u))}))).isEnabled=v;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,
function(f,u){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>D&&this.addSubmenu("viewZoom",f,u,mxResources.get("zoom")),460>D&&d.isPageMenuVisible()&&this.addSubmenu("pages",f,u),320>D&&this.addSubmenu("insert",f,u),360>D&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",f,u));this.addMenuItems(f,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(D=d.menus.addMenuItem(f,"autoMode",
u),null!=D&&D.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&this.addMenuItems(f,["-","toggleSimpleMode"],u)})));this.put("appearance",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(f=d.menus.addMenuItem(f,"autoMode",u),null!=f&&f.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||
Editor.isDarkMode()?"dark":"light")+")"))})));d.actions.addAction("addToScratchpad",function(f){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(f)});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(f,u){var D="1"==urlParams.sketch?"sketch":mxSettings.getUi(),E=f.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},
u);"kennedy"!=D&&"atlas"!=D&&"dark"!=D&&"simple"!=D&&"sketch"!=D&&"min"!=D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},u);"kennedy"!=D&&"dark"!=D||f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("simple"),null,function(){d.setCurrentTheme("simple")},u);"simple"==D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},
u);"sketch"==D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},u);"min"==D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},u);"atlas"==D&&f.addCheckmark(E,Editor.checkmarkImage)})));H=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var f=this.editorUi.getCurrentFile();if(null!=f)if(f.constructor==LocalFile&&null!=f.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,
function(D,E){f.invalidFileHandle=null;f.fileHandle=D;f.title=E.name;f.desc=E;d.save(E.name)}),null,d.createFileSystemOptions(f.getTitle()));else{var u=null!=f.getTitle()?f.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(D){null!=D&&0<D.length&&null!=f&&D!=f.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&f.rename(D,mxUtils.bind(this,function(E){this.editorUi.spinner.stop()}),mxUtils.bind(this,
function(E){this.editorUi.handleError(E,null!=E?mxResources.get("errorRenamingFile"):null)}))}),f.constructor==DriveFile||f.constructor==StorageFile?mxResources.get("diagramName"):null,function(D){if(null!=D&&0<D.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));H.isEnabled=function(){return this.enabled&&v.apply(this,arguments)};
H.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var f=d.getCurrentFile();if(null!=f){var u=d.getCopyFilename(f);f.constructor==DriveFile?(u=new CreateDialog(d,u,mxUtils.bind(this,function(D,E){"_blank"==E?d.editor.editAsNew(d.getFileData(),D):("download"==E&&(E=App.MODE_GOOGLE),null!=D&&0<D.length&&(E==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&f.saveAs(D,mxUtils.bind(this,function(M){f.desc=M;f.save(!1,mxUtils.bind(this,
function(){d.spinner.stop();f.setModified(!1);f.addAllSavedStatus()}),mxUtils.bind(this,function(k){d.handleError(k)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(D,d.getFileData(!0),null,E)))}),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(f,u){f=d.getCurrentFile();null!=f&&d.openLink(f.getFolderUrl())}));d.actions.addAction("openFile...",mxUtils.bind(this,function(){var f=d.getCurrentFile();null!=f&&d.openLink(f.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var f=d.getCurrentFile();if(f.getMode()==App.MODE_GOOGLE||f.getMode()==App.MODE_ONEDRIVE){var u=!1;if(f.getMode()==App.MODE_GOOGLE&&null!=f.desc.parents)for(var D=
0;D<f.desc.parents.length;D++)if(f.desc.parents[D].isRoot){u=!0;break}d.pickFolder(f.getMode(),mxUtils.bind(this,function(E){d.spinner.spin(document.body,mxResources.get("moving"))&&f.move(E,mxUtils.bind(this,function(M){d.spinner.stop()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,["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 f=d.getCurrentFile();null!=f&&f.share()}catch(u){d.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,function(f,u){var D=d.getCurrentFile();null==D||D.getMode()!=App.MODE_GOOGLE&&D.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(D.getTitle())||this.addMenuItems(f,["liveImage","-"],u);this.addMenuItems(f,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(f,["embedIframe"],
u);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(f,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));d.addInsertItem=function(f,u,D,E){("plantUml"!=E||EditorUi.enablePlantUml&&!d.isOffline())&&f.addItem(D,null,mxUtils.bind(this,function(){if("fromText"==E||"formatSql"==E||"plantUml"==E||"mermaid"==E){var M=new ParseDialog(d,D,E);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(d,D,E),d.showDialog(M.container,
620,420,!0,!1);M.init()}),u,null,v())};var V=function(f){q.getModel().beginUpdate();try{f=q.addCell(f),q.fireEvent(new mxEventObject("cellsInserted","cells",[f])),q.model.isVertex(f)&&q.isAutoSizeCell(f)&&q.updateCellSize(f)}finally{q.getModel().endUpdate()}q.scrollCellToVisible(f);q.setSelectionCell(f);q.container.focus();q.editAfterInsert&&q.startEditing(f);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(f))},0);return f},O=function(f,u,D,E,M){f=new mxCell(f,
new mxGeometry(0,0,u,D),E);f.vertex=!0;null==M&&(M=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([f],!0)));f.geometry.x=M.x;f.geometry.y=M.y;return V(f)};d.actions.put("insertText",new Action(mxResources.get("text"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(O("Text",60,30,"text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?
null:q.getInsertPoint()))},null,null,"A")).isEnabled=v;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&O("",120,60,"whiteSpace=wrap;html=1;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"D")).isEnabled=v;d.actions.put("insertNote",new Action(mxResources.get("note"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&O("",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==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"S")).isEnabled=v;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
O("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=v;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&O("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=v;d.actions.put("insertEdge",
new Action(mxResources.get("line"),function(f){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var u=q.defaultEdgeLength;f=null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint();null==f&&(f=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([D],!0)));var D=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");D.geometry.setTerminalPoint(f,!0);D.geometry.setTerminalPoint(new mxPoint(f.x+D.geometry.width,
f.y),!1);D.geometry.points=[];D.geometry.relative=!0;D.edge=!0;V(D)}},null,null,"C")).isEnabled=v;H=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"));H.setToggleAction(!0);H.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(f,u,D){for(var E=0;E<D.length;E++)"-"==D[E]?f.addSeparator(u):d.addInsertItem(f,u,mxResources.get(D[E])+"...",D[E])});this.put("insert",new Menu(mxUtils.bind(this,function(f,u){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(f,["toggleShapes"],u),d.menus.addSubmenu("table",f,u),f.addSeparator(u),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(f,["insertTemplate"],u),d.menus.addMenuItems(f,["insertImage",
"insertLink","-"],u),d.menus.addSubmenu("insertAdvanced",f,u,mxResources.get("advanced")),d.menus.addSubmenu("layout",f,u)):(this.addMenuItems(f,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(f,["insertTemplate"],u),f.addSeparator(u),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("table",f,u),this.addSubmenu("layout",f,u)):
this.addSubmenu("insertLayout",f,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",f,u,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(f,u){d.menus.addInsertTableCellItem(f,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(f,u){d.addInsertMenuItems(f,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(f,u){d.addInsertMenuItems(f,
u,["fromText","plantUml","mermaid","-","formatSql"]);f.addItem(mxResources.get("csv")+"...",null,function(){q.popupMenuHandler.hideMenu();d.showImportCsvDialog()},u,null,v());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(f,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(f,u){var D=d.getRecent();if(null!=D){for(var E=0;E<D.length;E++)(function(M){var k=M.mode;k==App.MODE_GOOGLE?k="googleDrive":k==App.MODE_ONEDRIVE&&(k="oneDrive");f.addItem(M.title+
" ("+mxResources.get(k)+")",null,function(){d.loadFile(M.id)},u)})(D[E]);f.addSeparator(u)}f.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},u)}));this.put("openFrom",new Menu(function(f,u){null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+
"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+
"...",null,function(){d.pickFile(App.MODE_GITHUB)},u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+
"...",null,function(){d.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(f.addSeparator(u),f.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(E){null!=E&&0<E.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(E):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
"/")+window.location.search+"#U"+encodeURIComponent(E)))},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(f,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+
mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):B&&"function"===
typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,
null,null,null,App.MODE_TRELLO)},u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},
u)})),this.put("openLibraryFrom",new Menu(function(f,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},u):K&&
"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},
u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},
u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(f.addSeparator(u),f.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(E){if(null!=E&&0<E.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=E;d.editor.isCorsEnabledForUrl(E)||(M=PROXY_URL+"?url="+encodeURIComponent(E));mxUtils.get(M,function(k){if(200<=k.getStatus()&&299>=k.getStatus()){d.spinner.stop();
try{d.loadLibrary(new UrlLibrary(this,k.getText(),E))}catch(x){d.handleError(x,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},u));"1"==urlParams.confLib&&(f.addSeparator(u),f.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},
u))})));this.put("edit",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));H=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",
function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var f=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(f);this.commentsWindow.refreshCommentsTime();f&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,
function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(f,u){var D=d.getCurrentFile();d.menus.addMenuItems(f,"toggleShapes format ruler - findReplace layers tags outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(f,["comments"],u);null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&
d.menus.addMenuItems(f,["showRemoteCursors"],u);d.menus.addMenuItems(f,["-","fullscreen"],u)};this.put("view",new Menu(mxUtils.bind(this,function(f,u){if("simple"==Editor.currentTheme){var D=d.getCurrentFile();d.menus.addMenuItems(f,["toggleShapes","format"],u);d.isPageMenuVisible()&&d.menus.addMenuItems(f,["pageTabs"],u);d.menus.addMenuItems(f,["ruler","-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var E=d.menus.addMenuItem(f,"scratchpad",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
d.menus.addLinkToItem(E,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(f,"- findReplace layers tags outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(f,["comments"],u);null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(f,["showRemoteCursors"],u);this.addMenuItems(f,["-","fullscreen"],u)}else{this.addMenuItems(f,["format","outline","layers","tags"].concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(f,["-","search"],
u);if(isLocalStorage||mxClient.IS_CHROMEAPP)E=this.addMenuItem(f,"scratchpad",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(E,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(f,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",f,u);f.addSeparator(u);d.isPageMenuVisible()&&d.menus.addMenuItems(f,["pageTabs"],u);this.addMenuItems(f,"tooltips ruler - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
u);"1"!=urlParams.sketch&&this.addMenuItems(f,["-","fullscreen"],u)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(f,u){var D=d.currentPage;null!=D&&(f.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(D,D.getName())}),
u),f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(D)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",f,u,mxResources.get("move")),f.addSeparator(u)),f.addSeparator(u),f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(D,mxResources.get("copyOf",[D.getName()]))}),u),1!=urlParams.embed&&(f.addSeparator(u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||f.addItem(mxResources.get("openInNewWindow"),
null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u),null!=d.getLinkForPage(D)&&f.addItem(mxResources.get("link")+"...",null,mxUtils.bind(this,function(){d.showPageLinkDialog(D)}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(f,u){var D=d.currentPage;f.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){d.insertPage()}),u);f.addSeparator(u);if(null!=d.pages)for(var E=0;E<d.pages.length;E++)mxUtils.bind(this,function(M){var k=
null;k=d.pages[M]==D?d.menus.addSubmenu("currentPage",f,u,d.getShortPageName(D)):f.addItem(d.getShortPageName(d.pages[M]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[M])}),u);var x=d.pages[M].getId();k.setAttribute("title",d.pages[M].getName()+" ("+(M+1)+"/"+d.pages.length+")"+(null!=x?" ["+x+"]":""));d.pages[M]==D&&f.addCheckmark(k,Editor.checkmarkImage)})(E)})));if(EditorUi.isElectronApp){var L="1"==urlParams.enableSpellCheck;H=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();
L=!L;d.alert(mxResources.get("restartForChangeRequired"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return L});var P="1"==urlParams.enableStoreBkp;H=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();P=!P});H.setToggleAction(!0);H.setSelectedCallback(function(){return P});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var f=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"),null,null,null,null,null,null,50,250);d.showDialog(f.container,320,80,!0,!0);f.init()})}var T=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(f,u){if("simple"==Editor.currentTheme||"1"==urlParams.sketch||"min"==uiTheme){"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",f,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",f,u);f.addSeparator(u);null==T||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",f,u);d.menus.addSubmenu("units",f,u);d.menus.addMenuItems(f,["-","copyConnect","collapseExpand","tooltips","-"],u);var D=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=
D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(f,["showRemoteCursors"],u),d.menus.addMenuItems(f,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(f,["-","spellCheck","autoBkp","drafts","-"],u);this.addSubmenu("diagramLanguage",f,u);f.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(f,"configuration",u);f.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",f,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==
Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",f,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",f,u),f.addSeparator(u),"undefined"!==typeof MathJax&&(D=this.addMenuItem(f,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(f,["spellCheck",
"autoBkp","drafts","-"],u),this.addMenuItems(f,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(D=d.getCurrentFile(),null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(f,["showRemoteCursors","shareCursor"],u),this.addMenuItems(f,["autosave"],u)),f.addSeparator(u),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(f,"plugins",u),this.addMenuItems(f,["-","editDiagram"],u),this.addSubmenu("diagramLanguage",f,u),f.addSeparator(u),"1"!=urlParams.embed&&(isLocalStorage||
mxClient.IS_CHROMEAPP)&&this.addMenuItems(f,["showStartScreen"],u),this.addMenuItems(f,["configuration"],u),f.addSeparator(u),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function E(k){return{id:k.id,isExt:!0,url:k.downloadUrl,title:k.title,imgUrl:k.thumbnailLink,changedBy:k.lastModifyingUserName,lastModifiedOn:k.modifiedDate}}var M=new TemplatesDialog(d,function(k){console.log(arguments)},null,null,null,"user",function(k,x,F){var Q=new Date;Q.setDate(Q.getDate()-7);d.drive.listFiles(null,
Q,F?!0:!1,function(N){for(var U=[],R=0;R<N.items.length;R++)U.push(E(N.items[R]));k(U)},x)},function(k,x,F,Q){d.drive.listFiles(k,null,Q?!0:!1,function(N){for(var U=[],R=0;R<N.items.length;R++)U.push(E(N.items[R]));x(U)},F)},function(k,x,F){d.drive.getFile(k.id,function(Q){x(Q.data)},F)},null,function(k){k({Test:[]},1)},!0,!1);d.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(f,"templates",u))})));this.put("movePage",new Menu(mxUtils.bind(this,function(f,
u){var D=d.getSelectedPageIndex();if(null!=d.pages)for(var E=0;E<d.pages.length;E++)E!=D&&function(M){f.addItem(d.getShortPageName(d.pages[M]),null,function(){d.movePage(D,M)},u)}(E)})));this.put("share",new Menu(mxUtils.bind(this,function(f,u){if(!d.isStandaloneApp()){var D=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=D&&(f.addItem(D,null,null,u,null,!1),f.addSeparator(u));d.menus.addMenuItems(f,["share"],u)}this.addMenuItem(f,"publishLink",u,null,null,mxResources.get("publish")+
"...");null!=d.getMainUser()&&this.addMenuItems(f,["accounts"],u)})));this.put("diagram",new Menu(mxUtils.bind(this,function(f,u){var D=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",f,u,mxResources.get("settings")),f.addSeparator(u));var E="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(f,"new open - synchronize properties - save saveAs -".split(" "),u);else if(d.mode==App.MODE_ATLAS){"1"!=
urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(f,["-","save"],u);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(f,["saveAndExit"],u),null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["revisionHistory"],u);f.addSeparator(u)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(f,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",f,u),f.addSeparator(u),
"min"==Editor.currentTheme&&(d.menus.addMenuItems(f,"toggleShapes format layers tags - findReplace".split(" "),u),d.commentsSupported()&&d.menus.addMenuItems(f,["comments"],u),f.addSeparator(u)));d.menus.addSubmenu("exportAs",f,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(f,["import"],u):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",f,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(d.menus.addMenuItems(f,["-","findReplace"],u),d.commentsSupported()&&
d.menus.addMenuItems(f,["comments","-"],u),d.menus.addMenuItems(f,["toggleShapes","format","layers","tags","-"],u),d.menus.addMenuItems(f,["pageSetup"],u)):"min"!=Editor.currentTheme&&(this.addMenuItems(f,["-"],u),this.addSubmenu("newLibrary",f,u),this.addSubmenu("openLibraryFrom",f,u));f.addSeparator(u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(f,["print"],u);E||"min"==Editor.currentTheme||null==D||null==d.fileNode||"1"==urlParams.embedInline||(E=null!=
D.getTitle()?D.getTitle():d.defaultFilename,/(\.html)$/i.test(E)||this.addMenuItems(f,["-","properties"]));f.addSeparator(u);"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",f,u,mxResources.get("settings")),f.addSeparator(u));d.menus.addSubmenu("help",f,u);f.addSeparator(u);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(f,["save"],u),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(f,
["saveAndExit"],u),null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["revisionHistory"],u));"1"!=urlParams.embed&&d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(f,["exit"],u);"1"!=urlParams.embed&&null!=D&&d.menus.addMenuItems(f,["-","close"],u)})));this.put("save",new Menu(mxUtils.bind(this,function(f,u){var D=d.getCurrentFile();null==D||D.constructor!=DriveFile&&D.constructor!=OneDriveFile?(d.menus.addMenuItems(f,["save","saveAs","-",
"rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(f,["upload"],u):d.menus.addMenuItems(f,["makeCopy"],u)):d.menus.addMenuItems(f,["save","makeCopy","-","rename","moveToFolder"],u);d.menus.addMenuItems(f,["-","autosave"],u);null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["-","revisionHistory"],u)})));this.put("file",new Menu(mxUtils.bind(this,function(f,u){var D="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||
"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",f,u),this.addSubmenu("exportAs",f,u),this.addSubmenu("embed",f,u),"1"==urlParams.libraries&&(this.addMenuItems(f,["-"],u),this.addSubmenu("newLibrary",f,u),this.addSubmenu("openLibraryFrom",f,u)),d.isRevisionHistorySupported()&&this.addMenuItems(f,["-","revisionHistory"],u),this.addMenuItems(f,["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(f,
["saveAndExit"],u):(this.addMenuItems(f,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(f,["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(f,["exit"],u);else if(D){D=d.getCurrentFile();d.menus.addMenuItems(f,["new"],u);d.menus.addSubmenu("openFrom",f,u);isLocalStorage&&this.addSubmenu("openRecent",f,u);f.addSeparator(u);d.menus.addMenuItems(f,["-","save"],u);null!=D&&D.constructor==DriveFile||d.menus.addMenuItems(f,["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
null==D||D.constructor==LocalFile&&null==D.fileHandle||d.menus.addMenuItems(f,["synchronize"],u);f.addSeparator(u);null!=D&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(f,"publishLink",u,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||D.constructor!=DriveFile&&D.constructor!=GitHubFile&&D.constructor!=OneDriveFile||d.menus.addMenuItems(f,["share"],u));f.addSeparator(u);null!=D&&D.isRenamable()&&this.addMenuItems(f,["rename"],
u);d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(f,["upload"],u):(d.menus.addMenuItems(f,["makeCopy"],u),null!=D&&(D.constructor!=OneDriveFile&&D.constructor!=DriveFile||d.menus.addMenuItems(f,["moveToFolder"],u),f.addSeparator(u),null!=D.getFolderUrl()&&d.menus.addMenuItems(f,["openFolder"],u),null!=D.getFileUrl()&&d.menus.addMenuItems(f,["openFile"],u)));f.addSeparator(u);null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["revisionHistory"],
u);if(null!=D&&null!=d.fileNode&&"1"!=urlParams.embedInline){var E=null!=D.getTitle()?D.getTitle():d.defaultFilename;(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(E))&&this.addMenuItems(f,["properties"],u)}"simple"==Editor.currentTheme&&d.menus.addMenuItems(f,["-","autosave"],u)}else D=this.editorUi.getCurrentFile(),null!=D&&D.constructor==DriveFile?(D.isRestricted()&&this.addMenuItems(f,["exportOptionsDisabled"],u),this.addMenuItems(f,["save","-","share"],u),E=
this.addMenuItem(f,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(E,"https://www.drawio.com/doc/faq/synchronize"),f.addSeparator(u)):this.addMenuItems(f,["new"],u),this.addSubmenu("openFrom",f,u),isLocalStorage&&this.addSubmenu("openRecent",f,u),null!=D&&D.constructor==DriveFile?this.addMenuItems(f,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==
D.fileHandle||(f.addSeparator(u),E=this.addMenuItem(f,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(E,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(f,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==D||this.addMenuItems(f,["share","-"],u),null!=D&&D.isRenamable()&&this.addMenuItems(f,["rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
"1"!=urlParams.lockdown&&this.addMenuItems(f,["upload"],u):(this.addMenuItems(f,["makeCopy"],u),null!=D&&(D.constructor==OneDriveFile&&this.addMenuItems(f,["moveToFolder"],u),null!=D.getFolderUrl()&&d.menus.addMenuItems(f,["openFolder"],u)))),f.addSeparator(u),this.addSubmenu("importFrom",f,u),this.addSubmenu("exportAs",f,u),f.addSeparator(u),this.addSubmenu("embed",f,u),this.addSubmenu("publish",f,u),f.addSeparator(u),this.addSubmenu("newLibrary",f,u),this.addSubmenu("openLibraryFrom",f,u),d.isRevisionHistorySupported()&&
this.addMenuItems(f,["-","revisionHistory"],u),null!=D&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(E=null!=D.getTitle()?D.getTitle():d.defaultFilename,(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(E))&&this.addMenuItems(f,["-","properties"])),this.addMenuItems(f,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(f,["print"],u),this.addMenuItems(f,["-","close"])})));m.prototype.execute=function(){var f=this.ui.editor.graph;this.customFonts=
this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var u=f.extFonts,D=0;null!=u&&D<u.length;D++){var E=document.getElementById("extFont_"+u[D].name);null!=E&&E.parentNode.removeChild(E)}f.extFonts=[];for(D=0;null!=this.previousExtFonts&&D<this.previousExtFonts.length;D++)this.ui.editor.graph.addExtFont(this.previousExtFonts[D].name,this.previousExtFonts[D].url);
this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(f,u){for(var D=mxUtils.bind(this,function(R,W,X,Z,Y){var ca=d.editor.graph;Z=this.styleChange(f,Z||R,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[R,null!=W?encodeURIComponent(W):null,null]:[R],null,u,function(){"1"!=urlParams["ext-fonts"]?ca.setFont(R,W):(document.execCommand("fontname",!1,R),ca.addExtFont(R,W));d.fireEvent(new mxEventObject("styleChanged",
"keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[R,null!=W?encodeURIComponent(W):null,null]:[R],"cells",[ca.cellEditor.getEditingCell()]))},function(){ca.updateLabelElements(ca.getSelectionCells(),function(fa){fa.removeAttribute("face");fa.style.fontFamily=null;"PRE"==fa.nodeName&&ca.replaceElement(fa,"div")});"1"==urlParams["ext-fonts"]&&ca.addExtFont(R,W)});X&&(X=document.createElement("span"),
X.className="geSprite geSprite-delete",X.style.cursor="pointer",X.style.display="inline-block",Z.firstChild.nextSibling.nextSibling.appendChild(X),mxEvent.addListener(X,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(fa){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[R.toLowerCase()];for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==R&&this.customFonts[aa].url==W){this.customFonts.splice(aa,1);d.fireEvent(new mxEventObject("customFontsChanged"));
break}}else{var ea=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=ea&&0<ea.length)for(aa=0;aa<ea.length;aa++)if(ea[aa].name==R){ea.splice(aa,1);break}var va=mxUtils.clone(this.customFonts);for(aa=0;aa<va.length;aa++)if(va[aa].name==R){va.splice(aa,1);break}aa=new m(this.editorUi,ea,va);this.editorUi.editor.graph.model.execute(aa)}this.editorUi.hideCurrentMenu();mxEvent.consume(fa)})));Graph.addFont(R,W);Z.firstChild.nextSibling.style.fontFamily=R;null!=Y&&Z.setAttribute("title",Y)}),
E={},M=0;M<this.defaultFonts.length;M++){var k=this.defaultFonts[M];"string"===typeof k?D(k):null!=k.fontFamily&&null!=k.fontUrl&&(E[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,D(k.fontFamily,k.fontUrl))}f.addSeparator(u);if("1"!=urlParams["ext-fonts"]){k=function(R){var W=encodeURIComponent(R.name)+(null==R.url?"":"@"+encodeURIComponent(R.url));if(!E[W]){for(var X=R.name,Z=0;null!=F[X.toLowerCase()];)X=R.name+" ("+ ++Z+")";null==x[W]&&(Q.push({name:R.name,url:R.url,label:X,
title:R.url}),F[X.toLowerCase()]=R,x[W]=R)}};var x={},F={},Q=[];for(M=0;M<this.customFonts.length;M++)k(this.customFonts[M]);for(var N in Graph.recentCustomFonts)k(Graph.recentCustomFonts[N]);Q.sort(function(R,W){return R.label<W.label?-1:R.label>W.label?1:0});if(0<Q.length){for(M=0;M<Q.length;M++)D(Q[M].name,Q[M].url,!0,Q[M].label,Q[M].url);f.addSeparator(u)}f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),
u);f.addSeparator(u)}else{N=this.editorUi.editor.graph.extFonts;if(null!=N&&0<N.length){k={};var U=!1;for(M=0;M<this.customFonts.length;M++)k[this.customFonts[M].name]=!0;for(M=0;M<N.length;M++)k[N[M].name]||(this.customFonts.push(N[M]),U=!0);U&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=0;M<this.customFonts.length;M++)N=this.customFonts[M].name,k=this.customFonts[M].url,D(N,k,!0),this.editorUi.editor.graph.addExtFont(N,
k,!0);f.addSeparator(u);f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var R=new m(this.editorUi,[],[]);d.editor.graph.model.execute(R)}),u);f.addSeparator(u)}}f.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var R=this.editorUi.editor.graph,W=R.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],X="s",Z=null;if("1"!=urlParams["ext-fonts"]&&R.isEditing()){var Y=R.getSelectedEditingElement();null!=Y&&(Y=mxUtils.getCurrentStyle(Y),null!=
Y&&(W=Graph.stripQuotes(Y.fontFamily),Z=Graph.getFontUrl(W,null),null!=Z&&(Graph.isGoogleFontUrl(Z)?(Z=null,X="g"):X="w")))}else Y=R.getView().getState(R.getSelectionCell()),null!=Y&&(W=Y.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(Y=Y.style.fontSource,null!=Y&&(Y=decodeURIComponent(Y),Graph.isGoogleFontUrl(Y)?X="g":(X="w",Z=Y))):(X=Y.style.FType||X,"w"==X&&(Z=this.editorUi.editor.graph.extFonts,Y=null,null!=Z&&(Y=Z.find(function(fa){return fa.name==W})),Z=null!=Y?Y.url:mxResources.get("urlNotFound",
null,"URL not found"))));null!=Z&&Z.substring(0,PROXY_URL.length)==PROXY_URL&&(Z=decodeURIComponent(Z.substr((PROXY_URL+"?url=").length)));var ca=null;document.activeElement==R.cellEditor.textarea&&(ca=R.cellEditor.saveSelection());X=new FontDialog(this.editorUi,W,Z,X,mxUtils.bind(this,function(fa,aa,ea){null!=ca&&(R.cellEditor.restoreSelection(ca),ca=null);if(null!=fa&&0<fa.length)if("1"!=urlParams["ext-fonts"]&&R.isEditing())R.setFont(fa,aa);else{R.getModel().beginUpdate();try{R.stopEditing(!1);
"1"!=urlParams["ext-fonts"]?(R.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),R.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),R.setCellStyles("FType",null)):(R.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),"s"!=ea&&(R.setCellStyles("FType",ea),0==aa.indexOf("http://")&&(aa=PROXY_URL+"?url="+encodeURIComponent(aa)),this.editorUi.editor.graph.addExtFont(fa,aa)));ea=!0;for(var va=0;va<this.customFonts.length;va++)if(this.customFonts[va].name==fa){ea=!1;break}ea&&(this.customFonts.push({name:fa,
url:aa}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{R.getModel().endUpdate()}}}));this.editorUi.showDialog(X.container,380,Editor.enableWebFonts?250:180,!0,!0);X.init()}),u,null,!0)})))}})();function DiagramPage(b,g){this.node=b;null!=g?this.node.setAttribute("id",g):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";z!=this.tabContainer.style.height&&this.refresh(!1)}g.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(z,B){z=B.getProperty("edit").changes;for(B=0;B<z.length;B++)if(z[B]instanceof RenamePage||z[B]instanceof MovePage||z[B]instanceof mxRootChange){this.updateTabContainer();
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var C=0;C<F.length;C++){var t=F[C];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[u]);if(F){for(var C in F)lb+=C+"="+F[C]+";";return F.fontFamily?"font-family: "+F.fontFamily:
""}if("Liberation Sans"!=u)return lb="fontFamily="+u+";","font-family: "+u+";"}}catch(t){}return""}function A(u){return Math.round(10*u)/10}function B(u,F,C){function t(la,Ma){var ya="",za=la.t,Qb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Qb.v)null==za&&(Na&&(ya+=N(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=N(!0));Na=za.v;Ka=Qb.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(Qb.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:C.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var ea=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=
Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(ea=Va.v),Va=aa[++Ma]}catch(Gb){console.log(Gb)}ea=T(ea);null!=ea&&(ea=ea.substring(0,7),ya+="color:"+ea+";");xb&&(ya+="font-size:"+A(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=ea=la.a?la.a.v:C.TextAlign||"center","left"==ea?xb="flex-start":"right"==ea&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+ea+"; align-items: baseline; font-size: 0; line-height: 1.25;");la.il&&(ya+="margin-left: "+
Math.max(0,A(.75*la.il.v-(Na?28:0)))+"px;");la.ir&&(ya+="margin-right: "+A(.75*la.ir.v)+"px;");la.mt&&(ya+="margin-top: "+A(.75*la.mt.v)+"px;");la.mb&&(ya+="margin-bottom: "+A(.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?A(.75*la.s.v):"13")+"px;";la.c&&(za=T(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:C.Font&&(za=C.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 N(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 Qb=Ba.pop();la+="</"+Qb+">"}while(za&&0<Ba.length);return la}var q={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 q[la.n]});for(var U=[0],wa=0;0<(wa=u.indexOf("\n",wa));)wa++,U.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>U[wa])F.splice(ja,0,{s:U[wa],n:"a",v:C.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==U[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=U[wa]&&F.push({s:U[wa],n:"a",v:C.TextAlign||
"center"});U="";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=u.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},U+=r(u,La,Ia,!0),l=La=Ia,U+=N());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:u.length;U+=t(ma,na);ua&&(U+=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&&(U+=e(na)+r(u,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];U+=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);U+=r(u,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}U+=r(null,null,null,!0);ua&&(l!=Ia&&(U+=e({dummy:1})+r(u,l,Ia)),U+=N(!0));return U}function m(u,F){G=!1;var C=null!=u.Text&&u.Text.t?u.Text:null!=u.Value&&u.Value.t?u.Value:
null!=u.Lane_0&&u.Lane_0.t?u.Lane_0:null;null==C&&null!=u.State?u.State.t&&(C=u.State):null==C&&null!=u.Note?u.Note.t&&(C=u.Note):null==C&&null!=u.Title?u.Title.t&&(C=u.Title):u.t&&(C=u);null==C&&null!=u.TextAreas?null!=u.TextAreas.Text&&null!=u.TextAreas.Text.Value&&u.TextAreas.Text.Value.t&&(C=u.TextAreas.Text.Value):null==C&&null!=u.t0&&u.t0.t&&(C=u.t0);if(null!=C){if(null!=C.t){var t=C.t;t=t.replace(/\u2028/g,"\n");C=C.m;try{/   /.test(t)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<C.length;e++)if(0<
C[e].s||null!=C[e].e&&C[e].e<t.length||"t"==C[e].n||"ac"==C[e].n||"lk"==C[e].n){G=!0;break}if(G=G||F)return B(t,C,u)}catch(N){console.log(N)}t=t.replace(/</g,"&lt;");return t=t.replace(/>/g,"&gt;")}if(null!=C.Value&&null!=C.Value.t)return C.Value.t=C.Value.t.replace(/</g,"&lt;"),C.Value.t=C.Value.t.replace(/>/g,"&gt;"),C.Value.t}return""}function g(u){return null!=u.Action?u.Action:u}function b(u){if(null!=u.Text){if(null!=u.Text.m)return u.Text.m}else if(null!=u.TextAreas){if(null!=u.TextAreas.Text&&
null!=u.TextAreas.Text.Value&&null!=u.TextAreas.Text.Value.m)return u.TextAreas.Text.Value.m}else{if(null!=u.m)return u.m;if(null!=u.Title){if(null!=u.Title.m)return u.Title.m}else if(null!=u.State){if(null!=u.State.m)return u.State.m}else if(null!=u.Note&&null!=u.Note.m)return u.Note.m}return null}function a(u,F){u="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(u)+k(u)+p(u)+x(u)+E(u)+I(u)+J(u)+O(u)+M(u))+L(u)+H(u)+Zb(mxConstants.STYLE_ALIGN,u.TextAlign,"center");lb=
"";return u}function c(u,F,C,t,e,N){N=null==N?!1:N;var r="",q=!1,Z=!1;if(null!=u)if(N){N=u.split(";");u="";for(var aa=0;aa<N.length;aa++)"fillColor=none"==N[aa]?Z=!0:"strokeColor=none"==N[aa]?q=!0:""!=N[aa]&&(u+=N[aa]+";")}else""!=u&&";"!=u.charAt(u.length-1)&&(r=";");r+=(Xc(u,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(u,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(u,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,u,F,C,t)+d(mxConstants.STYLE_FONTFAMILY,u,F,C,t)+d(mxConstants.STYLE_FONTCOLOR,
u,F,C,t)+d(mxConstants.STYLE_FONTSTYLE,u,F,C,t)+d(mxConstants.STYLE_ALIGN,u,F,C,t)+d(mxConstants.STYLE_SPACING_LEFT,u,F,C,t)+d(mxConstants.STYLE_SPACING_RIGHT,u,F,C,t)+d(mxConstants.STYLE_SPACING_TOP,u,F,C,t)+d(mxConstants.STYLE_SPACING_BOTTOM,u,F,C,t))+d(mxConstants.STYLE_ALIGN+"Global",u,F,C,t)+d(mxConstants.STYLE_SPACING,u,F,C,t)+d(mxConstants.STYLE_VERTICAL_ALIGN,u,F,C,t)+d(mxConstants.STYLE_STROKECOLOR,u,F,C,t)+d(mxConstants.STYLE_OPACITY,u,F,C,t)+d(mxConstants.STYLE_ROUNDED,u,F,C,t)+d(mxConstants.STYLE_ROTATION,
u,F,C,t)+d(mxConstants.STYLE_FLIPH,u,F,C,t)+d(mxConstants.STYLE_FLIPV,u,F,C,t)+d(mxConstants.STYLE_SHADOW,u,F,C,t)+d(mxConstants.STYLE_FILLCOLOR,u,F,C,t)+d(mxConstants.STYLE_DASHED,u,F,C,t)+d(mxConstants.STYLE_STROKEWIDTH,u,F,C,t)+d(mxConstants.STYLE_IMAGE,u,F,C,t)+d(mxConstants.STYLE_POINTER_EVENTS,u,F,C,t);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");q&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(u,F,C,t,e){if(!Xc(F,u))switch(u){case mxConstants.STYLE_FONTSIZE:return f(C);
case mxConstants.STYLE_FONTFAMILY:return k(C);case mxConstants.STYLE_FONTCOLOR:return p(C);case mxConstants.STYLE_FONTSTYLE:return x(C);case mxConstants.STYLE_ALIGN:return E(C);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,C.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(C);case mxConstants.STYLE_SPACING_RIGHT:return J(C);case mxConstants.STYLE_SPACING_TOP:return O(C);case mxConstants.STYLE_SPACING_BOTTOM:return M(C);case mxConstants.STYLE_SPACING:return L(C);
case mxConstants.STYLE_VERTICAL_ALIGN:return H(C);case mxConstants.STYLE_STROKECOLOR:return K(C,t);case mxConstants.STYLE_OPACITY:return R(C,t,e);case mxConstants.STYLE_ROUNDED:return u=!e.edge&&!e.style.includes("rounded")&&null!=C.Rounding&&0<C.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+A(.75*C.Rounding)+";":"",u;case mxConstants.STYLE_ROTATION:return ha(C,t,e);case mxConstants.STYLE_FLIPH:return u=C.FlipX?"flipH=1;":"",u;case mxConstants.STYLE_FLIPV:return u=C.FlipY?"flipV=1;":"",u;case mxConstants.STYLE_SHADOW:return X(C);
case mxConstants.STYLE_FILLCOLOR:return ca(C,t);case mxConstants.STYLE_DASHED:return qa(C);case mxConstants.STYLE_STROKEWIDTH:return sa(C);case mxConstants.STYLE_IMAGE:return Fa(C,t);case mxConstants.STYLE_POINTER_EVENTS:return C.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("s"==C.n&&C.v)return"fontSize="+A(.75*C.v)+";";F++}return"fontSize=13;"}function k(u){var F=b(u);if(null!=F)for(var C=
0;C<F.length;C++)if("f"==F[C].n&&F[C].v){var t=F[C].v;break}!t&&u.Font&&(t=u.Font);y(t);return lb}function n(u){return"ext"==u.tp?u.url:"ml"==u.tp?"mailto:"+u.eml:"pg"==u.tp?"data:page/id,"+(LucidImporter.pageIdsMap[u.id]||0):"c"==u.tp?"data:confluence/id,"+u.ccid:null}function p(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("c"==C.n&&null!=C.v)return u=T(C.v).substring(0,7),"#000000"==u&&(u="default"),mxConstants.STYLE_FONTCOLOR+"="+u+";";F++}return""}function x(u){return z(b(u))}function z(u){if(null!=
u){var F=0,C=!1;if(null!=u)for(var t=0;!C&&t<u.length;){var e=u[t];"b"==e.n?null!=e.v&&e.v&&(C=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(C=!0,F+=1);t++}C=!1;if(null!=u)for(t=0;!C&&t<u.length;)e=u[t],"i"==e.n&&null!=e.v&&e.v&&(C=!0,F+=2),t++;C=!1;if(null!=u)for(t=0;!C&&t<u.length;)e=u[t],"u"==e.n&&null!=e.v&&e.v&&(C=!0,F+=4),t++;if(0<F)return"fontStyle="+F+";"}return""}function E(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("a"==C.n&&null!=C.v)return"align="+C.v+";";F++}return""}function I(u){u=
b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if(null!=C.v&&"il"==C.n)return"spacingLeft="+A(.75*C.v)+";";F++}return""}function J(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("ir"==C.n&&null!=C.v)return"spacingRight="+A(.75*C.v)+";";F++}return""}function O(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("mt"==C.n&&null!=C.v)return"spacingTop="+A(.75*C.v)+";";F++}return""}function M(u){u=b(u);if(null!=u)for(var F=0;F<u.length;){var C=u[F];if("mb"==C.n&&null!=C.v)return"spacingBottom="+
A(.75*C.v)+";";F++}return""}function L(u){return"number"===typeof u.InsetMargin?"spacing="+Math.max(0,A(.75*u.InsetMargin))+";":""}function H(u){return null!=u.Text_VAlign&&"string"===typeof u.Text_VAlign?"verticalAlign="+u.Text_VAlign+";":null!=u.Title_VAlign&&"string"===typeof u.Title_VAlign?"verticalAlign="+u.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,u.TextVAlign,"middle")}function K(u,F){return 0==u.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,V(u.LineColor),
"#000000")}function P(u){return null!=u?mxConstants.STYLE_FILLCOLOR+"="+V(u)+";":""}function Q(u){return null!=u?"swimlaneFillColor="+V(u)+";":""}function R(u,F,C){F="";if("string"===typeof u.LineColor&&(u.LineColor=T(u.LineColor),7<u.LineColor.length)){var t="0x"+u.LineColor.substring(u.LineColor.length-2,u.LineColor.length);C.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(t)/2.55)+";")}"string"===typeof u.FillColor&&(u.FillColor=T(u.FillColor),7<u.FillColor.length&&(u=
"0x"+u.FillColor.substring(u.FillColor.length-2,u.FillColor.length),C.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(u)/2.55)+";")));return F}function ha(u,F,C){var t="";if(null!=u.Rotation){u=mxUtils.toDegree(parseFloat(u.Rotation));var e=!0;0!=u&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==u||270==u)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(u+=90,C.geometry.rotate90(),C.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
F.Class)?(u-=90,C.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(u+=180);0!=u&&(t+="rotation="+u+";");e||(t+="horizontal=0;")}return t}function X(u){return null!=u.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function T(u){if(u){if("object"===typeof u)try{u=u.cs[0].c}catch(F){console.log(F),u="#ffffff"}"rgb"==u.substring(0,3)?u="#"+u.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=u.charAt(0)&&(u="#"+u)}return u}function V(u){return(u=T(u))?
u.substring(0,7):null}function oa(u,F){return(u=T(u))&&7<u.length?F+"="+Math.round(parseInt("0x"+u.substr(7))/2.55)+";":""}function ca(u,F){if(null!=u.FillColor)if("object"===typeof u.FillColor){if(null!=u.FillColor.cs&&1<u.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,V(u.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,V(u.FillColor.cs[1].c))}else return"string"===typeof u.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,V(u.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
"dashed32"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=u.StrokeStyle&&"dashed"==u.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(u){return null!=u.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,A(.75*parseFloat(u.LineWidth)),"1"):""}function Fa(u,F,C){var t="";u.FillColor&&u.FillColor.url?(C=u.FillColor.url,"fill"==u.FillColor.pos&&(t="imageAspect=0;")):"ImageSearchBlock2"==F.Class?C=u.URL:"UserImage2Block"==
F.Class&&null!=u.ImageFillProps&&null!=u.ImageFillProps.url&&(C=u.ImageFillProps.url);return null!=C?"image="+h(C)+";"+t:""}function ka(u,F,C){null!=F.Link&&0<F.Link.length&&C.setAttributeForCell(u,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&C.setAttributeForCell(u,"Notes",F.NoteHint.t);var t=[],e=C.convertValueToString(u),N=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var q=match[0];N=!0;if(2<q.length){var Z=q.substring(2,q.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":
match.index+q.length}}N&&(t.push(e.substring(r)),C.setAttributeForCell(u,"label",t.join("")),C.setAttributeForCell(u,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var U=F[aa],wa=mxUtils.trim(U.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(u,wa,U.Value,C)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(u,F,C,t){for(var e=F,N=0;null!=t.getAttributeForCell(u,e);)N++,e=F+"_"+N;t.setAttributeForCell(u,
e,null!=C?C:"")}function yb(u,F,C,t,e,N){var r=g(F);if(null!=r){var q=Od[r.Class];null!=q?(u.style+=q,";"!=u.style.charAt(u.style.length-1)&&(u.style+=";")):u.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);q=null!=r.Properties?r.Properties:r;if(null!=q&&(u.value=N?"":m(q),u.style+=c(u.style,q,r,u,G,!0),u.style.includes("strokeColor")||(u.style+=K(q,r)),ka(u,q,C),q.Title&&q.Title.t&&q.Text&&q.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(C=u.geometry,C=new mxCell(m(q.Title),
new mxGeometry(0,C.height,C.width,10),"strokeColor=none;fillColor=none;"),C.vertex=!0,u.insert(C),C.style+=a(q.Title,G)),u.edge)){u.style=null!=q.Rounding&&"diagonal"!=q.Shape?u.style+("rounded=1;arcSize="+q.Rounding+";"):u.style+"rounded=0;";if(C="curve"==q.Shape)u.style+="curved=1;";else if("diagonal"!=q.Shape)if(null!=q.ElbowPoints&&0<q.ElbowPoints.length)for(u.geometry.points=[],r=0;r<q.ElbowPoints.length;r++)u.geometry.points.push(new mxPoint(Math.round(.75*q.ElbowPoints[r].x+wc),Math.round(.75*
q.ElbowPoints[r].y+xc)));else if("elbow"==q.Shape||null!=q.Endpoint1.Block&&null!=q.Endpoint2.Block)u.style+="edgeStyle=orthogonalEdgeStyle;";if(q.LineJumps||LucidImporter.globalProps.LineJumps)u.style+="jumpStyle=arc;";null!=q.Endpoint1.Style&&(N=Ee[q.Endpoint1.Style],null!=N?(N=N.replace(/xyz/g,"start"),u.style+="startArrow="+N+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint1.Style)));null!=q.Endpoint2.Style&&(N=Ee[q.Endpoint2.Style],null!=
N?(N=N.replace(/xyz/g,"end"),u.style+="endArrow="+N+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint2.Style)));N=null!=q.ElbowControlPoints&&0<q.ElbowControlPoints.length?q.ElbowControlPoints:q.Joints;if(C&&null!=q.BezierJoints&&0<q.BezierJoints.length){N=[];C=q.BezierJoints[q.BezierJoints.length-1];C.p.x=q.Endpoint2.x;C.p.y=q.Endpoint2.y;for(r=0;r<q.BezierJoints.length;r++)C=q.BezierJoints[r],N.push({x:C.p.x+C.nt.x*C.lcps*.75,y:C.p.y+C.nt.y*
C.lcps*.75}),N.push({x:C.p.x+C.nt.x*C.rcps*.75,y:C.p.y+C.nt.y*C.rcps*.75});N=N.slice(1,N.length-1)}else C&&(N=[],N.push({x:q.Endpoint1.x+(.1>q.Endpoint1.LinkX?-250:.9<q.Endpoint1.LinkX?250:0),y:q.Endpoint1.y+(.1>q.Endpoint1.LinkY?-250:.9<q.Endpoint1.LinkY?250:0)}),N.push({x:q.Endpoint2.x+(.1>q.Endpoint2.LinkX?-250:.9<q.Endpoint2.LinkX?250:0),y:q.Endpoint2.y+(.1>q.Endpoint2.LinkY?-250:.9<q.Endpoint2.LinkY?250:0)}));if(null!=N)for(u.geometry.points=[],r=0;r<N.length;r++)C=N[r].p?N[r].p:N[r],u.geometry.points.push(new mxPoint(Math.round(.75*
C.x+wc),Math.round(.75*C.y+xc)));C=!1;if((null==u.geometry.points||0==u.geometry.points.length)&&null!=q.Endpoint1.Block&&q.Endpoint1.Block==q.Endpoint2.Block&&null!=t&&null!=e){C=new mxPoint(Math.round(t.geometry.x+t.geometry.width*q.Endpoint1.LinkX),Math.round(t.geometry.y+t.geometry.height*q.Endpoint1.LinkY));N=new mxPoint(Math.round(e.geometry.x+e.geometry.width*q.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*q.Endpoint2.LinkY));wc=C.x==N.x?Math.abs(C.x-t.geometry.x)<t.geometry.width/
2?-20:20:0;xc=C.y==N.y?Math.abs(C.y-t.geometry.y)<t.geometry.height/2?-20:20:0;var Z=new mxPoint(C.x+wc,C.y+xc),aa=new mxPoint(N.x+wc,N.y+xc);Z.generated=!0;aa.generated=!0;u.geometry.points=[Z,aa];C=C.x==N.x}null!=t&&t.geometry.isRotated||(Z=Fe(u,q.Endpoint1,!0,C,null,t));null!=t&&null!=Z&&(null==t.stylePoints&&(t.stylePoints=[]),t.stylePoints.push(Z),LucidImporter.stylePointsSet.add(t));null!=e&&e.geometry.isRotated||(aa=Fe(u,q.Endpoint2,!1,C,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=
[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(u.style+=";lucidId="+F.id+";");u.lucidchartObject=F}function vb(u,F){var C=g(u).Properties,t=C.BoundingBox;null==u.Class||"AWS"!==u.Class.substring(0,3)&&"Amazon"!==u.Class.substring(0,6)||u.Class.includes("AWS19")||(t.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*t.x+wc),Math.round(.75*t.y+xc),Math.round(.75*t.w),Math.round(.75*t.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;yb(v,u,F);
v.zOrder=C.ZOrder;Ge(v,C);C.Hidden&&(v.visible=!1);return v}function yf(u,F,C,t){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;yb(e,u,F,C,t,!0);var N=g(u).Properties,r=null!=N?N.TextAreas:u.TextAreas;if(null!=r){for(var q=0;void 0!==r["t"+q];){var Z=r["t"+q];null!=Z&&(e=Pd(Z,e,u,C,t,F));q++}for(q=0;void 0!==r["m"+q]||1>q;)Z=r["m"+q],null!=Z&&(e=Pd(Z,e,u,C,t,F)),q++;null!=r.Text&&(e=Pd(r.Text,e,u,C,t,F));r=null!=N?N.TextAreas:u.TextAreas;null!=
r.Message&&(e=Pd(r.Message,e,u,C,t,F))}u.Hidden&&(e.visible=!1);return e}function Pd(u,F,C,t,e,N){var r=2*(parseFloat(u.Location)-.5);isNaN(r)&&null!=u.Text&&null!=u.Text.Location&&(r=2*(parseFloat(u.Text.Location)-.5));N=m(u);var q=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=C;if(G)aa=lb;else{var U="13",wa="";if(null!=u&&null!=u.Value&&null!=u.Value.m){wa=z(u.Value.m);for(var ja=0;ja<u.Value.m.length;ja++)if("s"==u.Value.m[ja].n&&u.Value.m[ja].v)U=A(.75*parseFloat(u.Value.m[ja].v));
else if("c"==u.Value.m[ja].n){var na=T(u.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="+U+";"}q=new q(N,r,Z+aa);q.geometry.relative=!0;q.vertex=!0;if(u.Side)try{C.Action&&C.Action.Properties&&(C=C.Action.Properties);if(null!=t&&null!=e){var ra=t.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*C.Endpoint1.LinkX-(Aa.x+Aa.width*C.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*C.Endpoint1.LinkY-(Aa.y+Aa.height*
C.Endpoint2.LinkY))}else ma=Math.abs(C.Endpoint1.x-C.Endpoint2.x),Ba=Math.abs(C.Endpoint1.y-C.Endpoint2.y);var Pa=mxUtils.getSizeForString(N.replace(/\n/g,"<br>"));q.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(C.Endpoint1.y-C.Endpoint2.y)*u.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(C.Endpoint2.x-C.Endpoint1.x)*u.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}q.lucidchartObject=u;F.insert(q);return F}function Zb(u,F,C,t){null!=F&&null!=t&&(F=t(F));return null!=F&&F!=C?u+"="+F+";":
""}function Fe(u,F,C,t,e,N){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!=N&&N.style&&-1<N.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=N&&N.style&&-1<N.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),u.style+=(t?"":(C?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(C?"exitY":"entryY")+"="+F.LinkY+";")+(C?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(u,F,C,t,e){try{var N=function(ma,
Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)N(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,q=Math.min(q,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),U=Math.max(U,(ma.y+(ma.height?ma.height:0))*Ba)};null!=u.Action&&null!=u.Action.Properties&&(u=u.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=u.ZOrder;var q=Infinity,Z=Infinity,aa=-Infinity,U=-Infinity,wa=u.Members;e=[];for(var ja in wa){var na=
F[ja];null!=na?e.push(na):null!=t[ja]&&(e.push(t[ja]),C[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(C=F=0;C<e.length;C++)if(na=e[C],na.vertex)N(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;N(ra.Endpoint1,!0);N(ra.Endpoint2,!0);N(ra.ElbowPoints,!0);N(ra.ElbowControlPoints,!0);N(ra.BezierJoints,!0);N(ra.Joints,!0)}r.geometry.x=q;r.geometry.y=Z;
r.geometry.width=aa-q;r.geometry.height=U-Z;if(null!=r.children)for(C=0;C<r.children.length;C++){var Aa=r.children[C].geometry;Aa.x-=q;Aa.y-=Z}u.IsState?(r.lucidLayerInfo={name:u.Name,visible:!u.Hidden,locked:u.Restrictions.b&&u.Restrictions.p&&u.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):u.Hidden&&(r.visible=!1);r.lucidchartObject=u;return r}catch(ma){console.log(ma)}}function zf(u,F,C){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;u.getModel().beginUpdate();
try{var t=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?N[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?N[ua.Endpoint2.Block]:null,l=yf(Ca,u,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(u.addCell(l,Ca,null,Ka,La))},e=[],N={},r={},q={},Z=[];null!=F.Lines&&(q=F.Lines);if(null!=
F.Blocks){Object.assign(q,F.Blocks);for(var aa in F.Blocks){var U=F.Blocks[aa];U.id=aa;var wa=!1;null!=Od[U.Class]&&"mxCompositeShape"==Od[U.Class]&&(N[U.id]=Ie(U,e,u),Z.push(U),wa=!0);wa||(N[U.id]=vb(U,u),Z.push(U))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,u,N)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)U=F.Objects[ja],q[U.id]=U,null!=U.Action&&"mxCompositeShape"==
Od[U.Action.Class]?N[U.id]=Ie(U,e,u):U.IsBlock&&null!=U.Action&&null!=U.Action.Properties?N[U.id]=vb(U,u):U.IsGenerator&&U.GeneratorData&&U.GeneratorData.p&&("OrgChart2018"==U.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(U.GeneratorData.id,U.GeneratorData.p,U.GeneratorData.gs,u,N)):LucidImporter.hasUnknownShapes=!0),Z.push(U);for(ja=0;ja<F.Objects.length;ja++)if(U=F.Objects[ja],U.IsGroup){var na=He(U,N,r,q,u);na&&(N[U.id]=na,Z.push(U))}}if(null!=F.Groups)try{for(aa in F.Groups)if(U=
F.Groups[aa],U.id=aa,na=He(U,N,r,q,u))N[U.id]=na,Z.push(U)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)U=F.Lines[aa],U.id=aa,Z.push(U);Z.sort(function(Ca,ua){Ca=g(Ca);ua=g(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++){U=Z[ja];var ra=N[U.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;u.addCell(Aa,u.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
Pa),Cf(u,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),u),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}C||u.setSelectionCells(e)}finally{u.getModel().endUpdate()}}function Cf(u,F){if(u.model.contains(F)&&F.edge){var C=u.view.getState(F);if(null!=C&&null!=F.children){var t=mxRectangle.fromRectangle(C.paintBounds);t.grow(5);for(var e=0;e<F.children.length;e++){var N=u.view.getState(F.children[e]);
null==N||mxUtils.contains(t,N.paintBounds.x,N.paintBounds.y)||(N.cell.geometry.offset=new mxPoint(0,0))}}u=F.lucidchartObject;null!=u&&"elbow"==u.Shape&&null==u.ElbowControlPoints&&null==u.ElbowPoints&&null!=C.style.exitX&&null!=C.style.exitY&&null!=C.style.entryX&&null!=C.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*C.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*C.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*C.style.entryX)/
20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*C.style.entryY)/20))}}function Bf(u,F){if(u.model.contains(F)&&null!=F.style&&""!=F.style){u=F.style.split(";");for(var C={},t=[],e=u.length-1;0<=e;e--){var N=u[e].split("=");if(2!=N.length||null==C[N[0]])C[N[0]]=N[1],""!=u[e]&&t.push(u[e])}F.style=t.reverse().join(";")+";"}}function Af(u,F){if(u.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var C=null,t=0;t<F.children.length;t++)if(F.children[t].vertex){var e=
F.children[t].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=C)return;C=F.children[t]}}F=C;if(null!=F&&(C=F.parent,""==u.convertValueToString(C))){if(null!=F.edges)for(t=0;t<F.edges.length;t++)F.edges[t].source==F&&F.edges[t].setTerminal(F.parent,!0),F.edges[t].target==F&&F.edges[t].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),t=0;t<e.length;t++)C.insert(e[t]);u.cellLabelChanged(C,u.convertValueToString(F));
C.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var u=new Graph;u.setExtendParents(!1);u.setExtendParentsOnAdd(!1);u.setConstrainChildren(!1);u.setHtmlLabels(!0);u.getModel().maintainEdgeParent=!1;return u}function Qd(u,F,C,t,e,N,r,q){this.nurbsValues=[1,3,0,0,100*(u+C),100-100*(1-(F+t)),0,1,100*(e+r),100-100*(1-(N+q)),0,1]}function Ke(u,F){try{for(var C=[],t=F.BoundingBox.w,e=F.BoundingBox.h,N=0;N<F.Shapes.length;N++){var r=
F.Shapes[N],q=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,U=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=U[Aa.p1].x,Ba=U[Aa.p1].y;ma=100*ma/t;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=U[Aa.p2].x,Ca=U[Aa.p2].y,ua=t,Na=e,Ka=new Qd(U[Aa.p1].x/t,U[Aa.p1].y/e,Aa.n1.x/t,Aa.n1.y/e,U[Aa.p2].x/t,U[Aa.p2].y/
Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=U[Aa.p2].x,Ba=U[Aa.p2].y,ma=100*ma/t,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>");C.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:q,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[u]={text:F.Text,w:t,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
stencils:C}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(u,F,C,t,e,N,r,q){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;r.insert(u);N=[u];C=C.clone();q.insertEdge(C,!1);u.insertEdge(C,!0);N.push(C);t.push(e.addCell(C,null,null,null,null))}function fb(u,F,C,t,e,N,r,q,Z){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;Z.insert(u);C=new mxCell("",new mxGeometry(C,t,0,0),"strokeColor=none;fillColor=none;");
C.vertex=!0;Z.insert(C);q=[C];e=e.clone();u.insertEdge(e,!0);C.insertEdge(e,!1);q.push(e);N.push(r.addCell(e,null,null,null,null))}function Sa(u,F,C,t,e,N){t.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";t.style+=c(t.style,e,N,t);F=m(e);t.vertex=!0;u=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+u+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
u.style+=c(u.style,e,N,u,G);u.geometry.relative=!0;u.geometry.offset=new mxPoint(5,-12);u.vertex=!0;t.insert(u)}function Wa(u,F,C,t,e,N,r,q){e="transparent"!=u?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";N.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";N.style+=c(N.style,r,q,N);N.value=m(r);N.vertex=!0;u=new mxCell(null,new mxGeometry(.5,0,.7*t*F,.7*t*C),e+u+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
u.geometry.relative=!0;u.geometry.offset=new mxPoint(-F*t*.35,10+(1-C)*t*.35);u.vertex=!0;u.style+=c(u.style,r,q,u,G);N.insert(u)}function Xc(u,F){return null!=u&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),u.includes(";"+F+"=")||u.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(u,F){function C(t){t=Math.round(parseInt("0x"+t)*F).toString(16);return 1==t.length?"0"+t:t}return"#"+C(u.substr(1,2))+C(u.substr(3,2))+C(u.substr(5,2))}function Ie(u,F,C){var t=g(u),e=t.Properties,
N=e.BoundingBox,r=Math.round(.75*N.w),q=Math.round(.75*N.h),Z=Math.round(.75*N.x+wc),aa=Math.round(.75*N.y+xc);null==u.Class||"GCPInputDatabase"!==u.Class&&"GCPInputRecord"!==u.Class&&"GCPInputPayment"!==u.Class&&"GCPInputGateway"!==u.Class&&"GCPInputLocalCompute"!==u.Class&&"GCPInputBeacon"!==u.Class&&"GCPInputStorage"!==u.Class&&"GCPInputList"!==u.Class&&"GCPInputStream"!==u.Class&&"GCPInputMobileDevices"!==u.Class&&"GCPInputCircuitBoard"!==u.Class&&"GCPInputLive"!==u.Class&&"GCPInputUsers"!==u.Class&&
new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=c(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=c(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"");v.style+=c(v.style,e,t,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+p(e[ma])+k(e[ma])+x(e[ma])+E(e[ma],v)+I(e[ma])+J(e[ma])+O(e[ma])+M(e[ma]))+L(e[ma])+H(e[ma]));for(var ya=0,za=[],Qb="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;":""),ea=e.Rotation=0;ea<Ka;ea++){if(null==Ba){var xb=parseFloat(e.Lanes[ea].p);
l=parseInt(e.Lanes[ea].tid)||ea;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[ea]/r,l=ea,Va=Ba[ea];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,q-vc,r*xb):new mxGeometry(rc,vc,r*xb,q-vc),Qb));za[ea].vertex=!0;v.insert(za[ea]);za[ea].value=m(e[Va]);za[ea].style+=c(za[ea].style,e,t,za[ea],G)+(G?"fontSize=13;":f(e[Va])+p(e[Va])+x(e[Va])+E(e[Va],za[ea])+I(e[Va])+J(e[Va])+O(e[Va])+M(e[Va]))+L(e[Va])+H(e[Va])+P(e[Pa+l])+Q(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
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(ea=0;ea<Gb;ea++){if(null==Lb){var Sd=.75*parseInt(e.Rows[ea].height);l=parseInt(e.Rows[ea].id)||ea;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[ea],Sb=Lb[ea];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+=c(Hc.style,e,t,Hc,G)+(G?"fontSize=13;":f(e[Sb])+p(e[Sb])+x(e[Sb])+E(e[Sb],
Hc)+I(e[Sb])+J(e[Sb])+O(e[Sb])+M(e[Sb]))+L(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(ea=Z=0;ea<Rb;ea++){if(null==$b){var Yc=.75*parseInt(e.Columns[ea].width);l=parseInt(e.Columns[ea].id)||ea;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[ea],Tb=$b[ea];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,q),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=c(Ic.style,e,t,Ic,G)+(G?"fontSize=13;":
f(e[Tb])+p(e[Tb])+x(e[Tb])+E(e[Tb],Ic)+I(e[Tb])+J(e[Tb])+O(e[Tb])+M(e[Tb]))+L(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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");var zb=
new mxCell("",new mxGeometry(0,25,r,q-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=c(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb)}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+=c(v.style,e,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,he,r,q-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
zb.value=m(e.Text,!0);zb.style+=c(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ha(e,t,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*q),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
!0,v.insert($c))}v.style+=c(v.style,e,t,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,q-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");
ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,e,t,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");ib.vertex=
hd.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,e,t,v);break;case "AndroidListItems":var Cb=q,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Cb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Cb/=bc);var W=[];Qa=[];for(l=0;l<bc;l++)W[l]=new mxCell("",
new mxGeometry(0,zc+l*Cb,r,Cb),"strokeColor=none;fillColor=none;"),W[l].vertex=!0,v.insert(W[l]),W[l].value=m(e["Item_"+l]),W[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Cb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,e,t,v);
new mxCell("",new mxGeometry(e.Selected*Hb+2,q-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,e,t,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,
0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,e,t,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=c(v.style,e,
t,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=c(v.style,e,t,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";
new mxGeometry(20,5,2,q-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,e,t,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,e,t,v);
break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,q-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,e,t,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*
r,.15*q,.7*r,.7*q),"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+=c(v.style,e,t,v);break;case "AndroidCheckBox":var ie=
null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-q,r,.8*q),"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+=c(v.style,e,t,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+=c(v.style,e,t,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,e,t,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),
"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,t):Ta[l].style+"fillColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=c(v.style,e,t,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),
Math.round(.5*q)),"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*q)),"strokeColor=none;"+ca(e,t));zd.vertex=!0;v.insert(zd);v.style+=c(v.style,e,t,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,e,t,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,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=c(v.style,e,t,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*q,.4*q,.4*q),"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+=c(v.style,e,t,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*
r,.2*q,.3*q,.5*q),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=c(v.style,e,t,v);0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),"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])+p(e["Tab_"+l])+x(e["Tab_"+l])+E(e["Tab_"+l])+I(e["Tab_"+l])+J(e["Tab_"+l])+O(e["Tab_"+l])+M(e["Tab_"+l])+L(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*q),"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,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*q),"strokeColor=none;fillColor=none;");
.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",
"strokeColor=none;";v.style+=c(v.style,e,t,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+p(e.text)+x(e.text))+H(e.text);v.style+=c(v.style,e,t,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=
!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=c(v.style,e,t,v,G);
var cb=new mxCell("",new mxGeometry(0,.4*q,r,.6*q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=
new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+p(e.subtext)+x(e.subtext);v.style+=c(v.style,e,t,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=
Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=
c(v.style,e,t,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+p(e.subtext)+x(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+
lb:f(e.text)+k(e.text)+p(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
Da=new mxCell("",new mxGeometry(0,0,r,.4*q),"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)+p(e.text)+x(e.text);Db=new mxCell("",new mxGeometry(0,.6*q,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Db.vertex=!0;v.insert(Db);Db.value=m(e["bottom-text"]);Db.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+p(e["bottom-text"])+x(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)+p(e.text)+x(e.text);v.style+=c(v.style,e,t,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var w=new mxCell("",new mxGeometry(0,0,.9*r,.9*q),"rounded=1;arcSize=3;part=1;");w.vertex=!0;v.insert(w);w.style+=K(e,t)+ca(e,t)+R(e,t,w)+X(e)+sa(e);var D=new mxCell("",new mxGeometry(.1*r,.1*q,.9*r,.9*
q),"rounded=1;arcSize=3;part=1;");D.vertex=!0;v.insert(D);D.value=m(e.Text);D.style+=K(e,t)+ca(e,t)+R(e,t,D)+X(e)+sa(e)+a(e,G);e.Future&&(w.style+="dashed=1;fixDash=1;",D.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+=K(e,t)+ca(e,t)+R(e,t,v)+X(e)+sa(e)+a(e,G);v.style+=c(v.style,e,t,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":w=
!0;v.insert(w);w.value=m(e.Text);w.style+=a(e,G);v.style+=c(v.style,e,t,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(0,.1*q,.9*r,.9*q),"part=1;");D.vertex=!0;v.insert(D);D.value=m(e.Text);D.style+=a(e.Text,G);D.style+=c(D.style,e,t,D,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*q,q),"shape=curlyBracket;rounded=1;");
Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*q,0,.25*q,q),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*q,0,r-.5*q,q),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);Bc.style+=R(e,t,Bc);Cc.style+=R(e,t,Cc);na.style+=p(e,na);Bc.style+=c(Bc.style,e,t,Bc);Cc.style+=c(Cc.style,e,t,Cc);na.style+=c(na.style,e,t,na,G);break;case "UMLTextBlock":v.value=
m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=c(v.style,e,t,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ha(e,t,v);e.Rotatio=null;var Vb=c(v.style,e,t,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,q),"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;"+c(v.style,e,t,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=ha(e,t,v);e.Rotatio=null;Vb=c(v.style,e,t,v,
w.geometry.offset=new mxPoint(4,5);break;case 7:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),w.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,t);Y=K(e,t);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");w.style+=Rc+Y+"part=1;"}else w.style+=ca(e,t)+K(e,t)+"part=1;";w.geometry.relative=!0;w.vertex=!0;v.insert(w)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
0!=e.bpmnActivityMarker2&&Bd++;var Eb=0;1==Bd?Eb=-7.5:2==Bd&&(Eb=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);Y=K(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",
new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+K(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}2==Bd&&(Eb=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,
-20);w.style+=ca(e,t)+K(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+K(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);
Y=K(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+K(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}v.style+=c(v.style,e,t,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+=
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+=c(v.style,e,t,v,G);break;case "BPMNChoreography":try{var ia=V(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+=c(v.style,e,t,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+=c(Dc.style,e,t,Dc,G);Wb+=pc;W=[];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);W[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;W[l].vertex=!0;v.insert(W[l]);W[l].style+=a(Ud,G);W[l].style+=c(W[l].style,e,t,W[l],G);
W[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&&(w=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),w.geometry.offset=new mxPoint(-6,-17),w.style+=ca(e,t)+K(e,t),w.geometry.relative=!0,w.vertex=!0,v.insert(w));v.style+=c(v.style,e,t,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+=c(v.style,e,t,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:w=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(-6,-15);w.style+=ca(e,t)+K(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);break;case 2:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");w.geometry.offset=new mxPoint(3,
3);w.style+=ca(e,t)+K(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);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:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),w.geometry.offset=new mxPoint(3,3),w.style+=K(e,t),w.geometry.relative=
!0,w.vertex=!0,v.insert(w),Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),w.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+=c(v.style,e,t,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,q),"fillColor=#000000;strokeColor=none;opacity=30;");
w.vertex=!0;v.insert(w);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,.95*r,.95*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.05*r,.05*q,.95*r,.95*q),"part=1;");D.vertex=!0;v.insert(D);D.value=m(e.Text);D.style+=a(e.Text,G);D.style+=c(D.style,e,t,D,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);
v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,.2*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Number);w.style+=a(e.Number,G);w.style+=c(w.style,e,t,w,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="+h(e.Photo)}v.value=Te;v.style+=c(v.style,e,t,v,!0);break;case "DefaultTableBlock":try{Gb=
"fillOpacity")||If;r=Cd[ea];var cf=q;Yc=r;for(var Nb=l+1;Nb<l+Xd.h;Nb++)if(null!=Vd[Nb]){cf+=Vd[Nb];Dd[Nb+","+ea]=!0;for(var Tc=ea+1;Tc<ea+Xd.w;Tc++)Dd[Nb+","+Tc]=!0}for(Nb=ea+1;Nb<ea+Xd.w;Nb++)if(null!=Cd[Nb])for(Yc+=Cd[Nb],Dd[l+","+Nb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Nb]=!0;var pa=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,V($e),
V(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;":""));pa.vertex=!0;pa.value=m(qc);pa.style+=c(pa.style,e,t,pa,G)+(G?"fontSize=13;":f(qc)+p(qc)+x(qc)+E(qc,pa)+I(qc)+J(qc)+O(qc)+M(qc))+L(qc)+H(qc);v.insert(pa);Z+=r}}aa+=q}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
"VSMDedicatedProcessBlock"==u.Class?v.value=m(e.Text):"VSMProductionControlBlock"==u.Class&&(v.value=m(e.Resources));v.style+=c(v.style,e,t,v,G);"VSMDedicatedProcessBlock"==u.Class&&(w=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(4,-13),w.vertex=!0,v.insert(w),w.style+=c(w.style,e,t,w));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+=c(v.style,e,t,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*q,.8*r,.6*q),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=c(Da.style,e,t,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=c("part=1;",e,t,v);0<bc&&(Cb/=bc);W=[];Qa=[];for(l=1;l<=bc;l++)W[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),ia),W[l].vertex=!0,v.insert(W[l]),W[l].value=m(e["cell_"+l]),W[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+=c(v.style,e,t,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=c("part=1;fillColor=none;",e,t,v);0<bc&&(Cb/=bc);W=[];Ub=[];for(l=1;l<=bc;l++)W[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ia),W[l].vertex=!0,v.insert(W[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"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+=c(v.style,e,t,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.17*r,.2*q,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");w.vertex=!0;v.insert(w);
w.style+=c(w.style,e,t,w);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.05*r,.1*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);D.vertex=!0;v.insert(D);D.style+=c(D.style,
e,t,D);var S=new mxCell("",new mxGeometry(0,.2*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);S.vertex=!0;v.insert(S);S.value=m(e.Text);S.style+=c(S.style,e,t,S,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,q),"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;C.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,35,40),
"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.Beanstalk?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),
D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.EC2?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),D.geometry.relative=
!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.Subnet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),D.geometry.relative=!0,D.geometry.offset=
new mxPoint(30,0),D.vertex=!0,v.insert(D)):e.VPC?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,
0),D.vertex=!0,v.insert(D)):e.AWS?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):
e.Corporate?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(30,0),D.vertex=!0,v.insert(D)):
(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+=c(v.style,e,t,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+=c(v.style,e,t,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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");pa.vertex=!0;v.insert(pa);var Oa=[pa];pa.style+=ca(e,t);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,C,Oa,v,pa);sc(.855*r,.145*q,va,F,C,Oa,v,pa);sc(r,.5*q,va,F,C,Oa,v,pa);sc(.855*r,.855*q,va,F,C,Oa,v,pa);sc(.5*r,q,va,F,C,Oa,v,pa);sc(.145*r,.855*q,va,F,C,Oa,v,pa);sc(0,.5*q,va,F,C,Oa,v,pa);sc(.145*r,.145*q,va,F,C,Oa,v,pa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(0,.5*q-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");
pa.vertex=!0;v.insert(pa);Oa=[pa];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=[pa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,C,Oa,v,pa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,q,va,F,C,Oa,v,pa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=c(v.style,e,t,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+=c(v.style,e,t,v,G);"EIMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==
new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==u.Class&&(w=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(-10,-7));w.geometry.relative=!0;w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);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*q,.85*r,.25*q,va,F,C,Oa,v,pa);break;
case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.07*q,.21*r,.86*q),"fillColor=#FFFF33;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.26*r,.09*q,.2*r,.82*q),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");D.vertex=!0;v.insert(D);D.style+=c(D.style,e,t,D);S=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
S.geometry.relative=!0;S.geometry.offset=new mxPoint(.4*-r,-10);S.vertex=!0;v.insert(S);S.style+=c(S.style,e,t,S);da=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;");da.geometry.relative=!0;da.edge=!0;w.insertEdge(da,!0);D.insertEdge(da,!1);da.style+=K(e,t);F.push(C.addCell(da,null,null,null,null));ba=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;");
ba.geometry.relative=!0;ba.edge=!0;D.insertEdge(ba,!0);S.insertEdge(ba,!1);F.push(C.addCell(ba,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+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);var Fd=
e.Messages,oe=(q-17)/Fd;D=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;D[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");D[l].vertex=!0;v.insert(D[l]);switch(u.Class){case "EIMessageBlock":D[l].value=m(e["message_"+(l+1)]);D.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":D[l].value="C";D[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":D[l].value="D";D[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":D[l].value="E",D[l].style+=
"fontStyle=1;fontSize=13;"}D[l].style+=c(D[l].style,e,t,D[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;w.insertEdge(va[l],!1);D[l].insertEdge(va[l],!0);va[l].style+=c(va[l].style,e,t,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(C.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.45*r,.25*q,.3*r,.5*q),"part=1;fillColor=#ffffff");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);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*q,.4*r,.5*q,va,F,C,Oa,v,pa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);var 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(.05*r,.5*q,.85*r,.5*q,da,F,C,Oa,v,pa);var ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.85*
r,.15*q,ba,F,C,Oa,v,pa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*q,.85*r,.85*q,xa,F,C,Oa,v,pa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
da.geometry.relative=!0;da.edge=!0;da.style+=K(e,t);fb(.05*r,.5*q,.95*r,.5*q,da,F,C,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ba.geometry.relative=!0;ba.edge=!0;ba.style+=K(e,t);fb(.3*r,.1*q,.3*r,.5*q,ba,F,C,Oa,v,pa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
xa.geometry.relative=!0;xa.edge=!0;xa.style+=K(e,t);fb(.7*r,.1*q,.7*r,.5*q,xa,F,C,Oa,v,pa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=K(e,t);fb(.5*r,.5*q,.5*r,.9*q,Ya,F,C,Oa,v,pa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,
e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.21*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);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(.45*r,.33*q,.8*r,.33*q,da,F,C,Oa,v,pa);D=new mxCell("",new mxGeometry(.64*r,.55*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");D.vertex=!0;v.insert(D);D.style+=c(D.style,
e,t,D);ba=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;");ba.geometry.relative=!0;ba.edge=!0;fb(.55*r,.67*q,.2*r,.67*q,ba,F,C,Oa,v,pa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.1*r,.15*q,.8*r,.7*q),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");w.vertex=!0;v.insert(w);
w.style+=c(w.style,e,t,w);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.04*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.2*r,.56*q,.2*r,.32*q),"part=1;");D.vertex=!0;v.insert(D);D.value="A";D.style+="fontStyle=1;fontSize=13;";w.style+=c(w.style,e,t,w);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;w.insertEdge(da,!1);D.insertEdge(da,!0);da.style+=c(da.style,e,t,da);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*q));da.geometry.points=Kc;F.push(C.addCell(da,null,null,null,null));S=new mxCell("",new mxGeometry(.6*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");S.vertex=!0;v.insert(S);S.style+=K(e,t)+sa(e);S.style+=c(S.style,e,t,S);ta=new mxCell("",new mxGeometry(.76*
r,.56*q,.2*r,.32*q),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=K(e,t)+R(e,t,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=c(ta.style,e,t,ta);ba=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;");ba.geometry.relative=!0;ba.edge=!0;S.insertEdge(ba,!1);ta.insertEdge(ba,!0);ba.style+=c(ba.style,e,t,ba);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*q));ba.geometry.points=
df;F.push(C.addCell(ba,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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=c(xa.style,e,t,xa);F.push(C.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("1",new mxGeometry(.2*r,.4*q,.1*r,.19*q),
"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("2",new mxGeometry(.45*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");D.vertex=!0;v.insert(D);D.style+=c(D.style,e,t,D);S=new mxCell("3",new mxGeometry(.7*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");S.vertex=!0;v.insert(S);S.style+=c(S.style,e,t,S);da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
w.insertEdge(da,!1);D.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.375*r,aa+.15*q)];da.geometry.relative=!0;da.edge=!0;da.style+=c(da.style,e,t,da);F.push(C.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");D.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.geometry.points=[new mxPoint(Z+.675*r,aa+.15*q)];ba.geometry.relative=!0;ba.edge=!0;ba.style+=c(ba.style,e,t,ba);F.push(C.addCell(ba,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.3*r,.2*q,.4*r,.6*q),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.38*r,.42*q,.24*r,.16*q),"part=1;fillColor=#aefe7d;");
w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*q),"part=1;");D.vertex=!0;v.insert(D);D.style+=c(D.style,e,t,D);S=new mxCell("",new mxGeometry(.76*r,.23*q,.24*r,.16*q),"");S.vertex=!0;v.insert(S);S.style=D.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*q,.24*r,.16*q),"");ta.vertex=!0;v.insert(ta);ta.style=D.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*q,.24*r,.16*q),"");Yd.vertex=!0;v.insert(Yd);Yd.style=D.style;var Zd=new mxCell("",new mxGeometry(0,
.61*q,.24*r,.16*q),"");Zd.vertex=!0;v.insert(Zd);Zd.style=D.style;var $d=new mxCell("",new mxGeometry(0,.23*q,.24*r,.16*q),"");$d.vertex=!0;v.insert($d);$d.style=D.style;da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(da,!1);D.insertEdge(da,!0);da.edge=!0;da.style+=c(da.style,e,t,da);F.push(C.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.edge=!0;ba.style+=c(ba.style,e,t,ba);
F.push(C.addCell(ba,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=c(xa.style,e,t,xa);F.push(C.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=c(Ya.style,e,t,Ya);F.push(C.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Lc,
!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=c(Lc.style,e,t,Lc);F.push(C.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=c(Mc.style,e,t,Mc);F.push(C.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);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*q,.6*r,.25*q,da,F,C,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.6*r,.75*q,ba,F,C,Oa,v,pa);w=new mxCell("",new mxGeometry(.7*r,.1*q,.15*r,.32*q),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"shape=mxgraph.eip.control_bus;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);S=new mxCell("",
new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");S.vertex=!0;v.insert(S);S.style+=c(S.style,e,t,S);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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=c(xa.style,e,t,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(C.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,
q-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+=c(ta.style,e,t,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;w.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=c(Ya.style,e,t,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+q-10)];F.push(C.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(q-75)/Fd;D=[];va=
[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,D[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),D[l].vertex=!0,D[l].value=m(e["message_"+(l+1)]),D.style+=a(e["message_"+(l+1)],G),v.insert(D[l]),D[l].style+=c(D[l].style,e,t,D[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,S.insertEdge(va[l],!1),D[l].insertEdge(va[l],!0),va[l].style+=c(va[l].style,e,t,va[l]),Kc=[],Kc.push(new mxPoint(Z+
r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(C.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,e,t,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=c(v.style,e,t,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+=c(v.style,e,t,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,r,.25*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);D=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)D[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*q,ff,.75*q),"ellipse;part=1;"),
D[l].vertex=!0,v.insert(D[l]),D[l].style+=c(D[l].style,e,t,D[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)w[l]=new mxCell("",new mxGeometry(gf*l,0,gf,q),"part=1;shape=mxgraph.floorplan.sink_2;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=c(w[l].style,e,t,w[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=.1*r/e.StallCount;w=new mxCell("",new mxGeometry(0,
0,Fb,q),"fillColor=#000000;part=1;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);var Ob=(r-Fb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=K(e,t);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=c(re,e,t,v);var se=c("",e,t,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,q),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),q-.92*(Ob-Fb),.9*(Ob-Fb),.92*(Ob-Fb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),
Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.2*(Ob-Fb),0,.6*(Ob-Fb),.8*(Ob-Fb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob,.42*q,.15*(Ob-Fb),.12*(Ob-Fb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=K(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=",
"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=c(Uc,e,t,v);da=new mxCell("",new mxGeometry(0,0,0,0),ae);da.geometry.relative=!0;da.edge=!0;fb(0,.5*q,.65*r,.5*q,da,F,C,Oa,v,pa);var fa=q/e.numLines;ba=[];var Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(.65*r,.5*q,.96*r,(l+.5)*fa,ba[l],F,C,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=
"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=K(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=c(Uc,e,t,v);fa=q/e.numLines;ba=[];Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(0,(l+.5)*fa,.96*r,(l+.5)*fa,ba[l],F,C,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),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+=c(v.style,e,t,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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.2*q,r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
w.vertex=!0;v.insert(w);w.style+=ia;w.style+=c(w.style,e,t,w);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=c(da.style,e,t,da),fb(0,0,0,.2*q,da,F,C,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=c(ba.style,e,t,ba),fb(r,.67*q,r,q,ba,F,C,Oa,v,pa)):(w.style+="flipH=1;",da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=
!0,da.edge=!0,da.style+=ia,da.style+=c(da.style,e,t,da),fb(0,0,0,.33*q,da,F,C,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=c(ba.style,e,t,ba),fb(r,.8*q,r,q,ba,F,C,Oa,v,pa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=c(xa.style,e,t,xa),fb(.2*r,.5*q,.8*r,.5*q,xa,F,C,Oa,v,pa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
v.value=m(e.Text);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.2*q,.6*r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");w.vertex=!0;v.insert(w);w.style+=c(w.style,e,t,w);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(u.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+=c(v.style,e,t,v);"PEIndicator2Block"==u.Class||"PESharedIndicator2Block"==u.Class?(w=new mxCell("",
new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(w=new mxCell("",new mxGeometry(0,0,r,.5*q),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=c(w.style,e,t,w,G),D=new mxCell("",new mxGeometry(0,.5*q,r,.5*q),"part=1;strokeColor=none;fillColor=none;"));
D.vertex=!0;v.insert(D);D.value=m(e.BotText);D.style+=a(e.BotText,G);D.style+=c(D.style,e,t,D,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"==u.Class?1!=e.poweredHandOperated&&(te=!0):1!=
e.handOperated&&(te=!0);if(te){e=g(u).Properties;N=e.BoundingBox;var Sf=N.h;N.h="PEAngleValveBlock"==u.Class||"PEAngleGlobeValveBlock"==u.Class?.7*N.h:.6*N.h;v=new mxCell("",new mxGeometry(Math.round(.75*N.x+wc),Math.round(.75*(N.y+Sf-N.h)+xc),Math.round(.75*N.w),Math.round(.75*N.h)),"");v.vertex=!0;yb(v,u,C)}if("PEPoweredValveBlock"==u.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=c(v.style,e,t,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",
w=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*q),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),w.vertex=!0,v.insert(w),w.value=m(e.PoweredText),w.style+=(G?"":p(e.PoweredText)+x(e.PoweredText)+E(e.PoweredText)+I(e.PoweredText)+J(e.PoweredText)+M(e.PoweredText)+L(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),w.style+=c(w.style,e,t,w,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(u.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+=c(v.style,e,t,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,t,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)+p(e.Title)+x(e.Title));1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=c(v.style,e,t,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=c(w.style,e,t,w,G);D=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");D.geometry.relative=!0;D.geometry.offset=new mxPoint(-25,-10);
D.vertex=!0;w.insert(D);1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(-20,30),S.vertex=!0,v.insert(S),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+=c(v.style,e,t,v);e.Text=null;break;case "UI2AccordionBlock":w=[];fa=25;for(l=0;l<=e.Panels-1;l++)w[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"):
l==e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,q-(e.Panels-e.Selected)*fa+(l-e.Selected)*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Panel_"+(l+1)]),w[l].style+=a(e["Panel_"+(l+1)],G),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=5;");var Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?
new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-20-(e.Panels-e.Selected)*fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,e.Selected*fa),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",D.style+=Ua,D.style+=c(D.style,
e,t,D));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*fa),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=c(S.style,e,t,S));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-
20-(e.Panels-e.Selected)*fa),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"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+=c(v.style,e,t,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];D=[];fa=25;var Ib=3,Ha=(r+Ib)/
(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),""),D[l].vertex=!0,v.insert(D[l])):(w[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=
!0,w[l].insert(D[l])),D[l].value=m(e["Tab_"+(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G),0>D[l].style.indexOf(";align=")&&(D[l].style+="align=left;spacingLeft=2;"),D[l].style+=c(D[l].style,e,t,D[l]);Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,fa),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",D.style+=Ua,D.style+=c(D.style,e,t,D));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=
Ua,S.style+=c(S.style,e,t,S));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];D=[];fa=25;Ib=3;Ha=(r+Ib)/e.Tabs;hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),""),D[l].vertex=!0,v.insert(D[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=
c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l])),D[l].value=m(e["Tab_"+(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G),0>D[l].style.indexOf(";align=")&&(D[l].style+="align=left;spacingLeft=2;");Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,fa),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",D.style+=Ua,D.style+=c(D.style,e,t,D));1==e.hScroll&&(S=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;"),
S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=c(S.style,e,t,S));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];D=[];Ib=3;fa=25+Ib;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,q),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),""),D[l].vertex=!0,v.insert(D[l]),D[l].value=m(e["Tab_"+
(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G)):(w[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha,fa-Ib),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].value=m(e["Tab_"+(l+1)]),D[l].style+=a(e["Tab_"+(l+1)],G)),0>D[l].style.indexOf(";align=")&&(D[l].style+="align=left;spacingLeft=2;"),D[l].style+=c(D[l].style,
e,t,D[l]);Ua=K(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(D=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,0),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;",
D.style+=Ua,D.style+=c(D.style,e,t,D));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=c(S.style,e,t,S));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
fa=q/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,l*fa+.5*fa-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2,
2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=c(D[l].style,e,t,D[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=
a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=c(D[l].style,e,t,D[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";fa=q/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,
l*fa+.5*fa-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=K(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=
c(D[l].style,e,t,D[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];D=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=c(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=K(e,t),
Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),D[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),D[l].vertex=!0,w[l].insert(D[l]),D[l].style+=Y,D[l].style+=c(D[l].style,e,t,D[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"==u.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=c(v.style,e,t,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(0,0,.6*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Date);w.style+=a(e.Date,G);v.style+=c(v.style,e,t,v);Y=K(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");D=new mxCell("",new mxGeometry(.75*r,0,.25*r,q),"part=1;shape=mxgraph.gmdl.calendar;");
D.vertex=!0;v.insert(D);D.style+=Y;D.style+=c(D.style,e,t,D);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+=c(v.style,e,t,v,G);break;case "UI2NumericStepperBlock":Y=K(e,t);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+=c(v.style,e,t,v,G);break;case "UI2TableBlock":try{kb=V(e.FillColor);var Kd=V(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:V(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:V(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
e["Cell_"+l+"_"+ea],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?V(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[ea])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=c(v.style,e,t,v);w=[];D=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),""),D[l].vertex=!0,v.insert(D[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"strokeColor=none;"),
w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l])),D[l].value=m(e["Button_"+(l+1)]),D[l].style+=a(e["Button_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,e,t,v);w=[];D=[];fa=q/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(D[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),""),D[l].vertex=!0,v.insert(D[l])):
(w[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=c(w[l].style,e,t,w[l]),D[l]=new mxCell("",new mxGeometry(0,0,r,fa),"fillColor=#000000;fillOpacity=25;"),D[l].vertex=!0,w[l].insert(D[l])),D[l].value=m(e["Button_"+(l+1)]),D[l].style+=a(e["Button_"+(l+1)],G),D[l].style+=c(D[l].style,e,t,D[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=[];D=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=
l?(D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),D[l].style+=c(D[l].style,e,t,D[l])):D[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),D[l].vertex=!0,v.insert(D[l]),D[l].value=m(e["Link_"+(l+1)]),D[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,e,t,v);w=[];D=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)w[l]=new mxCell("",new mxGeometry(l*
Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Link_"+(l+1)]),w[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)D[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),D[l].geometry.relative=!0,D[l].geometry.offset=new mxPoint(-3,-5),D[l].vertex=!0,v.insert(D[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style,e,t,v);w=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)w[l]=l!=e.Selected-
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+=c(v.style,e,t,v);W=[];nb=[];var jd=[];fa=q/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+p(e["Item_"+(l+1)])+x(e["Item_"+(l+1)])),W[l]=new mxCell("",new mxGeometry(0,l*q/e.Lines,r,fa),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),
W[l].vertex=!0,v.insert(W[l]),W[l].style+=ia,W[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=W[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,W[l].insert(nb[l]),Y=K(e,t),
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)])+p(e["Shortcut_"+(l+1)])+x(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*q/e.Lines,.4*r,fa),"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]&&(W[l]=new mxCell("",new mxGeometry(.05*r,l*q/e.Lines,.9*
r,fa),"shape=line;strokeWidth=1;"),W[l].vertex=!0,v.insert(W[l]),W[l].style+=K(e,t));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+=c(v.style,e,t,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+=c(v.style,e,t,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=c(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=c(w.style,e,t,w,G);D=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");D.geometry.relative=!0;D.geometry.offset=
new mxPoint(-25,-10);D.vertex=!0;w.insert(D);var Uf=45*e.Buttons+(10*e.Buttons-1);S=[];for(l=0;l<e.Buttons;l++)S[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),S[l].geometry.relative=!0,S[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),S[l].vertex=!0,v.insert(S[l]),S[l].value=m(e["Button_"+(l+1)]),S[l].style+=a(e["Button_"+(l+1)],G),S[l].style+=c(S[l].style,e,t,S[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,t);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+=c(v.style,e,t,v,G);W=[];var ue=[],wb=db/q;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])),fa=0,0==e.Attributes?fa=l=1:l<e.Attributes?(fa=e["Text"+(l+1)+"Percent"],wb+=fa):fa=1-wb,pc=Math.round((q-db)*fa)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),W[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,W[l].vertex=!0,v.insert(W[l]),W[l].style+=
ia+R(e,t,W[l])+a(e["Text"+(l+1)],G),W[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+=c(v.style,e,t,v,G);break;case "ERDEntityBlock":ia=ca(e,t);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+=c(v.style,e,t,v,G);e.ShadedHeader?(ia=V(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,t);W=[];wb=db/q;Wb=db;for(l=0;l<e.Fields;l++)fa=0,pc=.75*e["Field"+(l+1)+"_h"],W[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,W[l].vertex=!0,v.insert(W[l]),
W[l].style+=ia+a(e["Field"+(l+1)],G),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;opacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,t);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,t);v.style+=c(v.style,e,t,v,G);W=[];var Ga=[];wb=db;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+R(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),W[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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;"),W[l].vertex=!0,v.insert(W[l]),W[l].style+=
ia+a(e["Field"+(l+1)],G),v.style+=c(v.style,e,t,v),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;fillOpacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=c(v.style,e,t,v,G);W=[];Ga=[];wb=db;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+R(e,t,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=c(Ga[l].style,e,t,Ga[l],G),W[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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;"),
W[l].vertex=!0,v.insert(W[l]),W[l].style+=ia+a(e["Type"+(l+1)],G),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;fillOpacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Type"+(l+1)]),W[l].style+=c(W[l].style,e,t,W[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=c(v.style,e,t,v,G);W=[];Ga=[];var Kb=[];wb=db;Jb=30;var ce=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+R(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=c(Ga[l].style,e,t,Ga[l],G),W[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-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;"),
W[l].vertex=!0,v.insert(W[l]),W[l].style+=ia+a(e["Field"+(l+1)],G),W[l].style=1==e.AltRows&&0!=l%2?W[l].style+"fillColor=#000000;fillOpacity=5;":W[l].style+("fillColor=none;"+R(e,t,W[l])),W[l].value=m(e["Field"+(l+1)]),W[l].style+=c(W[l].style,e,t,W[l],G),Kb[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;"),
Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ia+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+R(e,t,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=c(Kb[l].style,e,t,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,q,v,e,t);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,q,v,e,t);break;case "GCPServiceCardBlankBlock":Sa("blank",
1,.66,r,q,v,e,t);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,q,v,e,t);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,q,v,e,t);break;case "GCPInputRetail":Wa("retail",1,.89,r,q,v,e,t);break;case "GCPInputReport":Wa("report",1,1,r,q,v,e,t);break;case "GCPInputPhone":Wa("phone",.64,1,r,q,v,e,t);break;case "GCPInputBlank":Wa("transparent",1,1,r,q,v,e,t);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=c(v.style,
e,t,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,q)*.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="+h(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==U.indexOf("Bracket")?"size=0;arcSize=50;":"",of=c(v.style,e,t,v,G);mb=ha(e,t,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:q),100),xe=
new mxCell("",new mxGeometry(0,0,we,q),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,q),"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+=c(v.style,e,t,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=
"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,q),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=c(kd.style,e,t,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=ha(e,t,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
e.LineWidth);pa.style+=c(pa.style,ob,t,pa,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;pa.style+=c(pa.style,e,t,pa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;pa.vertex=!0;pa.geometry.relative=!0;v.insert(pa)}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,q),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=
c(ra.style,pf,t,ra,G);ra.style+=c(ra.style,e,t,ra,G);e.Rotation=mb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var eb=Pb.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+=c(ra.style,eb,t,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Pb.w);eb.h&&(Yb.height*=eb.h/Pb.h);eb.x&&(Yb.x=eb.x/Pb.w);eb.y&&(Yb.y=eb.y/Pb.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/q);eb.fx&&(Yb.x=(0<
eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/q)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,q),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*q/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=c(v.style,
e,t,v,G);break;case "DoubleArrowBlock":ze=e.Head*q/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=c(v.style,e,t,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(U){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld=
30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=c(v.style,e,t,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(ea=0;ea<e.Vertices.length;ea++)Qa=e.Vertices[ea],0==ea?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+=c(v.style,e,t,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="+V(od)+";"+oa(od,"fillOpacity");v.style+=c(v.style,e,t,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+V(kb)+";"+oa(kb,"fillOpacity"));ab.style+=c(ab.style,e,t,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="+V(kb)+";"+oa(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=c(v.style,e,t,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="+V(od)+";"+oa(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=c(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
V(od)+";"+oa(od,"fillOpacity"),v.style+=c(v.style,e,t,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,q),"strokeColor=none;fillColor="+V(kb)+";"+oa(kb,"fillOpacity")),ab.style+=c(ab.style,e,t,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+=c(v.style,e,t,v,G);break;case "PersonRoleBlock":try{ia=ca(e,t);db=q/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+=c(v.style,
e,t,v,G);var Ec=new mxCell("",new mxGeometry(0,q/2,r,q/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+=c(Ec.style,e,t,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);ka(v,e,C);e.Hidden&&(v.visible=!1);return v}function Ge(u,F){if(F.Text_TRotation||F.TextRotation)try{var C=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(C)&&0!=C&&u.value){var t=u.geometry.width,e=u.geometry.height,N=t,r=e,q=0,Z=0;if(-90==C||-270==C){N=e;r=t;var aa=(e-t)/2;q=-aa/t;Z=aa/e}C+=mxUtils.toDegree(F.Rotation);var U=u.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&
0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(u.value,new mxGeometry(q,Z,N,r),U+"fillColor=none;strokeColor=none;rotation="+C+";");u.value=null;wa.geometry.relative=!0;wa.vertex=!0;u.insert(wa)}}catch(ja){console.log(ja)}}function Je(u,F,C,t,e){function N(Lb,$b){var Xa="";try{for(var pb=0;pb<Lb.text.length;pb++){var Nc=Lb.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:"+A(.75*Gc)+"px;";break;case "color":Xa+="color:"+T(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+T(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Lb,$b,Xa){Lb=Aa+Lb;ra[Lb]=$b;$b="";for(var pb=0;pb<U.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[U[pb]]||"&nbsp;")+"</div>";pb=
mxUtils.getSizeForString($b);Xa=h(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[Lb]=Xa;t.addCell(Xa,aa)},q=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;t.addCell(aa);var U=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||
{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(u||Date.now())+"_";4==q&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=c("",ja.props,{},aa,!0);0==q?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==q||2==q?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=q&&(Ca=!1);for(u=0;u<U.length;u++)ma.push(N(ja,U[u]));if(C.Items)for(var Na=C.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(u=0;u<U.length;u++)U[u]=Ia.f[U[u]]||U[u]}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(u=0;u<U.length;u++)U[u]=l[Ka].nfs[U[u]]||U[u];var Ea;for(Ea in C){La=C[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&
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(u){return Math.round(100*this.nurbsValues[4*(u+1)])/100};Qd.prototype.getY=function(u){return Math.round(100*this.nurbsValues[4*(u+1)+1])/100};LucidImporter.importState=function(u,F,C){function t(q){null!=q.state&&EditorUi.debug("convertLucidChart addPages",
q);if(q.Properties){for(var Z in q.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),q.Properties[Z]);LucidImporter.globalProps=q.Properties}for(var aa in q.Pages)Z=q.Pages[aa],Z.id=aa,Z.Data=q.Data,e.push(Z);e.sort(function(U,wa){return U.Properties.Order<wa.Properties.Order?-1:U.Properties.Order>wa.Properties.Order?1:0});for(q=0;q<e.length;q++)LucidImporter.pageIdsMap[e[q].id]=q}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=C;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())+'">'];C&&C.transparentEdgeLabels&&(ge=ge.replace("labelBackgroundColor=default;",
"labelBackgroundColor=none;"));var e=[];null!=u.state?t(JSON.parse(u.state)):null==u.Page&&null!=u.Pages?t(u):e.push(u);u=Df();C=new mxCodec;for(var N=0;N<e.length;N++){F.push("<diagram");null!=e[N].Properties&&null!=e[N].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[N].Properties.Title)+'"');F.push(' id="'+N+'"');zf(u,e[N],!0);var r=C.encode(u.getModel());null!=e[N].Properties&&(e[N].Properties.FillColor&&"#ffffff"!=e[N].Properties.FillColor&&r.setAttribute("background",V(e[N].Properties.FillColor)),
e[N].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[N].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[N].Properties.Size.w),r.setAttribute("pageHeight",.75*e[N].Properties.Size.h)),null!=e[N].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[N].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);u.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=
null;return F.join("")}})();function VsdxExport(h){function y(H,K){var P={"[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>",
Q;for(Q in P)if(1<K&&Q==J.CONTENT_TYPES_XML){for(var R=mxUtils.parseXml(P[Q]),ha=R.documentElement,X=ha.children,T=null,V=0;V<X.length;V++){var oa=X[V];"/visio/pages/page1.xml"==oa.getAttribute(J.PART_NAME)&&(T=oa)}for(V=2;V<=K;V++)X=T.cloneNode(),X.setAttribute(J.PART_NAME,"/visio/pages/page"+V+".xml"),ha.appendChild(X);z(H,Q,R,!0)}else H.file(Q,P[Q])}function A(H,K,P){return null!=H.createElementNS?H.createElementNS(K,P):H.createElement(P)}function B(H){var K=M[H];null==K&&(K=L++,M[H]=K);return K}
function m(H){var K={};try{var P=H.getGraphBounds().clone(),Q=H.view.scale,R=H.view.translate,ha=Math.round(P.x/Q)-R.x,X=Math.round(P.y/Q)-R.y,T=H.pageFormat.width,V=H.pageFormat.height;0>ha&&(ha+=Math.ceil((R.x-P.x/Q)/T)*T);0>X&&(X+=Math.ceil((R.y-P.y/Q)/V)*V);var oa=Math.max(1,Math.ceil((P.width/Q+ha)/T)),ca=Math.max(1,Math.ceil((P.height/Q+X)/V));K.gridEnabled=H.gridEnabled;K.gridSize=H.gridSize;K.guidesEnabled=H.graphHandler.guidesEnabled;K.pageVisible=H.pageVisible;K.pageScale=H.pageScale;K.pageWidth=
H.pageFormat.width*oa;K.pageHeight=H.pageFormat.height*ca;K.backgroundClr=H.background;K.mathEnabled=H.mathEnabled;K.shadowVisible=H.shadowVisible}catch(qa){}return K}function g(H,K,P,Q){return b(H,K/J.CONVERSION_FACTOR,P,Q)}function b(H,K,P,Q){P=A(P,J.XMLNS,"Cell");P.setAttribute("N",H);P.setAttribute("V",K);Q&&P.setAttribute("F",Q);return P}function a(H,K,P,Q,R){var ha=A(R,J.XMLNS,"Row");ha.setAttribute("T",H);ha.setAttribute("IX",K);ha.appendChild(g("X",P,R));ha.appendChild(g("Y",Q,R));return ha}
function c(H,K,P){var Q=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(Q&&"none"!=Q){if(K.appendChild(b("FillForegnd",Q,P)),(Q=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=Q){K.appendChild(b("FillBkgnd",Q,P));Q=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var R=28;if(Q)switch(Q){case mxConstants.DIRECTION_EAST:R=25;break;case mxConstants.DIRECTION_WEST:R=27;break;case mxConstants.DIRECTION_NORTH:R=30}K.appendChild(b("FillPattern",R,P))}}else K.appendChild(b("FillPattern",
0,P));(Q=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=Q?K.appendChild(b("LineColor",Q,P)):K.appendChild(b("LinePattern",0,P));(Q=H.style[mxConstants.STYLE_STROKEWIDTH])&&K.appendChild(g("LineWeight",Q,P));(R=H.style[mxConstants.STYLE_OPACITY])?Q=R:(Q=H.style[mxConstants.STYLE_FILL_OPACITY],R=H.style[mxConstants.STYLE_STROKE_OPACITY]);Q&&K.appendChild(b("FillForegndTrans",1-parseInt(Q)/100,P));R&&K.appendChild(b("LineColorTrans",1-parseInt(R)/100,P));if(1==H.style[mxConstants.STYLE_DASHED]){Q=
H.style[mxConstants.STYLE_DASH_PATTERN];R=9;if(Q)switch(Q){case "1 1":R=10;break;case "1 2":R=3;break;case "1 4":R=17}K.appendChild(b("LinePattern",R,P))}1==H.style[mxConstants.STYLE_SHADOW]&&(K.appendChild(b("ShdwPattern",1,P)),K.appendChild(b("ShdwForegnd","#000000",P)),K.appendChild(b("ShdwForegndTrans",.6,P)),K.appendChild(b("ShapeShdwType",1,P)),K.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",P)),K.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",P)),K.appendChild(b("ShapeShdwScaleFactor",
"1",P)),K.appendChild(b("ShapeShdwBlur","0.05555555555555555",P)),K.appendChild(b("ShapeShdwShow",2,P)));1==H.style[mxConstants.STYLE_FLIPH]&&K.appendChild(b("FlipX",1,P));1==H.style[mxConstants.STYLE_FLIPV]&&K.appendChild(b("FlipY",1,P));1==H.style[mxConstants.STYLE_ROUNDED]&&K.appendChild(g("Rounding",.1*H.cell.geometry.width,P));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&K.appendChild(b("TextBkgnd",H,P))}function d(H,K,P,Q,R,ha){var X=A(Q,J.XMLNS,"Shape");X.setAttribute("ID",
H);X.setAttribute("NameU","Shape"+H);X.setAttribute("LineStyle","0");X.setAttribute("FillStyle","0");X.setAttribute("TextStyle","0");H=K.width/2;var T=K.height/2;X.appendChild(g("PinX",K.x+H+(ha?0:O.shiftX),Q));X.appendChild(g("PinY",R-K.y-T-(ha?0:O.shiftY),Q));X.appendChild(g("Width",K.width,Q));X.appendChild(g("Height",K.height,Q));X.appendChild(g("LocPinX",H,Q));X.appendChild(g("LocPinY",T,Q));X.appendChild(b("LayerMember",P+"",Q));return X}function f(H,K){H=J.ARROWS_MAP[(null==H?"none":H)+"|"+
(null==K?"1":K)];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,K,P,Q,R,ha){var X=P.view.getState(H,!0);if(null==X||null==X.absolutePoints||null==X.cellBounds)return null;P=A(Q,J.XMLNS,"Shape");var T=B(H.id);P.setAttribute("ID",T);P.setAttribute("NameU","Dynamic connector."+T);P.setAttribute("Name","Dynamic connector."+T);P.setAttribute("Type","Shape");P.setAttribute("Master","4");var V=O.state;T=X.absolutePoints;var oa=X.cellBounds,ca=
oa.width/2,qa=oa.height/2;P.appendChild(g("PinX",oa.x+ca+(ha?0:O.shiftX),Q));P.appendChild(g("PinY",R-oa.y-qa-(ha?0:O.shiftY),Q));P.appendChild(g("Width",oa.width,Q));P.appendChild(g("Height",oa.height,Q));P.appendChild(g("LocPinX",ca,Q));P.appendChild(g("LocPinY",qa,Q));O.newEdge(P,X,Q);ca=function(sa,Fa,ka){var Za=sa.x;sa=sa.y;Za=Za*V.scale-oa.x+V.dx+(ka||ha?0:O.shiftX);sa=(Fa?0:oa.height)-sa*V.scale+oa.y-V.dy-(ka||ha?0:O.shiftY);return{x:Za,y:sa}};qa=ca(T[0],!0);P.appendChild(g("BeginX",oa.x+qa.x,
Q,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));P.appendChild(g("BeginY",R-oa.y+qa.y,Q,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(T[T.length-1],!0);P.appendChild(g("EndX",oa.x+qa.x,Q,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));P.appendChild(g("EndY",R-oa.y+qa.y,Q,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));P.appendChild(b("BegTrigger","2",Q,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));P.appendChild(b("EndTrigger","2",Q,H.target?"_XFTRIGGER(Sheet."+
B(H.target.id)+"!EventXFMod)":null));P.appendChild(b("ConFixedCode","6",Q));P.appendChild(b("LayerMember",K+"",Q));c(X,P,Q);K=X.style[mxConstants.STYLE_STARTSIZE];H=f(X.style[mxConstants.STYLE_STARTARROW],X.style[mxConstants.STYLE_STARTFILL]);P.appendChild(b("BeginArrow",H,Q));P.appendChild(b("BeginArrowSize",k(K),Q));K=X.style[mxConstants.STYLE_ENDSIZE];H=f(X.style[mxConstants.STYLE_ENDARROW],X.style[mxConstants.STYLE_ENDFILL]);P.appendChild(b("EndArrow",H,Q));P.appendChild(b("EndArrowSize",k(K),
Q));null!=X.text&&X.text.checkBounds()&&(O.save(),X.text.paint(O),O.restore());X=A(Q,J.XMLNS,"Section");X.setAttribute("N","Geometry");X.setAttribute("IX","0");for(H=0;H<T.length;H++)K=ca(T[H],!1,!0),X.appendChild(a(0==H?"MoveTo":"LineTo",H+1,K.x,K.y,Q));X.appendChild(b("NoFill","1",Q));X.appendChild(b("NoLine","0",Q));P.appendChild(X);return P}function p(H,K,P,Q,R,ha,X){var T=H.geometry,V=T;if(null!=T)try{T.relative&&ha&&(V=T.clone(),T.x*=ha.width,T.y*=ha.height,H.vertex&&null!=T.offset&&(T.x+=T.offset.x,
T.y+=T.offset.y),T.relative=0);var oa=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(oa+"10000",T,K,Q,R,X);ca.setAttribute("Type","Group");var qa=A(Q,J.XMLNS,"Shapes");O.save();O.translate(-T.x,-T.y);var sa=T.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=p(H,K,P,Q,T.height,T,!0);delete H.treatAsSingle;H.setGeometry(T);null!=Fa&&qa.appendChild(Fa);for(R=0;R<H.getChildCount();R++)Fa=p(H.children[R],K,P,Q,T.height,T,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);
O.restore();return ca}if(H.vertex){ca=d(oa,T,K,Q,R,X);var ka=P.view.getState(H,!0);null!=ka&&(c(ka,ca,Q),O.newShape(ca,ka,Q),null!=ka.text&&ka.text.checkBounds()&&(O.save(),ka.text.paint(O),O.restore()),null!=ka.shape&&ka.shape.checkBounds()&&(O.save(),ka.shape.paint(O),O.restore()),ca.appendChild(O.getShapeGeo()),O.endShape(),ca.setAttribute("Type",O.getShapeType()));return ca}return n(H,K,P,Q,R,X)}finally{H.geometry=V}else return null}function x(H,K){var P=mxUtils.createXmlDocument(),Q=A(P,J.XMLNS,
"PageContents");Q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",J.XMLNS);Q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",J.XMLNS_R);var R=A(P,J.XMLNS,"Shapes");Q.appendChild(R);var ha=H.model,X=H.view.translate,T=H.view.scale,V=H.getGraphBounds();O.shiftX=0;O.shiftY=0;if(V.x/T<X.x||V.y/T<X.y)O.shiftX=Math.ceil((X.x-V.x/T)/H.pageFormat.width)*H.pageFormat.width,O.shiftY=Math.ceil((X.y-V.y/T)/H.pageFormat.height)*H.pageFormat.height;O.save();O.translate(-X.x,-X.y);O.scale(1/T);O.newPage();
T=H.model.getChildCells(H.model.root);X={};for(V=0;V<T.length;V++)X[T[V].id]=V;for(var oa in ha.cells)T=ha.cells[oa],V=null!=T.parent?X[T.parent.id]:null,null!=V&&(T=p(T,V,H,P,K.pageHeight),null!=T&&R.appendChild(T));H=A(P,J.XMLNS,"Connects");Q.appendChild(H);for(oa in ha.cells)T=ha.cells[oa],T.edge&&(T.source&&(K=A(P,J.XMLNS,"Connect"),K.setAttribute("FromSheet",B(T.id)),K.setAttribute("FromCell","BeginX"),K.setAttribute("ToSheet",B(T.source.id)),H.appendChild(K)),T.target&&(K=A(P,J.XMLNS,"Connect"),
K.setAttribute("FromSheet",B(T.id)),K.setAttribute("FromCell","EndX"),K.setAttribute("ToSheet",B(T.target.id)),H.appendChild(K)));P.appendChild(Q);O.restore();return P}function z(H,K,P,Q){H.file(K,(Q?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(P,"\n"))}function E(H,K,P,Q){var R=mxUtils.createXmlDocument(),ha=mxUtils.createXmlDocument(),X=A(R,J.XMLNS,"Pages");X.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",J.XMLNS);X.setAttributeNS("http://www.w3.org/2000/xmlns/",
"xmlns:r",J.XMLNS_R);var T=A(ha,J.RELS_XMLNS,"Relationships"),V=1,oa;for(oa in K){var ca="page"+V+".xml",qa=A(R,J.XMLNS,"Page");qa.setAttribute("ID",V-1);qa.setAttribute("NameU",oa);qa.setAttribute("Name",oa);var sa=A(R,J.XMLNS,"PageSheet"),Fa=Q[oa];sa.appendChild(g("PageWidth",Fa.pageWidth,R));sa.appendChild(g("PageHeight",Fa.pageHeight,R));sa.appendChild(b("PageScale",Fa.pageScale,R));sa.appendChild(b("DrawingScale",1,R));Fa=A(R,J.XMLNS,"Rel");Fa.setAttributeNS(J.XMLNS_R,"r:id","rId"+V);var ka=
A(R,J.XMLNS,"Section");ka.setAttribute("N","Layer");for(var Za=P[oa],yb=0;yb<Za.length;yb++){var vb=A(R,J.XMLNS,"Row");vb.setAttribute("IX",yb+"");ka.appendChild(vb);vb.appendChild(b("Name",Za[yb].name,R));vb.appendChild(b("Color","255",R));vb.appendChild(b("Status","0",R));vb.appendChild(b("Visible",Za[yb].visible?"1":"0",R));vb.appendChild(b("Print","1",R));vb.appendChild(b("Active","0",R));vb.appendChild(b("Lock",Za[yb].locked?"1":"0",R));vb.appendChild(b("Snap","1",R));vb.appendChild(b("Glue",
"1",R));vb.appendChild(b("NameUniv",Za[yb].name,R));vb.appendChild(b("ColorTrans","0",R))}sa.appendChild(ka);qa.appendChild(sa);qa.appendChild(Fa);X.appendChild(qa);qa=A(ha,J.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+V);qa.setAttribute("Type",J.PAGES_TYPE);qa.setAttribute("Target",ca);T.appendChild(qa);z(H,J.VISIO_PAGES+ca,K[oa]);V++}R.appendChild(X);ha.appendChild(T);z(H,J.VISIO_PAGES+"pages.xml",R);z(H,J.VISIO_PAGES+"_rels/pages.xml.rels",ha)}function I(H,K){K=J.VISIO_PAGES_RELS+"page"+
K+".xml.rels";var P=mxUtils.createXmlDocument(),Q=A(P,J.RELS_XMLNS,"Relationships"),R=A(P,J.RELS_XMLNS,"Relationship");R.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");R.setAttribute("Id","rId1");R.setAttribute("Target","../masters/master1.xml");Q.appendChild(R);var ha=O.images;if(0<ha.length)for(var X=0;X<ha.length;X++)R=A(P,J.RELS_XMLNS,"Relationship"),R.setAttribute("Type",J.XMLNS_R+"/image"),R.setAttribute("Id","rId"+(X+2)),R.setAttribute("Target","../media/"+
ha[X]),Q.appendChild(R);P.appendChild(Q);z(H,K,P)}var J=this,O=new mxVsdxCanvas2D,M={},L=1;this.exportCurrentDiagrams=function(H){try{if(h.spinner.spin(document.body,mxResources.get("exporting"))){var K=function(Fa,ka){Fa=Fa.model.getChildCells(Fa.model.root);R[ka]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&R[ka].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},P=new JSZip;O.init(P);M={};L=1;var Q={},R={},ha={},X=null!=
h.pages?h.pages.length:1;if(null!=h.pages){var T=function(Fa){Fa=Fa.getName();var ka=h.editor.graph,Za=null;null!=ka.themes&&"darkTheme"==ka.defaultThemeName&&(Za=ka.stylesheet,ka.stylesheet=ka.getDefaultStylesheet(),ka.refresh());try{var yb=m(ka);Q[Fa]=x(ka,yb);K(ka,Fa);I(P,ca+1);ha[Fa]=yb}finally{null!=Za&&(ka.stylesheet=Za,ka.refresh())}},V=h.editor.graph.getSelectionCells(),oa=h.currentPage;if(H)T(oa);else{for(var ca=0;ca<h.pages.length;ca++){var qa=h.pages[ca];h.currentPage!=qa&&h.selectPage(qa,
!0);T(qa)}oa!=h.currentPage&&h.selectPage(oa,!0);h.editor.graph.setSelectionCells(V)}}else{T=h.editor.graph;var sa=m(T);Q.Page1=x(T,sa);K(T,"Page1");I(P,1);ha.Page1=sa}y(P,X);E(P,Q,R,ha);H=function(){P.generateAsync({type:"base64"}).then(function(Fa){h.spinner.stop();var ka=h.getBaseFilename();h.saveData(ka+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<O.filesLoading?O.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),h.spinner.stop(),!1}}}
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(h){this.filesLoading=0;this.zip=h};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(h){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,h):this.xmlDoc.createElement(h)};
mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var h=this.createElt("Section");h.setAttribute("N","Geometry");h.setAttribute("IX",this.geoIndex++);this.geoSec=h;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(h,y,A){this.geoIndex=0;this.shape=h;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=A;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
mxVsdxCanvas2D.prototype.newEdge=function(h,y,A){this.shape=h;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=A};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};
mxVsdxCanvas2D.prototype.createCellElemScaled=function(h,y,A){return this.createCellElem(h,y/VsdxExport.prototype.CONVERSION_FACTOR,A)};mxVsdxCanvas2D.prototype.createCellElem=function(h,y,A){var B=this.createElt("Cell");B.setAttribute("N",h);B.setAttribute("V",y);A&&B.setAttribute("F",A);return B};
mxVsdxCanvas2D.prototype.createRowScaled=function(h,y,A,B,m,g,b,a,c,d,f,k,n,p){return this.createRowRel(h,y,A/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,g/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,c,d,f,k,n,p)};
mxVsdxCanvas2D.prototype.createRowRel=function(h,y,A,B,m,g,b,a,c,d,f,k,n,p){var x=this.createElt("Row");x.setAttribute("T",h);x.setAttribute("IX",y);x.appendChild(this.createCellElem("X",A,c));x.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&x.appendChild(this.createCellElem("A",m,f));null!=g&&isFinite(g)&&x.appendChild(this.createCellElem("B",g,k));null!=b&&isFinite(b)&&x.appendChild(this.createCellElem("C",b,n));null!=a&&isFinite(a)&&x.appendChild(this.createCellElem("D",a,p));
mxVsdxCanvas2D.prototype.rect=function(h,y,A,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;A*=m.scale;B*=m.scale;var g=this.xmGeo;h=(h-g.x+m.dx)*m.scale;y=(g.height-y+g.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,h,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,h+A,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,h+A,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,
h,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,h,y))};mxVsdxCanvas2D.prototype.roundrect=function(h,y,A,B,m,g){this.rect(h,y,A,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};
mxVsdxCanvas2D.prototype.ellipse=function(h,y,A,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;A*=m.scale;B*=m.scale;var g=this.xmGeo,b=g.height*m.scale,a=g.width*m.scale;h=(h-g.x+m.dx)*m.scale;y=b+(-y+g.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,h+A/2,y-B/2,h,y-B/2,h+A/2,y,"Width*"+(h+A/2)/a,"Height*"+(y-B/2)/b,"Width*"+h/a,"Height*"+(y-B/2)/b,"Width*"+(h+A/2)/a,"Height*"+y/b))};
mxVsdxCanvas2D.prototype.moveTo=function(h,y){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=h;this.lastMoveToY=y;this.lastX=h;this.lastY=y;var A=this.xmGeo,B=this.state;h=(h-A.x+B.dx)*B.scale;y=(A.height-y+A.y-B.dy)*B.scale;var m=A.height*B.scale;A=A.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,h/A,y/m))};
mxVsdxCanvas2D.prototype.lineTo=function(h,y){this.lastX=h;this.lastY=y;var A=this.xmGeo,B=this.state;h=(h-A.x+B.dx)*B.scale;y=(A.height-y+A.y-B.dy)*B.scale;var m=A.height*B.scale;A=A.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,h/A,y/m))};
mxVsdxCanvas2D.prototype.quadTo=function(h,y,A,B){this.lastX=A;this.lastY=B;var m=this.state,g=this.xmGeo,b=g.height*m.scale,a=g.width*m.scale;h=(h-g.x+m.dx)*m.scale;y=(g.height-y+g.y-m.dy)*m.scale;A=(A-g.x+m.dx)*m.scale;B=(g.height-B+g.y-m.dy)*m.scale;h/=a;y/=b;A/=a;B/=b;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,A,B,h,y))};
mxVsdxCanvas2D.prototype.curveTo=function(h,y,A,B,m,g){this.lastX=m;this.lastY=g;var b=this.state,a=this.xmGeo,c=a.height*b.scale,d=a.width*b.scale;h=(h-a.x+b.dx)*b.scale;y=(a.height-y+a.y-b.dy)*b.scale;A=(A-a.x+b.dx)*b.scale;B=(a.height-B+a.y-b.dy)*b.scale;m=(m-a.x+b.dx)*b.scale;g=(a.height-g+a.y-b.dy)*b.scale;h/=d;y/=c;A/=d;B/=c;m/=d;g/=c;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,g,h,y,A,B))};
mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(h,y){var A=this.createElt("ForeignData");A.setAttribute("ForeignType","Bitmap");h=h.toUpperCase();"BMP"!=h&&A.setAttribute("CompressionType",h);h=this.createElt("Rel");h.setAttribute("r:id","rId"+y);A.appendChild(h);this.shape.appendChild(A);this.shapeType="Foreign"};
mxVsdxCanvas2D.prototype.convertSvg2Png=function(h,y,A){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),g=m.getContext("2d");y||(h=String.fromCharCode.apply(null,new Uint8Array(h)),h=window.btoa?btoa(h):Base64.encode(h,!0));y="data:image/svg+xml;base64,"+h;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;g.drawImage(this,0,0);try{A(m.toDataURL("image/png"))}catch(b){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");
try{A(h)}catch(b){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(b){console.log("SVG2PNG conversion failed"+b.message);try{A(h)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};
mxVsdxCanvas2D.prototype.image=function(h,y,A,B,m,g,b,a){var c=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");g=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(g,!0,function(n){c.zip.file("visio/media/"+d,n.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,g,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);
var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;g=new XMLHttpRequest;g.open("GET",m,!0);g.responseType="arraybuffer";g.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?c.convertSvg2Png(this.response,!1,function(p){c.zip.file("visio/media/"+d,p.substring(22),{base64:!0})}):c.zip.file("visio/media/"+d,this.response)),c.filesLoading--,0==c.filesLoading))c.onFilesLoaded()};g.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;A*=m.scale;
B*=m.scale;f=this.xmGeo;h=(h-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",h));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",A));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};
mxVsdxCanvas2D.prototype.text=function(h,y,A,B,m,g,b,a,c,d,f,k,n){var p=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==A&&0==B&&(B=mxUtils.getSizeForString(m,p.cellState.style.fontSize,p.cellState.style.fontFamily),A=2*B.width,B=2*B.height);"html"==c&&("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;A*=d.scale;B*=d.scale;var x=this.createElt("Section");x.setAttribute("N","Character");var z=this.createElt("Section");z.setAttribute("N","Paragraph");var E=this.createElt("Text"),I=0,J=0,O=0,M=0,L=0,H=0,K=0,P=function(T,V,oa,ca,qa){var sa=T.fontSize,Fa=T.fontFamily,ka=mxUtils.getSizeForString(qa,sa,Fa);a&&ka.width>A&&(ka=mxUtils.getSizeForString(qa,sa,Fa,A));T.blockElem?(L+=ka.width,O=Math.min(Math.max(O,L),
A),L=0,H=Math.max(H,ka.height),M+=H+K,K=H,H=0):(L+=ka.width,O=Math.min(Math.max(O,L),A),H=Math.max(H,ka.height),M=Math.max(M,H));ka=p.createElt("Row");ka.setAttribute("IX",I);T.fontColor&&ka.appendChild(p.createCellElem("Color",mxUtils.rgba2hex(T.fontColor)));sa&&ka.appendChild(p.createCellElemScaled("Size",.97*sa));Fa&&ka.appendChild(p.createCellElem("Font",Fa));sa=0;T.bold&&(sa|=17);T.italic&&(sa|=34);T.underline&&(sa|=4);ka.appendChild(p.createCellElem("Style",sa));ka.appendChild(p.createCellElem("Case",
"0"));ka.appendChild(p.createCellElem("Pos","0"));ka.appendChild(p.createCellElem("FontScale","1"));ka.appendChild(p.createCellElem("Letterspace","0"));V.appendChild(ka);V=p.createElt("Row");V.setAttribute("IX",J);switch(T.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}V.appendChild(p.createCellElem("HorzAlign",sa));oa.appendChild(V);oa=p.createElt("cp");oa.setAttribute("IX",I++);ca.appendChild(oa);
T=p.xmlDoc.createTextNode(qa+(T.blockElem?"\n":""));ca.appendChild(T)},Q=function(T,V){V=V||{};for(var oa=0;oa<T.length;oa++){var ca=T[oa];if(3==ca.nodeType){var qa=p.cellState.style.fontStyle;qa={fontColor:V.fontColor||p.cellState.style.fontColor,fontSize:V.fontSize||p.cellState.style.fontSize,fontFamily:V.fontFamily||p.cellState.style.fontFamily,align:V.align||p.cellState.style.align,bold:V.bold||qa&1,italic:V.italic||qa&2,underline:V.underline||qa&4};var sa=!1;oa+1<T.length&&"BR"==T[oa+1].nodeName.toUpperCase()&&
(sa=!0,oa++);P(qa,x,z,E,(V.OL?V.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")||V.bold,italic:"italic"==qa.getPropertyValue("font-style")||V.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||V.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:V.OL,LiIndex:V.LiIndex};if("UL"==sa){var ka=p.createElt("Row");ka.setAttribute("IX",J);ka.appendChild(p.createCellElem("HorzAlign","0"));ka.appendChild(p.createCellElem("Bullet","1"));z.appendChild(ka);ka=p.createElt("pp");ka.setAttribute("IX",J++);E.appendChild(ka)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=oa+1);0<Fa?(Q(ca.childNodes,qa),"UL"==sa&&(ka=p.createElt("Row"),
ka.setAttribute("IX",J),ka.appendChild(p.createCellElem("Bullet","0")),z.appendChild(ka),ka=p.createElt("pp"),ka.setAttribute("IX",J++),E.appendChild(ka)),P(qa,x,z,E,"")):P(qa,x,z,E,(V.OL?V.LiIndex+". ":"")+ca.textContent)}}};"html"==c&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&Q(m.childNodes,{})):P({fontColor:p.cellState.style.fontColor,fontSize:p.cellState.style.fontSize,fontFamily:p.cellState.style.fontFamily},x,z,E,m);c=m=0;B=Math.max(B,
M);A=Math.max(A,O);n=A/2;var R=B/2,ha=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),X=ha*Math.PI/180;switch(g){case "right":0!=ha?(h-=n*Math.cos(X),y-=n*Math.sin(X)):m=O/2;break;case "left":0!=ha?(h+=n*Math.cos(X),y+=n*Math.sin(X)):m=-O/2}switch(b){case "top":0!=ha?(h+=R*Math.sin(X),y+=R*Math.cos(X)):c=M/2;break;case "bottom":0!=ha?(h-=R*Math.sin(X),y-=R*Math.cos(X)):c=-M/2}h=(h-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",
h));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",A));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",R+c));k-=ha;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(x);this.shape.appendChild(z);this.shape.appendChild(E)}};
mxVsdxCanvas2D.prototype.rotate=function(h,y,A,B,m){0!=h&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-h)*Math.PI/180)),y.rotation+=h,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(h,y){this.pos=0;this.buffer=h;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 h=this.buffer;this.fileSize=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.reserved=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.offset=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.headerSize=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.width=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];
this.pos+=4;this.height=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.planes=h[this.pos+1]<<8|h[this.pos];this.pos+=2;this.bitPP=h[this.pos+1]<<8|h[this.pos];this.pos+=2;this.compress=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.rawSize=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.hr=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.vr=h[this.pos+3]<<24|h[this.pos+
2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.colors=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;this.importantColors=h[this.pos+3]<<24|h[this.pos+2]<<16|h[this.pos+1]<<8|h[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){h=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(h);for(var y=0;y<h;y++){var A=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],g=this.buffer[this.pos++];
this.palette[y]={red:m,green:B,blue:A,quad:g}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var h="bit"+this.bitPP,y=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=y;this.data=y.data;this[h]()}catch(A){console.log("bit decode error:"+A)}};
BmpDecoder.prototype.bit1=function(){for(var h=Math.ceil(this.width/8),y=h%4,A=this.height-1;0<=A;A--){for(var B=0;B<h;B++)for(var m=this.buffer[this.pos++],g=A*this.width*4+32*B,b=0;8>b;b++)if(8*B+b<this.width){var a=this.palette[m>>7-b&1];this.data[g+4*b]=a.red;this.data[g+4*b+1]=a.green;this.data[g+4*b+2]=a.blue;this.data[g+4*b+3]=255}else break;0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit4=function(){for(var h=Math.ceil(this.width/2),y=h%4,A=this.height-1;0<=A;A--){for(var B=0;B<h;B++){var m=this.buffer[this.pos++],g=A*this.width*4+8*B,b=m&15;m=this.palette[m>>4];this.data[g]=m.red;this.data[g+1]=m.green;this.data[g+2]=m.blue;this.data[g+3]=255;if(2*B+1>=this.width)break;m=this.palette[b];this.data[g+4]=m.red;this.data[g+4+1]=m.green;this.data[g+4+2]=m.blue;this.data[g+4+3]=255}0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit8=function(){for(var h=this.width%4,y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos++],m=y*this.width*4+4*A;B<this.palette.length?(B=this.palette[B],this.data[m]=B.red,this.data[m+1]=B.green,this.data[m+2]=B.blue):(this.data[m]=255,this.data[m+1]=255,this.data[m+2]=255);this.data[m+3]=255}0!=h&&(this.pos+=4-h)}};
BmpDecoder.prototype.bit15=function(){var h=2*this.width%4;0!=h&&(h=4-h);for(var y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,g=(B>>5&31)/31*255|0,b=B>>15?255:0,a=y*this.width*4+4*A;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=g;this.data[a+2]=m;this.data[a+3]=b}this.pos+=h}};
BmpDecoder.prototype.bit16=function(){var h=2*this.width%4;0!=h&&(h=4-h);for(var y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,g=(B>>5&31)/31*255|0,b=y*this.width*4+4*A;this.data[b]=(B>>10&31)/31*255|0;this.data[b+1]=g;this.data[b+2]=m;this.data[b+3]=255}this.pos+=h}};
BmpDecoder.prototype.bit24=function(){var h=3*this.width%4;0!=h&&(h=4-h);for(var y=this.height-1;0<=y;y--){for(var A=0;A<this.width;A++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],g=this.buffer[this.pos++],b=y*this.width*4+4*A;this.data[b]=g;this.data[b+1]=m;this.data[b+2]=B;this.data[b+3]=255}this.pos+=h}};
BmpDecoder.prototype.bit32=function(){for(var h=this.height-1;0<=h;h--)for(var y=0;y<this.width;y++){var A=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],g=this.buffer[this.pos++],b=h*this.width*4+4*y;this.data[b]=m;this.data[b+1]=B;this.data[b+2]=A;this.data[b+3]=g}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(h,y){function A(){this.constructor=h}for(var B in y)y.hasOwnProperty(B)&&(h[B]=y[B]);h.prototype=null===y?Object.create(y):(A.prototype=y.prototype,new A)},com;
(function(h){(function(y){(function(A){var B=function(){function m(g){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=g;this.shapeIndexShift=0}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(g){try{var b=mxUtils.parseXml(g);return 0<b.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:b}catch(a){return null}};m.decodeUTF16LE=function(g){for(var b="",a=0;a<g.length;a+=2)b+=String.fromCharCode(g.charCodeAt(a)|g.charCodeAt(a+1)<<8);return b};m.prototype.scaleGraph=function(g,b){if(1!==b){g=
g.getModel();for(var a in g.cells){var c=g.cells[a],d=g.getGeometry(c);if(null!=d&&(this.scaleRect(d,b),this.scaleRect(d.alternateBounds,b),g.isEdge(c)&&(this.scalePoint(d.sourcePoint,b),this.scalePoint(d.targetPoint,b),this.scalePoint(d.offset,b),c=d.points,null!=c)))for(d=0;d<c.length;d++)this.scalePoint(c[d],b)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];m.prototype.decodeVsdx=function(g,b,a,c){var d=this,f={},k={},n=function(){function E(){M=M.concat(d.RESPONSE_END);
b&&b(M)}for(var I=m.vsdxPlaceholder+"/document.xml",J=f[I]?f[I]:null,O=J.firstChild;null!=O&&1!=O.nodeType;)O=O.nextSibling;if(null!=O&&1==O.nodeType)d.importNodes(J,O,I,f);else return null;d.vsdxModel=new h.mxgraph.io.vsdx.mxVsdxModel(J,f,k);I=d.vsdxModel.getPages();var M=d.RESPONSE_HEADER;var L=function(P){null==P.entries&&(P.entries=[]);return P.entries}(I),H=function(P,Q){var R=L[P].getValue(),ha=K.createMxGraph();ha.getModel().beginUpdate();K.importPage(R,ha,ha.getDefaultParent(),!0);K.scaleGraph(ha,
R.getPageScale()/R.getDrawingScale());ha.getModel().endUpdate();K.postImportPage(R,ha,function(){K.sanitiseGraph(ha);M=M.concat(d.RESPONSE_DIAGRAM_START);M=M.concat(d.processPage(ha,R));M=M.concat(d.RESPONSE_DIAGRAM_END);P<L.length-1?H(P+1,Q):Q()})},K=d;0<L.length?H(0,E):E()},p=0,x=0,z=function(){if(x==p)try{n()}catch(E){console.log(E),null!=c?c(E):b("")}};JSZip.loadAsync(g).then(function(E){0==Object.keys(E.files).length?null!=c&&c():E.forEach(function(I,J){var O=J.name,M=O.toLowerCase();I=M.length;
M.indexOf(".xml")==I-4||M.indexOf(".rels")==I-5?(p++,J.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var H=m.parseXml(L);if(null==H)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))H=m.parseXml(m.decodeUTF16LE(L));else{for(H=0;H<m.incorrectXMLReqExp.length;H++)m.incorrectXMLReqExp[H].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[H].regExp,m.incorrectXMLReqExp[H].repl));H=m.parseXml(L)}null!=H&&(H.vsdxFileName=O,f[O]=H)}x++;z()})):
0===M.indexOf(m.vsdxPlaceholder+"/media")&&(p++,function(L,H){var K=L.length-H.length;L=L.indexOf(H,K);return-1!==L&&L===K}(M,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?J.async("blob").then(function(L){var H=new FormData;H.append("img",L,M);H.append("inputformat","emf");H.append("outputformat","png");var K=new XMLHttpRequest;K.open("POST",EMF_CONVERT_URL);K.responseType="blob";d.editorUi.addRemoteServiceSecurityCheck(K);K.onreadystatechange=mxUtils.bind(this,function(){if(4==K.readyState)if(200<=
K.status&&299>=K.status)try{var P=new FileReader;P.readAsDataURL(K.response);P.onloadend=function(){var Q=P.result.indexOf(",")+1;k[O]=P.result.substr(Q);x++;z()}}catch(Q){console.log(Q),x++,z()}else x++,z()});K.send(H)}):(x++,z()):function(L,H){var K=L.length-H.length;L=L.indexOf(H,K);return-1!==L&&L===K}(M,".bmp")?JSZip.support.uint8array&&J.async("uint8array").then(function(L){L=new BmpDecoder(L);var H=document.createElement("canvas");H.width=L.width;H.height=L.height;H.getContext("2d").putImageData(L.imageData,
0,0);L=H.toDataURL("image/jpeg");k[O]=L.substr(23);x++;z()}):J.async("base64").then(function(L){k[O]=L;x++;z()}))})},function(E){null!=c&&c(E)})};m.prototype.createMxGraph=function(){var g=new Graph;g.setExtendParents(!1);g.setExtendParentsOnAdd(!1);g.setConstrainChildren(!1);g.setHtmlLabels(!0);g.getModel().maintainEdgeParent=!1;return g};m.prototype.processPage=function(g,b){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);var a="";if(null!=b){var c=
mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":"");b=mxUtils.htmlEntities(b.getPageNameU());a+='<diagram name="'+c+'" id="'+b.replace(/\s/g,"_")+'">'}return a+=Graph.compress(g)};m.prototype.scalePoint=function(g,b){null!=g&&(g.x*=b,g.y*=b);return g};m.prototype.scaleRect=function(g,b){null!=g&&(g.x*=b,g.y*=b,g.height*=b,g.width*=b);return g};m.prototype.importNodes=function(g,b,a,c){var d=a.lastIndexOf("/"),f=a,k=a;if(-1!==d&&(f=a.substring(0,d),k=a.substring(d+1,a.length),
a=function(z,E){return z[E]?z[E]:null}(c,f+"/_rels/"+k+".rels"),null!=a)){var n=a.getElementsByTagName("Relationship");a={};for(d=0;d<n.length;d++){k=n.item(d);var p=k.getAttribute("Id");k=k.getAttribute("Target");a[p]=k}b=b.getElementsByTagName("Rel");for(d=0;d<b.length;d++)if(n=b.item(d),k=function(z,E){return z[E]?z[E]:null}(a,n.getAttribute("r:id")),k=f+"/"+k,null!=k&&(p=c[k]?c[k]:null,null!=p)){n=n.parentNode;for(p=p.firstChild;null!=p&&1!=p.nodeType;)p=p.nextSibling;if(null!=p&&1==p.nodeType)for(p=
p.firstChild;null!=p;){if(null!=p&&1==p.nodeType){var x=n.appendChild(g.importNode(p,!0));this.importNodes(g,x,k,c)}p=p.nextSibling}}}};m.prototype.layerIndexToNames=function(g){var b=[];if(g)for(var a=0;a<g.length;a++){var c=parseInt(g[a]);c<this.layerNames.length&&b.push(this.layerNames[c])}return 0<b.length?b:[mxResources.get("background")]};m.prototype.importPage=function(g,b,a,c){var d=g.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),g.getPageName());var f=new mxCell(d.getPageName());
b.addCell(f,b.getModel().getRoot(),0,null,null);this.importPage(d,b,b.getDefaultParent())}var k=g.getLayers();f=g.getShapes();d=[];console.log("layers",k);for(var n=0;n<k.length;n++){var p=k[n],x=p.Name.replace(/\s/g,"_");this.layerNames.push(x);0==p.Visible&&d.push(x)}p=function(z){var E=0;return{next:function(){return E<z.length?z[E++]:null},hasNext:function(){return E<z.length}}}(function(z){null==z.entries&&(z.entries=[]);return z.entries}(f));f=g.getPageDimensions().y;for(n=g.getId();p.hasNext();)k=
p.next(),k=k.getValue(),x=this.addShape(b,k,a,n,f),k=this.layerIndexToNames(k.layerMember),null!=x&&null!=k&&b.addTagsForCells([x],k);for(g=function(z){var E=0;return{next:function(){return E<z.length?z[E++]:null},hasNext:function(){return E<z.length}}}(function(z){null==z.entries&&(z.entries=[]);return z.entries}(g.getConnects()));g.hasNext();)k=g.next(),k=this.addConnectedEdge(b,k.getValue(),n,f),null!=k&&function(z,E){null==z.entries&&(z.entries=[]);for(var I=0;I<z.entries.length;I++)if(null!=
z.entries[I].key.equals&&z.entries[I].key.equals(E)||z.entries[I].key===E)return z.entries.splice(I,1)[0]}(this.edgeShapeMap,k);for(g=function(z){var E=0;return{next:function(){return E<z.length?z[E++]:null},hasNext:function(){return E<z.length}}}(function(z){null==z.entries&&(z.entries=[]);return z.entries}(this.edgeShapeMap));g.hasNext();)k=g.next(),k.getKey().getPageNumber()===n&&(p=this.addUnconnectedEdge(b,function(z,E){null==z.entries&&(z.entries=[]);for(var I=0;I<z.entries.length;I++)if(null!=
z.entries[I].key.equals&&z.entries[I].key.equals(E)||z.entries[I].key===E)return z.entries[I].value;return null}(this.parentsMap,k.getKey()),k.getValue(),f),k=this.layerIndexToNames(k.getValue().layerMember),null!=k&&b.addTagsForCells([p],k));if(0<this.layerNames.length){g=b.getAllTags();n=!1;for(k=0;k<this.layerNames.length;k++)if(0>mxUtils.indexOf(g,this.layerNames[k])){n=!0;break}n&&(a=b.insertVertex(a,null,null,0,0,0,0),b.addTagsForCells([a],this.layerNames),a.setVisible(!1));b.setHiddenTags(d)}c||
this.sanitiseGraph(b);return f};m.prototype.postImportPage=function(g,b,a){try{var c=function(n){if(null!=n){n=n.entries||[];for(var p=0;p<n.length;p++){var x=n[p].value||{};x.toBeCroppedImg&&f.push(x);c(x.getChildShapes())}}},d=this,f=[];c(g.getShapes());if(0<f.length){var k=function(n,p){function x(){n<f.length-1?k(n+1,p):p()}var z=f[n],E=z.toBeCroppedImg,I=function(O,M){null==O.entries&&(O.entries=[]);for(var L=0;L<O.entries.length;L++)if(null!=O.entries[L].key.equals&&O.entries[L].key.equals(M)||
O.entries[L].key===M)return O.entries[L].value;return null}(d.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(g.Id,z.Id)),J=new Image;J.onload=function(){var O=E.iData,M=E.iType;try{var L=J.width/E.imgWidth,H=J.height/E.imgHeight,K=-E.imgOffsetX*L,P=(E.imgHeight-E.height+E.imgOffsetY)*H,Q=document.createElement("canvas");Q.width=E.width*L;Q.height=E.height*H;var R=Q.getContext("2d");R.fillStyle="#FFFFFF";R.fillRect(0,0,Q.width,Q.height);R.drawImage(J,K,P,Q.width,Q.height,0,0,Q.width,Q.height);O=Q.toDataURL("image/jpeg").substr(23);
M="jpg"}catch(ha){console.log(ha)}I.style+=";image=data:image/"+M+","+O;x()};J.src="data:image/"+E.iType+";base64,"+E.iData;J.onerror=function(){I.style+=";image=data:image/"+E.iType+","+E.iData;x()}};k(0,a)}else a()}catch(n){console.log(n),a()}};m.prototype.addShape=function(g,b,a,c,d){b.parentHeight=d;var f=h.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=f&&(function(n,p){return n&&n.equals?n.equals(p):n===p}(f,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(n,p){return n&&n.equals?
n.equals(p):n===p}(f,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(n,p){return n&&n.equals?n.equals(p):n===p}(f,h.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var k=b.getId();if(b.isVertex()){f=null;f=b.isGroup()?this.addGroup(g,b,a,c,d):this.addVertex(g,b,a,c,d);(function(n,p,x){null==n.entries&&(n.entries=[]);for(var z=0;z<n.entries.length;z++)if(null!=n.entries[z].key.equals&&n.entries[z].key.equals(p)||n.entries[z].key===p){n.entries[z].value=x;return}n.entries.push({key:p,value:x,getKey:function(){return this.key},
getValue:function(){return this.value}})})(this.vertexShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,k),b);a=b.getHyperlink();a.extLink?g.setLinkForCell(f,a.extLink):a.pageLink&&g.setLinkForCell(f,"data:page/id,"+a.pageLink.replace(/\s/g,"_"));b=b.getProperties();for(a=0;a<b.length;a++)try{g.setAttributeForCell(f,b[a].key,b[a].val)}catch(n){console.log('Attribute: "',b[a].key,'" with value "',b[a].val,'" not allowed in HTML')}return f}b.setShapeIndex(g.getModel().getChildCount(a));(function(n,p,x){null==
n.entries&&(n.entries=[]);for(var z=0;z<n.entries.length;z++)if(null!=n.entries[z].key.equals&&n.entries[z].key.equals(p)||n.entries[z].key===p){n.entries[z].value=x;return}n.entries.push({key:p,value:x,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,k),b);(function(n,p,x){null==n.entries&&(n.entries=[]);for(var z=0;z<n.entries.length;z++)if(null!=n.entries[z].key.equals&&n.entries[z].key.equals(p)||n.entries[z].key===
p){n.entries[z].value=x;return}n.entries.push({key:p,value:x,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new h.mxgraph.io.vsdx.ShapePageId(c,k),a)}return null};m.prototype.addGroup=function(g,b,a,c,d){var f=b.getDimensions(),k=b.getMaster(),n=b.getStyleFromShape(),p=b.getGeomList();p.isNoFill()&&(n[mxConstants.STYLE_FILLCOLOR]="none",n[mxConstants.STYLE_GRADIENTCOLOR]="none");p.isNoLine()&&(n[mxConstants.STYLE_STROKECOLOR]="none");n.html="1";n[mxConstants.STYLE_WHITE_SPACE]=
"wrap";var x=h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=");n=null;var z=b.getChildShapes();n=null!=z&&0<function(J){null==J.entries&&(J.entries=[]);return J.entries.length}(z);p=b.isDisplacedLabel()||b.isRotatedLabel()||n;n=b.getOriginPoint(d,!0);if(p)n=g.insertVertex(a,null,null,Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),x);else{var E=b.getTextLabel();n=g.insertVertex(a,null,E,Math.floor(Math.round(100*
n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),x)}a=n.geometry.height;for(z=function(J){var O=0;return{next:function(){return O<J.length?J[O++]:null},hasNext:function(){return O<J.length}}}(function(J){null==J.entries&&(J.entries=[]);return J.entries}(z));z.hasNext();)if(x=z.next().getValue(),E=x.getId(),x.isVertex()){var I=h.mxgraph.io.vsdx.VsdxShape.getType(x.getShape());null!=I&&(function(J,O){return J&&J.equals?J.equals(O):
J===O}(I,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(J,O){return J&&J.equals?J.equals(O):J===O}(I,h.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(J,O){return J&&J.equals?J.equals(O):J===O}(I,h.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&x.isVertex()&&(x.propagateRotation(b.getRotation()),(I=x.isGroup()?this.addGroup(g,x,n,c,f.y):this.addVertex(g,x,n,c,f.y))&&I.geometry&&(a=Math.max(I.geometry.height,a)));null==k&&function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,E),x)}else null==k?(function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,
value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new h.mxgraph.io.vsdx.ShapePageId(c,E),x),function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new h.mxgraph.io.vsdx.ShapePageId(c,E),
n)):this.addUnconnectedEdge(g,n,x,d);if(n.children&&0==n.geometry.height&&0<a)for(n.geometry.height=a,d=0;d<n.children.length;d++)f=n.children[d],f.geometry&&(f.geometry.y+=a);p&&b.createLabelSubShape(g,n);g=b.getRotation();if(0!==g)for(d=n.getGeometry(),k=d.width/2,p=d.height/2,d=0;d<n.getChildCount();d++)f=n.getChildAt(d),h.mxgraph.online.Utils.rotatedGeometry(f.getGeometry(),g,k,p);(function(J,O,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(O)||J.entries[L].key===O){J.entries[L].value=M;return}J.entries.push({key:O,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(c,b.getId()),n);return n};m.rotatedEdgePoint=function(g,b,a,c){b=b*Math.PI/180;var d=Math.cos(b);b=Math.sin(b);var f=g.x-a,k=g.y-c;g.x=Math.round(f*d-k*b+a);g.y=Math.round(k*d+f*b+c)};m.prototype.addVertex=function(g,b,a,c,d){var f="",k=b.isDisplacedLabel()||b.isRotatedLabel();
k||(f=b.getTextLabel());var n=b.getDimensions(),p=b.getStyleFromShape();p.html="1";var x=p.hasOwnProperty(mxConstants.STYLE_SHAPE)||p.hasOwnProperty("stencil");p.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&x||(p[mxConstants.STYLE_FILLCOLOR]="none");x||(p[mxConstants.STYLE_STROKECOLOR]="none");p.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&x||(p[mxConstants.STYLE_GRADIENTCOLOR]="none");p[mxConstants.STYLE_WHITE_SPACE]="wrap";d=b.getOriginPoint(d,!0);return x||null!=f?(p=h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(p,
"="),x=null,x=k?g.insertVertex(a,null,null,Math.floor(Math.round(100*d.x)/100),Math.floor(Math.round(100*d.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),p):g.insertVertex(a,null,f,Math.floor(Math.round(100*d.x)/100),Math.floor(Math.round(100*d.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),p),function(z,E,I){null==z.entries&&(z.entries=[]);for(var J=0;J<z.entries.length;J++)if(null!=z.entries[J].key.equals&&z.entries[J].key.equals(E)||
z.entries[J].key===E){z.entries[J].value=I;return}z.entries.push({key:E,value:I,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(c,b.getId()),x),b.setLabelOffset(x,p),k&&b.createLabelSubShape(g,x),x):null};m.calculateAbsolutePoint=function(g){for(var b=0,a=0;null!=g;){var c=g.geometry;null!=c&&(b+=c.x,a+=c.y);g=g.parent}return new mxPoint(b,a)};m.prototype.processEdgeGeo=function(g,b){try{var a=g.geomList.geomList[0].rows;
for(g=0;g<a.length;g++)if(a[g]instanceof h.mxgraph.io.vsdx.geometry.ArcTo){b.style+="jumpStyle=arc;";break}for(g=0;g<a.length;g++);}catch(c){}};m.prototype.addConnectedEdge=function(g,b,a,c){var d=b.getFromSheet();d=new h.mxgraph.io.vsdx.ShapePageId(a,d);var f=function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.edgeShapeMap,d);if(null==f)return null;
var k=function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.parentsMap,new h.mxgraph.io.vsdx.ShapePageId(a,f.getId()));if(null!=k){var n=g.getModel().getGeometry(k);null!=n&&(c=n.height)}var p=f.getStartXY(c),x=f.getEndXY(c);n=f.getRoutingPoints(c,p,f.getRotation());this.rotateChildEdge(g.getModel(),k,p,x,n);var z=null,E=b.getSourceToSheet();E=null!=
E?function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(a,E)):null;var I=!0;if(null==E||0==E.geometry.width||0==E.geometry.height)E=g.insertVertex(k,null,null,Math.floor(Math.round(100*p.x)/100),Math.floor(Math.round(100*p.y)/100),0,0);else if(E.style&&-1==E.style.indexOf(";rotation=")){z=m.calculateAbsolutePoint(E);
var J=m.calculateAbsolutePoint(k),O=E.geometry;z=new mxPoint((J.x+p.x-z.x)/O.width,(J.y+p.y-z.y)/O.height)}else I=!1;p=null;b=b.getTargetToSheet();b=null!=b?function(M,L){null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)if(null!=M.entries[H].key.equals&&M.entries[H].key.equals(L)||M.entries[H].key===L)return M.entries[H].value;return null}(this.vertexMap,new h.mxgraph.io.vsdx.ShapePageId(a,b)):null;J=!0;null==b||0==b.geometry.width||0==b.geometry.height?b=g.insertVertex(k,null,null,
Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=m.calculateAbsolutePoint(b),p=m.calculateAbsolutePoint(k),O=b.geometry,p=new mxPoint((p.x+x.x-a.x)/O.width,(p.y+x.y-a.y)/O.height)):J=!1;a=f.getStyleFromEdgeShape(c);O=f.getRotation();0!==O?(x=g.insertEdge(k,null,null,E,b,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),I=f.createLabelSubShape(g,x),null!=I&&(I.setStyle(I.getStyle()+";rotation="+(60<O&&240>O?(O+180)%360:O)),
I=I.getGeometry(),I.x=0,I.y=0,I.relative=!0,I.offset=new mxPoint(-I.width/2,-I.height/2))):(x=g.insertEdge(k,null,f.getTextLabel(!0),E,b,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(a,"=")),O=f.getLblEdgeOffset(g.getView(),n),x.getGeometry().offset=O,null!=z&&g.setConnectionConstraint(x,E,!0,new mxConnectionConstraint(z,!1)),I&&n.shift(),null!=p&&g.setConnectionConstraint(x,b,!1,new mxConnectionConstraint(p,!1)),J&&n.pop());I=g.getModel().getGeometry(x);if(E.parent!=b.parent&&null!=k&&1!=k.id&&1==
E.parent.id){b=z=0;do p=k.geometry,null!=p&&(z+=p.x,b+=p.y),k=k.parent;while(null!=k);x.parent=E.parent;for(k=0;k<n.length;k++)n[k].x+=z,n[k].y+=b}I.points=n;a.hasOwnProperty("curved")&&function(M,L){return M&&M.equals?M.equals(L):M===L}(function(M,L){return M[L]?M[L]:null}(a,"curved"),"1")&&(I=g.getModel().getGeometry(x),c=f.getControlPoints(c),I.points=c);this.processEdgeGeo(f,x);f=this.layerIndexToNames(f.layerMember);null!=f&&g.addTagsForCells([x],f);return d};m.prototype.addUnconnectedEdge=function(g,
b,a,c){if(null!=b){var d=g.getModel().getGeometry(b);null!=d&&(c=d.height)}var f=a.getStartXY(c),k=a.getEndXY(c),n=a.getStyleFromEdgeShape(c),p=a.getRoutingPoints(c,f,a.getRotation()),x=a.getRotation();if(0!==x){0===a.getShapeIndex()?d=g.insertEdge(b,null,null,null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(d=g.createEdge(b,null,null,null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),d=g.addEdge(d,b,null,null,a.getShapeIndex()+this.shapeIndexShift++));var z=a.createLabelSubShape(g,
d);null!=z&&(z.setStyle(z.getStyle()+";rotation="+(60<x&&240>x?(x+180)%360:x)),x=z.getGeometry(),x.x=0,x.y=0,x.relative=!0,x.offset=new mxPoint(-x.width/2,-x.height/2))}else 0===a.getShapeIndex()?d=g.insertEdge(b,null,a.getTextLabel(!0),null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(d=g.createEdge(b,null,a.getTextLabel(!0),null,null,h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),d=g.addEdge(d,b,null,null,a.getShapeIndex()+this.shapeIndexShift++)),x=a.getLblEdgeOffset(g.getView(),
p),d.getGeometry().offset=x;this.rotateChildEdge(g.getModel(),b,f,k,p);b=g.getModel().getGeometry(d);p.pop();p.shift();b.points=p;b.setTerminalPoint(f,!0);b.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(E,I){return E&&E.equals?E.equals(I):E===I}(function(E,I){return E[I]?E[I]:null}(n,"curved"),"1")&&(b=g.getModel().getGeometry(d),g=a.getControlPoints(c),b.points=g);this.processEdgeGeo(a,d);return d};m.prototype.rotateChildEdge=function(g,b,a,c,d){if(null!=b){var f=g.getGeometry(b);g=
g.getStyle(b);if(null!=f&&null!=g&&(b=g.indexOf("rotation="),-1<b))for(g=parseFloat(g.substring(b+9,g.indexOf(";",b))),b=f.width/2,f=f.height/2,m.rotatedEdgePoint(a,g,b,f),m.rotatedEdgePoint(c,g,b,f),a=0;a<d.length;a++)m.rotatedEdgePoint(d[a],g,b,f)}};m.prototype.sanitiseGraph=function(g){var b=g.getModel().getRoot();this.sanitiseCell(g,b)};m.prototype.sanitiseCell=function(g,b){for(var a=g.getModel(),c=a.getChildCount(b),d=[],f=0;f<c;f++){var k=a.getChildAt(b,f);this.sanitiseCell(g,k)&&d.push(k)}for(g=
0;g<d.length;g++)a.remove(d[g]);d=b.geometry;null!=d&&(0>d.height&&(d.height=Math.abs(d.height),d.y-=d.height,b.style+=";flipV=1;"),0>d.width&&(d.width=Math.abs(d.width),d.x-=d.width,b.style+=";flipH=1;"));0<c&&(c=a.getChildCount(b));d=(new String(a.getValue(b))).toString();g=a.getStyle(b);return 0!==c||!a.isVertex(b)||null!=a.getValue(b)&&0!==d.length||null==g||-1==g.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==g.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=g.indexOf("image=")?!1:!0};
return m}();A.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(m){function g(b){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(g,m);g.prototype.decodeVssx=function(b,a,c,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(b,function(n){k=k.concat(n);var p=f.vsdxModel.getMasterShapes(),x=function(M){var L=0;return{next:function(){return L<M.length?M[L++]:null},hasNext:function(){return L<M.length}}}(function(M){var L=
[];null==M.entries&&(M.entries=[]);for(var H=0;H<M.entries.length;H++)L.push(M.entries[H].value);return L}(f.vsdxModel.getPages())).next();if(null!=p){var z={str:"",toString:function(){return this.str}},E=0===n.length?"":",",I=function(M){return Object.keys(M).map(function(L){return M[L]})}(p);n=function(M){M=I[M];var L=J.createMxGraph(),H=1;if(null!=M.pageSheet){var K=H=1,P=M.pageSheet.DrawingScale;null!=P&&(H=parseFloat(P.getAttribute("V"))||1);P=M.pageSheet.PageScale;null!=P&&(K=parseFloat(P.getAttribute("V"))||
1);H=K/H}K=!1;for(P=0;null!=M.firstLevelShapes&&P<M.firstLevelShapes.length;P++){var Q=M.firstLevelShapes[P].getShape(),R=new h.mxgraph.io.vsdx.VsdxShape(x,Q,!x.isEdge(Q),p,null,J.vsdxModel);Q=null;if(R.isVertex()){J.edgeShapeMap.entries=[];J.parentsMap.entries=[];Q=J.addShape(L,R,L.getDefaultParent(),0,1169);R=function(V){null==V.entries&&(V.entries=[]);return V.entries}(J.edgeShapeMap);for(var ha=0;ha<R.length;ha++){var X=R[ha],T=function(V,oa){null==V.entries&&(V.entries=[]);for(var ca=0;ca<V.entries.length;ca++)if(null!=
V.entries[ca].key.equals&&V.entries[ca].key.equals(oa)||V.entries[ca].key===oa)return V.entries[ca].value;return null}(J.parentsMap,X.getKey());J.addUnconnectedEdge(L,T,X.getValue(),1169)}}else Q=J.addUnconnectedEdge(L,null,R,1169);K|=null!=Q}if(K){J.scaleGraph(L,H);H=J.normalizeGraph(L);J.sanitiseGraph(L);if(0===L.getModel().getChildCount(L.getDefaultParent()))return"continue";z.str=z.str.concat(E);z.str=z.str.concat('{"xml":"');L=m.prototype.processPage.call(J,L,null);z.str=z.str.concat(L);z.str=
z.str.concat('","w":');z.str=z.str.concat(H.width);z.str=z.str.concat(',"h":');z.str=z.str.concat(H.height);z.str=z.str.concat(',"title":');M=M.getName();null==M&&(M="");M=mxUtils.htmlEntities(JSON.stringify(M));z.str=z.str.concat(M);z.str=z.str.concat("}");E=","}};for(var J=f,O=0;O<I.length;O++)n(O);k=k.concat(z)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(M){null!=d?d(M):a("")}},c)};g.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var c=a.sourcePoint;if(b.isEdge()&&null!=
c){this.transPoint(a.targetPoint,c);this.transPoint(a.offset,c);b=a.points;if(null!=b)for(var d=0;d<b.length;d++)this.transPoint(b[d],c);this.transPoint(c,c)}return a};g.prototype.normalizeGraph=function(b){function a(E){null!=E&&(null==c?(c=E.x,d=E.y,f=E.x+(E.width||0),k=E.y+(E.height||0)):(c=Math.min(E.x,c),d=Math.min(E.y,d),f=Math.max(E.x+(E.width||0),f),k=Math.max(E.y+(E.height||0),k)))}var c,d,f,k,n;for(n in b.model.cells){var p=b.model.cells[n],x=p.geometry;if(null!=x&&1==p.parent.id)if(p.vertex)a(x);
else for(a(x.sourcePoint),a(x.targetPoint),p=x.points,x=0;null!=p&&x<p.length;x++)a(p[x])}var z={x:c,y:d};for(n in b.model.cells)if(p=b.model.cells[n],x=p.geometry,null!=x&&1==p.parent.id&&(x.x-=c,x.y-=d,p.isEdge()))for(this.transPoint(x.sourcePoint,z),this.transPoint(x.targetPoint,z),this.transPoint(x.offset,z),p=x.points,x=0;null!=p&&x<p.length;x++)this.transPoint(p[x],z);return{width:f-c,height:k-d}};g.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};g.prototype.processPage=function(b,
a){var c=b.getModel(),d="",f="";for(p in c.cells){var k=c.cells[p];if(b.getDefaultParent()===c.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=c.getStyle(k);k="";if(null!=f&&
(n=f.indexOf(h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=n)){n+=h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var p=parseInt(f.substring(n,f.indexOf(";",n)));a:{f=this.vertexShapeMap;n=new h.mxgraph.io.vsdx.ShapePageId(a.getId(),p);null==f.entries&&(f.entries=[]);for(var x=0;x<f.entries.length;x++)if(null!=f.entries[x].key.equals&&f.entries[x].key.equals(n)||f.entries[x].key===n){f=f.entries[x].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=
0<d.length?",":"";return d};return g}(h.mxgraph.io.mxVsdxCodec);A.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,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=c;this.y=d}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=
function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();m.Row=g;g.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(c){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var c=parseFloat(a);if(isFinite(c))return c}}catch(d){}return null};b.getRowObj=function(a,c){var d=a.getAttribute("T"),f=b.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=c.length&&(n=c[f-1]);var p=k=c=null,x=null,
z=null,E=null,I=null,J=null;null!=n&&(c=n.x,k=n.y,p=n.getA(),x=n.getB(),z=n.getC(),E=n.getD(),J=n.getFormulaA(),I=n.getFormulaE());a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var O=a[n],M=O.getAttribute("N"),L=O.getAttribute("V");switch(M){case "X":c=b.getDoubleVal(L);break;case "Y":k=b.getDoubleVal(L);break;case "A":p=b.getDoubleVal(L);J=O.getAttribute("V");break;case "B":x=b.getDoubleVal(L);break;case "C":z=b.getDoubleVal(L);break;case "D":E=b.getDoubleVal(L);
break;case "E":I=L}}switch(d){case "MoveTo":return new h.mxgraph.io.vsdx.geometry.MoveTo(f,c,k);case "LineTo":return new h.mxgraph.io.vsdx.geometry.LineTo(f,c,k);case "ArcTo":return new h.mxgraph.io.vsdx.geometry.ArcTo(f,c,k,p);case "Ellipse":return new h.mxgraph.io.vsdx.geometry.Ellipse(f,c,k,p,x,z,E);case "EllipticalArcTo":return new h.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,c,k,p,x,z,E);case "InfiniteLine":return new h.mxgraph.io.vsdx.geometry.InfiniteLine(f,c,k,p,x);case "NURBSTo":return new h.mxgraph.io.vsdx.geometry.NURBSTo(f,
c,k,p,x,z,E,I);case "PolylineTo":return new h.mxgraph.io.vsdx.geometry.PolylineTo(f,c,k,J);case "RelCubBezTo":return new h.mxgraph.io.vsdx.geometry.RelCubBezTo(f,c,k,p,x,z,E);case "RelEllipticalArcTo":return new h.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,c,k,p,x,z,E);case "RelLineTo":return new h.mxgraph.io.vsdx.geometry.RelLineTo(f,c,k);case "RelMoveTo":return new h.mxgraph.io.vsdx.geometry.RelMoveTo(f,c,k);case "RelQuadBezTo":return new h.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,c,k,p,x);case "SplineKnot":return new h.mxgraph.io.vsdx.geometry.SplineKnot(f,
c,k,p);case "SplineStart":return new h.mxgraph.io.vsdx.geometry.SplineStart(f,c,k,p,x,z,E)}}return new h.mxgraph.io.vsdx.geometry.DelRow(f)};return b}();m.RowFactory=g;g.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(){this.colorElementMap={};this.fontElementMap={}}g.__static_initialize=function(){g.__static_initialized||(g.__static_initialized=!0,g.__static_initializer_0())};g.defaultColors_$LI$=function(){g.__static_initialize();null==g.defaultColors&&(g.defaultColors={});return g.defaultColors};g.__static_initializer_0=function(){g.defaultColors_$LI$()["0"]="#000000";g.defaultColors_$LI$()["1"]="#FFFFFF";g.defaultColors_$LI$()["2"]=
"#FF0000";g.defaultColors_$LI$()["3"]="#00FF00";g.defaultColors_$LI$()["4"]="#0000FF";g.defaultColors_$LI$()["5"]="#FFFF00";g.defaultColors_$LI$()["6"]="#FF00FF";g.defaultColors_$LI$()["7"]="#00FFFF";g.defaultColors_$LI$()["8"]="#800000";g.defaultColors_$LI$()["9"]="#008000";g.defaultColors_$LI$()["10"]="#000080";g.defaultColors_$LI$()["11"]="#808000";g.defaultColors_$LI$()["12"]="#800080";g.defaultColors_$LI$()["13"]="#008080";g.defaultColors_$LI$()["14"]="#C0C0C0";g.defaultColors_$LI$()["15"]="#E6E6E6";
g.defaultColors_$LI$()["16"]="#CDCDCD";g.defaultColors_$LI$()["17"]="#B3B3B3";g.defaultColors_$LI$()["18"]="#9A9A9A";g.defaultColors_$LI$()["19"]="#808080";g.defaultColors_$LI$()["20"]="#666666";g.defaultColors_$LI$()["21"]="#4D4D4D";g.defaultColors_$LI$()["22"]="#333333";g.defaultColors_$LI$()["23"]="#1A1A1A"};g.prototype.initialise=function(b,a){if(null!=b){a=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var c=a.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),
d=c.length;for(a=0;a<d;a++){var f=c.item(a),k=f.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(b=a.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),c=b.length,a=0;a<c;a++)k=b.item(a),d=k.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),
this.fontElementMap[d]=k}};g.prototype.getColor=function(b){var a=function(c,d){return c[d]?c[d]:null}(this.colorElementMap,b);return null==a&&(a=function(c,d){return c[d]?c[d]:null}(g.defaultColors_$LI$(),b),null==a)?"":a};g.prototype.getFont=function(b){var a=this.fontElementMap;b=a[b]?a[b]:null;return null==b?"":b};return g}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)}g.prototype.addFromCell=function(b,a){var c=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=
!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,h.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=c&&0!==c.length?parseFloat(c):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=c&&0!==c.length?
parseFloat(c):-1,d=!1);this.findToPart(b,d)};g.prototype.findToPart=function(b,a){b=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);b=null!=b&&0!==b.length?parseFloat(b):-1;a?this.sourceToPart=b:this.targetToPart=b};g.prototype.getFromSheet=function(){return this.fromSheet};g.prototype.getSourceToSheet=function(){return this.sourceToSheet};g.prototype.getTargetToSheet=function(){return this.targetToSheet};g.prototype.getSourceToPart=function(){return this.sourceToPart};g.prototype.getTargetToPart=
function(){return this.targetToPart};g.prototype.addConnect=function(b){this.endShape=b;var a=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(b,a)};return g}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(){}g.SET_VALUES_$LI$=function(){null==g.SET_VALUES&&(g.SET_VALUES=["a","b"]);return g.SET_VALUES};g.MY_SET_$LI$=function(){null==g.MY_SET&&(g.MY_SET=g.SET_VALUES_$LI$().slice(0).slice(0));return g.MY_SET};return g}();m.ANGLE="Angle";m.ARC_TO="ArcTo";m.BACKGROUND="Background";m.BACK_PAGE="BackPage";m.BEGIN_ARROW="BeginArrow";m.BEGIN_ARROW_SIZE="BeginArrowSize";m.BEGIN_X="BeginX";m.BEGIN_Y="BeginY";m.BOTTOM_MARGIN="BottomMargin";
"HideText";m.VSDX_ID="vsdxID";m.CONNECT_TO_PART_WHOLE_SHAPE=3;B.mxVsdxConstants=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=b&&1==b.nodeType||null===b)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),
this.processGeoElem(b);else if((null!=b&&1==b.nodeType||null===b)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(b),this.processGeoElem(b);else throw Error("invalid overload");}g.prototype.getIndex$org_w3c_dom_Element=function(b){try{return parseInt(b.getAttribute("IX"))||0}catch(a){return 0}};g.prototype.getIndex=function(b){if(null!=b&&1==b.nodeType||
null===b)return this.getIndex$org_w3c_dom_Element(b);if(void 0===b)return this.getIndex$();throw Error("invalid overload");};g.prototype.processGeoElem=function(b){var a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell");b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Row");if(null==this.rows){this.rows=[];for(var c=0;c<b.length;c++)this.rows.push(null)}for(c=0;c<a.length;c++){var d=a[c],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=
function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoLine":this.noLine=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoShow":this.noShow=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoSnap":this.noSnap=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,n){return k&&k.equals?k.equals(n):k===n}("1",d)}}a=this.rows.length;c=!1;for(f=0;f<b.length;f++)d=h.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(b[f],
this.rows),d.getIndex()>a?(this.rows.push(d),c=!0):this.rows[d.getIndex()-1]=d;c&&function(k,n){n.compare?k.sort(function(p,x){return n.compare(p,x)}):k.sort(n)}(this.rows,new g.mxVsdxGeometry$0(this))};g.prototype.inheritGeo=function(b){this.noFill=b.noFill;this.noLine=b.noLine;this.noShow=b.noShow;this.noSnap=b.noSnap;this.noQuickDrag=b.noQuickDrag;var a=this.rows=[];a.push.apply(a,b.rows)};g.prototype.getIndex$=function(){return this.index};g.prototype.isNoFill=function(){return this.noFill};g.prototype.isNoLine=
function(){return this.noLine};g.prototype.isNoShow=function(){return this.noShow};g.prototype.isNoSnap=function(){return this.noSnap};g.prototype.isNoQuickDrag=function(){return this.noQuickDrag};g.prototype.getRows=function(){return this.rows};g.prototype.getPathXML=function(b,a){if(this.noShow)return"";for(var c="",d=0;d<this.rows.length;d++){var f=this.rows[d];c=c.concat(null!=f?f.handle(b,a):"")}return c};return g}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(g){var b=
function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){c=null!=c?c.getIndex():0;d=null!=d?d.getIndex():0;return c-d};return a}();g.mxVsdxGeometry$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}g.prototype.addGeometry=function(b){b=new h.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(this.geomList.push(b),this.sortNeeded=!0)};g.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare?
b.sort(function(c,d){return a.compare(c,d)}):b.sort(a)}(this.geomList,new g.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};g.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};g.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};g.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&
!a.isNoLine())return!1}return!0};g.prototype.hasGeom=function(){return 0!=this.geomList.length};g.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};g.prototype.rotatedPoint=function(b,a,c){var d=b.y*a+b.x*c;b.x=b.x*a-b.y*c;b.y=d};g.prototype.getRoutingPoints=function(b,a,c){this.sort();b=[];b.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(!n.isNoShow()){n=n.getRows();for(var p=0;p<n.length;p++){var x=
n[p];if(0==p&&null!=x&&x instanceof h.mxgraph.io.vsdx.geometry.MoveTo)d=null!=x.x?x.x:0,f=null!=x.y?x.y:0;else if(null!=x&&x instanceof h.mxgraph.io.vsdx.geometry.LineTo){var z=null!=x.x?x.x:0;x=null!=x.y?x.y:0;var E=new mxPoint(z,x);0!==c&&(c=(360-c)*Math.PI/180,this.rotatedPoint(E,Math.cos(c),Math.sin(c)));z=(E.x-d)*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();z+=a.x;x=(E.y-f)*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;x+=a.y;z=Math.round(100*z)/100;x=Math.round(100*x)/100;
E.x=z;E.y=x;b.push(E)}}}}return b};g.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),c={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=c.str.length;var f=this.processGeo(b,a,c,-1,!0);f=this.processGeo(b,a,c,f,!1);if(c.str.length===d)return"";this.closePath(c,f);c.str=c.str.concat("</foreground></shape>");return c.str};g.prototype.processGeo=function(b,a,c,d,f){var k=b.getRounding(),n="";0<k&&(n=' rounded="1" arcSize="'+k*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+
'" ');for(k=0;k<this.geomList.length;k++){var p=this.geomList[k];if(f!==p.isNoFill()){var x=p.getPathXML(a,b);0!==x.length&&(p=this.getGeoStyle(p),-1===d?c.str=c.str.concat("<path"+n+">"):d!==p&&(this.closePath(c,d),c.str=c.str.concat("<path"+n+">")),c.str=c.str.concat(x),d=p)}}return d};g.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};g.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):
2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return g}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(g){var b=function(){function a(c){this.__parent=c}a.prototype.compare=function(c,d){return c.getIndex()-d.getIndex()};return a}();g.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com=
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.masterShape=this.Id=null;this.childShapes={};this.master=b;this.Id=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}g.prototype.processMasterShapes=function(b){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(a.nodeName,"Rel")){var c=b.getRelationship(a.getAttribute("r:id"),h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),
d=c.getAttribute("Target");c=c.getAttribute("Type");var f=null;null!=c&&function(k,n){var p=k.length-n.length;k=k.indexOf(n,p);return-1!==k&&k===p}(c,"master")&&(f=b.getXmlDoc(h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(d.nodeName,"MasterContents")){this.processMasterShape(d,b);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},
d=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),c=0;c<d.length;c++)this.pageSheet[d[c].getAttribute("N")]=d[c];a=a.nextSibling}};g.prototype.processMasterShape=function(b,a,c){c||(this.firstLevelShapes=[]);for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(b.nodeName,"Shapes"))for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(p,x){return p&&p.equals?p.equals(x):p===x}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),
n=new h.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?n:this.masterShape;this.childShapes[k]=n;c||this.firstLevelShapes.push(n);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=b&&1==b.nodeType&&"Connects"==b.nodeName)for(this.connects={},d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new h.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;b=b.nextSibling}};g.prototype.getMasterShape=function(){return this.masterShape};
g.prototype.getSubShape=function(b){var a=this.childShapes;return a[b]?a[b]:null};g.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};g.prototype.getName=function(){return this.master.getAttribute("Name")||""};g.prototype.getUniqueID=function(){var b="";this.master.hasAttribute("UniqueID")&&(b=this.master.getAttribute("UniqueID"));return b};g.prototype.getId=function(){return this.Id};g.prototype.getMasterElement=function(){return this.master};return g}();B.mxVsdxMaster=
m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a,c){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=c;for(b=b.firstChild;null!=b;){if(a=null!=b&&1==b.nodeType)a=b.tagName.toLowerCase(),c=h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(c):a===c;if(a){this.rootElement=b;break}b=b.nextSibling}this.pm=new h.mxgraph.io.vsdx.mxPropertiesManager;
this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}g.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var b=!0,a=1;b;){var c=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"a:theme")){c=new h.mxgraph.io.vsdx.mxVsdxTheme(c);0>
c.getThemeIndex()&&c.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k)return f.entries[n].value;return null}(this.themes,c.getThemeIndex());null!=d&&d.isPure()||function(f,k,n){null==f.entries&&(f.entries=[]);for(var p=0;p<f.entries.length;p++)if(null!=f.entries[p].key.equals&&f.entries[p].key.equals(k)||f.entries[p].key===k){f.entries[p].value=n;return}f.entries.push({key:k,
value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,c.getThemeIndex(),c);break}c=c.nextSibling}a++}else b=!1}};g.prototype.initStylesheets=function(){var b=this.rootElement.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<b.length){b=b.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=b.length,c=0;c<a;c++){var d=b.item(c),f=d.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new h.mxgraph.io.vsdx.Style(d,
this);this.stylesheets[f]=d}}for(b=function(k){var n=0;return{next:function(){return n<k.length?k[n++]:null},hasNext:function(){return n<k.length}}}(function(k){return Object.keys(k).map(function(n){return k[n]})}(this.stylesheets));b.hasNext();)d=b.next(),d.stylesheetRefs(this)};g.prototype.initMasters=function(){if(null!=this.xmlDocs){var b=function(c,d){return c[d]?c[d]:null}(this.xmlDocs,h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=
b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,h.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(c,d){return c&&c.equals?c.equals(d):c===d}(b.tagName,"Master")){var a=new h.mxgraph.io.vsdx.mxVsdxMaster(b,this);this.masters[a.getId()]=a}b=b.nextSibling}break}b=b.nextSibling}}};g.prototype.initPages=function(){if(null!=this.xmlDocs){var b=function(k,n){return k[n]?k[n]:null}(this.xmlDocs,h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+
"/pages/pages.xml");if(null!=b)for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(k,n){return k&&k.equals?k.equals(n):k===n}(b.tagName,h.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};b={};for(var c=a.length,d=0;d<c;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&
k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})}(b,f.getId(),f);(function(k,n,p){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&k.entries[x].key.equals(n)||k.entries[x].key===n){k.entries[x].value=p;return}k.entries.push({key:n,value:p,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,
f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(c=0;c<a.length;c++)f=a[c].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(b,d),f.setBackPage(d))}break}b=b.nextSibling}}};g.prototype.getPages=function(){return this.pages};g.prototype.getThemes=function(){return this.themes};
g.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};g.prototype.getRelationship=function(b,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==b||0===b.length)return null;a=a.getElementsByTagName("Relationship");for(var c=0;c<a.length;c++){var d=a.item(c);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),
b))return d}return null};g.prototype.getMaster=function(b){var a=this.masters;return a[b]?a[b]:null};g.prototype.createPage=function(b){return new h.mxgraph.io.vsdx.mxVsdxPage(b,this)};g.prototype.getPropertiesManager=function(){return this.pm};g.prototype.setPropertiesManager=function(b){this.pm=b};g.prototype.getMasterShapes=function(){return this.masters};g.prototype.setMasterShapes=function(b){this.masters=b};g.prototype.getStylesheet=function(b){var a=this.stylesheets;return a[b]?a[b]:null};
g.prototype.getXmlDoc=function(b){var a=this.xmlDocs;return a[b]?a[b]:null};g.prototype.getMedia=function(b){var a=this.media;return a[b]?a[b]:null};return g}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=b;this.layers=[];var c=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=c)d=h.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=c&&c.equals?c.equals(d):c===d;this.__isBackground=
d?!0:!1;c=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=c&&0<c.length&&(this.backPageId=parseFloat(c));this.Id=parseFloat(b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"PageSheet");if(0<c.length){c=c[0];d=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,
"Cell");for(var f=0;f<d.length;f++){var k=d[f],n=k.getAttribute("N");this.cellElements[n]=k}c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Section");for(d=0;d<c.length;d++)if(f=c[d],n=f.getAttribute("N"),"Layer"==n)for(n=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<n.length;f++){k=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n[f],"Cell");for(var p={},x=0;x<k.length;x++)p[k[x].getAttribute("N")]=k[x].getAttribute("V");null==p.Name&&(p.Name="Layer "+
f);this.layers[parseInt(n[f].getAttribute("IX"))]=p}}this.parseNodes(b,a,"pages")}g.prototype.parseNodes=function(b,a,c){for(var d=b.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"Connects"))for(f=f.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var n=new h.mxgraph.io.vsdx.mxVsdxConnect(k),p=n.getFromSheet();this.connectsMap[p]=
!0;p=null!=p&&-1<p?function(x,z){null==x.entries&&(x.entries=[]);for(var E=0;E<x.entries.length;E++)if(null!=x.entries[E].key.equals&&x.entries[E].key.equals(z)||x.entries[E].key===z)return x.entries[E].value;return null}(this.connects,p):null;null!=p?p.addConnect(k):function(x,z,E){null==x.entries&&(x.entries=[]);for(var I=0;I<x.entries.length;I++)if(null!=x.entries[I].key.equals&&x.entries[I].key.equals(z)||x.entries[I].key===z){x.entries[I].value=E;return}x.entries.push({key:z,value:E,getKey:function(){return this.key},
getValue:function(){return this.value}})}(this.connects,n.getFromSheet(),n)}f=f.nextSibling}}d=d.nextSibling}for(d=b.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"Rel")?this.resolveRel(f,a,c):function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(x,z){return x&&x.equals?x.equals(z):x===z}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};g.prototype.resolveRel=function(b,
a,c){c=a.getRelationship(b.getAttribute("r:id"),h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+c+".xml.rels");b=c.getAttribute("Target");c=c.getAttribute("Type");if(function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}((new String(c)).toString(),"page")){var d=null;null!=c&&function(f,k){var n=f.length-k.length;f=f.indexOf(k,n);return-1!==f&&f===n}(c,"page")&&(d=a.getXmlDoc(h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+b));if(null!=d)for(c=d.firstChild;null!=c;){if(null!=
c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.tagName,"PageContents")){d=b.indexOf(".");-1!==d&&this.parseNodes(c,a,b.substring(0,d));break}c=c.nextSibling}}};g.prototype.parseShapes=function(b,a,c){c={};b=b.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(b=null!=b&&0<b.length?b.item(0):null;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f=a;if(null==f){var k=d.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==k||function(p,x){return p&&p.equals?
p.equals(x):p===x}(k,"")||(f=this.model.getMaster(k))}var n=this.isEdge(d);n||null==f||(k=d.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),n=f.getMasterElement(),null==k||function(p,x){return p&&p.equals?p.equals(x):p===x}(k,"")||(k=f.getSubShape(k),n=null!=k?k.getShape():n),n=this.isEdge(n));d=this.createCell(d,!n,f);(function(p,x,z){null==p.entries&&(p.entries=[]);for(var E=0;E<p.entries.length;E++)if(null!=p.entries[E].key.equals&&p.entries[E].key.equals(x)||p.entries[E].key===x){p.entries[E].value=
z;return}p.entries.push({key:x,value:z,getKey:function(){return this.key},getValue:function(){return this.value}})})(c,d.getId(),d)}b=b.nextSibling}return c};g.prototype.createCell=function(b,a,c){return new h.mxgraph.io.vsdx.VsdxShape(this,b,a,this.model.getMasterShapes(),c,this.model)};g.prototype.isEdge=function(b){if(null!=b&&(b=b.childNodes,null!=b))for(b=b.item(0);null!=b;){if(null!=b&&1==b.nodeType){var a=b;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),
function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginX")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"BeginY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndY")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"EndX")))return!0}b=b.nextSibling}return!1};g.prototype.getPageDimensions=function(){var b=0,a=0,c=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageWidth");null!=c&&(b=parseFloat(c.getAttribute("V"))*
h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),b=Math.round(100*b)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,b)};g.prototype.getDrawingScale=function(){var b=this.cellElements;b=b.DrawingScale?b.DrawingScale:null;return null!=b?parseFloat(b.getAttribute("V"))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};g.prototype.getPageScale=function(){var b=this.cellElements;b=b.PageScale?
b.PageScale:null;return null!=b?parseFloat(b.getAttribute("V"))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};g.prototype.getCellValue=function(b){var a=this.cellElements;b=a[b]?a[b]:null;return null!=b?b.getAttribute("V")||"":null};g.prototype.getCellIntValue=function(b,a){b=this.getCellValue(b);return null!=b?parseInt(b):a};g.prototype.getId=function(){return this.Id};g.prototype.getPageName=function(){return this.pageName};g.prototype.getPageNameU=function(){return this.pageNameU};g.prototype.getShapes=
function(){return this.shapes};g.prototype.getLayers=function(){return this.layers};g.prototype.getConnects=function(){return this.connects};g.prototype.isBackground=function(){return this.__isBackground};g.prototype.getBackPageId=function(){return this.backPageId};g.prototype.setBackPage=function(b){this.backPage=b};g.prototype.getBackPage=function(){return this.backPage};return g}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||
(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var c=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f}};return c(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new h.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new h.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new h.mxgraph.io.vsdx.theme.LineStyle;this.fillStyles=
[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantLineIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));
return f};return c(a)}([4,4]);this.variantEffectIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.variantFontIdx=function(a){var c=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(c(d.slice(1)));return f};return c(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=b;this.name=b.getAttribute("name")||"";b=function(a,c){return a[c]?a[c]:
null}(g.themesIds_$LI$(),this.name);null!=b&&(this.themeIndex=b)}g.__static_initialize=function(){g.__static_initialized||(g.__static_initialized=!0,g.__static_initializer_0(),g.__static_initializer_1())};g.themesIds_$LI$=function(){g.__static_initialize();null==g.themesIds&&(g.themesIds={});return g.themesIds};g.__static_initializer_0=function(){g.themesIds_$LI$().Office=33;g.themesIds_$LI$().Linear=34;g.themesIds_$LI$().Zephyr=35;g.themesIds_$LI$().Integral=36;g.themesIds_$LI$().Simple=37;g.themesIds_$LI$().Whisp=
38;g.themesIds_$LI$().Daybreak=39;g.themesIds_$LI$().Parallel=40;g.themesIds_$LI$().Sequence=41;g.themesIds_$LI$().Slice=42;g.themesIds_$LI$().Ion=43;g.themesIds_$LI$().Retrospect=44;g.themesIds_$LI$().Organic=45;g.themesIds_$LI$().Bubble=46;g.themesIds_$LI$().Clouds=47;g.themesIds_$LI$().Gemstone=48;g.themesIds_$LI$().Lines=49;g.themesIds_$LI$().Facet=50;g.themesIds_$LI$().Prominence=51;g.themesIds_$LI$().Smoke=52;g.themesIds_$LI$().Radiance=53;g.themesIds_$LI$().Shade=54;g.themesIds_$LI$().Pencil=
55;g.themesIds_$LI$().Pen=56;g.themesIds_$LI$().Marker=57;g.themesIds_$LI$().Whiteboard=58};g.colorIds_$LI$=function(){g.__static_initialize();null==g.colorIds&&(g.colorIds={});return g.colorIds};g.__static_initializer_1=function(){(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),
0,"dk1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),1,"lt1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===
a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),2,"accent1");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),3,"accent2");
(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),4,"accent3");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=
c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),5,"accent4");(function(b,a,c){null==b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),6,"accent5");(function(b,a,c){null==
b.entries&&(b.entries=[]);for(var d=0;d<b.entries.length;d++)if(null!=b.entries[d].key.equals&&b.entries[d].key.equals(a)||b.entries[d].key===a){b.entries[d].value=c;return}b.entries.push({key:a,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(g.colorIds_$LI$(),7,"accent6")};g.prototype.getThemeIndex=function(){return this.themeIndex};g.prototype.setVariant=function(b){this.themeVariant=b};g.prototype.isPure=function(){return this.__isPure};g.prototype.processTheme=
function(){if(!this.isProcessed){try{for(var b=this.theme.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.nodeName,"a:themeElements"))for(var a=b.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var c=a,d=c.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processColors(c)):function(f,k){return f&&f.equals?
f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFonts(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,c.getAttribute("name"))||(this.__isPure=!1),this.processFormats(c)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(c)}a=a.nextSibling}b=b.nextSibling}}catch(f){}this.isProcessed=
!0}};g.prototype.processExtras=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b[a]);switch(c.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=c.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "a:fillStyleLst":f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var k=0;k<f.length;k++)this.connFillStyles.push(h.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new h.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(k=0;k<f.length;k++)this.connLineStylesExt.push(new h.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new h.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(d=0;d<c.length;d++)switch(f=c[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);
break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),f=d=0;f<c.length;f++){k=c[f];this.variantEmbellishment[d]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var n=0,p=0;p<k.length;p++){var x=k[p];this.variantFillIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,
"fillIdx");this.variantLineIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"lineIdx");this.variantEffectIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"effectIdx");this.variantFontIdx[d][n]=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"fontIdx");n++}d++}}}};g.prototype.fillFontStyles=function(b,a,c){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var d=0;d<b.length;d++){var f=
b[d];c.push(h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};g.prototype.processFormats=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0;a<b.length;a++){var c=b[a];switch(c.nodeName){case "a:fillStyleLst":c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);
for(var d=0;d<c.length;d++)this.fillStyles.push(h.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(c[d]));break;case "a:lnStyleLst":for(c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c),d=0;d<c.length;d++)this.lineStyles.push(new h.mxgraph.io.vsdx.theme.LineStyle(c[d]))}}};g.prototype.processFonts=function(b){};g.prototype.processColors=function(b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var a=b,c=a.nodeName;a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=
(d=c)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(c=c.substring(2),0<a.length&&this.addBasicColor(c,a[0]))}b=b.nextSibling}};g.prototype.addVariantColors=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);if(null!=b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(var a=0,c=0;c<b.length;c++){var d=b[c];this.addVariantColorsSet(a++,d)}}};g.prototype.addVariantColorsSet=
function(b,a){var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[b]=a.hasAttribute("monotone");for(a=0;a<c.length;a++){var d=c[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[b][0]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[b][1]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor3":this.variantsColors[b][2]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[b][3]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[b][4]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor6":this.variantsColors[b][5]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[b][6]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};g.prototype.addBkgndColor=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.bkgndColor=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b)))};
g.prototype.extractThemeIndex=function(b){b=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(b);null!=b&&(this.themeIndex=parseInt(b.getAttribute("schemeEnum")))};g.prototype.addBasicColor=function(b,a){this.baseColors[b]=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};g.prototype.getSchemeColor=function(b){this.processTheme();var a=this.baseColors;b=a[b]?a[b]:null;return null!=b?b.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};g.prototype.getStyleColor=function(b){this.processTheme();
if(8>b){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(g.colorIds_$LI$(),b));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===b){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var c=0;200<=b?c=b-200:
100<=b&&(c=b-100);0<=c&&6>=c&&(a=this.variantsColors[this.themeVariant][c]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};g.prototype.getFillGraientColor=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!0)};g.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,!1)};g.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=
function(b,a){this.processTheme();var c=b.getQuickStyleFillColor(),d=null;switch(b.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[b.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(c=100),d=b.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof h.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(c,this).getGradientClr():null:
d.applyStyle(c,this):a?null:this.getStyleColor(c);c=b.getQuickStyleVariation();if(null!=a&&0<(c&8)){c=this.getStyleColor(8).toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);d=b.toHsl();var f=a.toHsl();.1666<=Math.abs(c.getLum()-f.getLum())||(.7292>=c.getLum()?a=new h.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(c.getLum()-d.getLum())>Math.abs(c.getLum()-f.getLum())&&(a=b))}return a};g.prototype.getFillColor=function(b,a){if(!(null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||
null===b)||"boolean"!==typeof a&&null!==a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(b,a)};g.prototype.getLineStyle=function(b,a){this.processTheme();var c=null;switch(b){case 1:case 2:case 3:case 4:case 5:case 6:c=a[b-1];break;case 100:case 101:case 102:case 103:c=a===this.lineStyles?
this.lineStyles[this.variantLineIdx[this.themeVariant][b-100]-1]:this.defaultLineStyle}return c};g.prototype.getLineStyleExt=function(b,a){this.processTheme();var c=null;switch(b){case 0:case 1:case 2:case 3:case 4:case 5:case 6:c=a[b]}return c};g.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleLineColor();a=this.getLineStyle(b.getQuickStyleLineMatrix(),a);switch(b.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(c=100)}c=null!=a?a.getLineColor(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();b=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var d=b.toHsl(),f=c.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?c=new h.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(c=b))}return c};g.prototype.getLineColor=function(b,a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||
null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};g.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};
g.prototype.getConnLineColor=function(b){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};g.prototype.getDefaultLineClr=function(){return this.defaultLineClr};g.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.isDashed():
!1};g.prototype.isLineDashed=function(b,a,c){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,a,c);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");
};g.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};g.prototype.isConnLineDashed=function(b){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.connLineStylesExt,this.connLineStyles)};g.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=
function(b,a,c){a=this.getLineStyleExt(b.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();b=this.getLineStyle(b.getQuickStyleLineMatrix(),c);return null!=b?b.getLineDashPattern():null};g.prototype.getLineDashPattern=function(b,a,c){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a)&&(null!=c&&c instanceof Array||null===c))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,
a,c);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a&&void 0===c)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};g.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,this.lineStylesExt,this.lineStyles)};g.prototype.getConnLineDashPattern=function(b){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(b,
this.connLineStylesExt,this.connLineStyles)};g.prototype.getArrowSize=function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStartSize():c.getEndSize();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStartSize():b.getEndSize():4};g.prototype.getStartSize=function(b){return this.getArrowSize(b,!0,this.lineStylesExt,this.lineStyles)};g.prototype.getConnStartSize=function(b){return this.getArrowSize(b,!0,this.connLineStylesExt,this.connLineStyles)};
g.prototype.getEndSize=function(b){return this.getArrowSize(b,!1,this.lineStylesExt,this.lineStyles)};g.prototype.getConnEndSize=function(b){return this.getArrowSize(b,!1,this.connLineStylesExt,this.connLineStyles)};g.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(b,a){this.processTheme();var c=b.getQuickStyleFontColor(),d=null;switch(b.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[b.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(c=100),d=b.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}c=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(c,this):this.getStyleColor(c);if(0<(b.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=c.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var k=a.toHsl();b=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);var n=b.toHsl();.1666<=Math.abs(d.getLum()-
f.getLum())||(.7292>=d.getLum()?c=new h.mxgraph.io.vsdx.theme.Color(255,255,255):(n=Math.abs(d.getLum()-n.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(n,k,d),d==n?c=b:d==k&&(c=a)))}return c};g.prototype.getFontColor=function(b,a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof
h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);throw Error("invalid overload");};g.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.fontColors)};g.prototype.getConnFontColor=function(b){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connFontColors)};g.prototype.getArrowType=
function(b,a,c,d){c=this.getLineStyleExt(b.getQuickStyleLineMatrix(),c);if(null!=c)return a?c.getStart():c.getEnd();b=this.getLineStyle(b.getQuickStyleLineMatrix(),d);return null!=b?a?b.getStart():b.getEnd():0};g.prototype.getEdgeMarker=function(b,a){return this.getArrowType(a,b,this.lineStylesExt,this.lineStyles)};g.prototype.getConnEdgeMarker=function(b,a){return this.getArrowType(a,b,this.connLineStylesExt,this.connLineStyles)};g.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=
function(b,a){b=this.getLineStyle(b.getQuickStyleLineMatrix(),a);return null!=b?b.getLineWidth():0};g.prototype.getLineWidth=function(b,a){if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,a);if((null!=b&&b instanceof h.mxgraph.io.vsdx.theme.QuickStyleVals||null===b)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(b);
throw Error("invalid overload");};g.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.lineStyles)};g.prototype.getConnLineWidth=function(b){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(b,this.connLineStyles)};return g}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io=
{}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(){}g.conversionFactor_$LI$=function(){null==g.conversionFactor&&(g.conversionFactor=g.screenCoordinatesPerCm*g.CENTIMETERS_PER_INCHES);return g.conversionFactor};g.getDirectChildNamedElements=function(b,a){var c=[];for(b=b.firstChild;null!=b;b=b.nextSibling){var d;if(d=null!=b&&1==b.nodeType){d=a;var f=b.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&c.push(b)}return c};g.getDirectChildElements=function(b){var a=[];for(b=
b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&a.push(b);return a};g.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};g.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,c){try{var d=b.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return c};g.getIntAttr=function(b,a,c){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof c&&null!==c){if((null==
b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==c)throw Error("invalid overload");return h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,c)};g.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return g.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};g.getStyleString=function(b,a){for(var c="",d=function(p){var x=0;return{next:function(){return x<
p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(function(p){return Object.keys(p).map(function(x){return p[x]})}(b)),f=function(p){var x=0;return{next:function(){return x<p.length?p[x++]:null},hasNext:function(){return x<p.length}}}(Object.keys(b));f.hasNext();){var k=f.next(),n=d.next();if(!function(p,x){return p&&p.equals?p.equals(x):p===x}(k,mxConstants.STYLE_SHAPE)||!function(p,x,z){void 0===z&&(z=0);return p.substr(z,x.length)===x}(b[k]?b[k]:null,"image")&&!function(p,x,z){void 0===
z&&(z=0);return p.substr(z,x.length)===x}(b[k]?b[k]:null,"rounded="))try{c=c+k+a}catch(p){}c=c+n+";"}return c};g.surroundByTags=function(b,a,c){return"<"+a+(c?' style="'+c+'"':"")+">"+b+"</"+a+">"};g.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&amp;").replace(RegExp('"',"g"),"&quot;").replace(RegExp("'","g"),"&prime;").replace(RegExp("<","g"),"&lt;").replace(RegExp(">","g"),"&gt;")};g.toInitialCapital=function(b){b=b.split(" ");for(var a="",c=0;c<b.length;c++){var d=b[c],f=d.substring(0,
1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};g.toSmallCaps=function(b,a){var c="",d=c;if(a&&a.equals?a.equals(d):a===d)c=b;else for(b=b.split(""),d=0;d<b.length;d++){var f=b[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),c+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):c+=f}return c};g.getStyleMap=function(b,
a){var c={};b=b.split(";");for(var d=0;d<b.length;d++){var f=b[d],k=f.indexOf(a),n=f.substring(0,k);f=f.substring(k+1);c[n]=f}return c};g.isInsideTriangle=function(b,a,c,d,f,k,n,p){var x=(b-f)*(d-k)-(c-f)*(a-k);f=(b-n)*(k-p)-(f-n)*(a-p);b=(b-c)*(p-d)-(n-c)*(a-d);return!((0>x||0>f||0>b)&&(0<x||0<f||0<b))};return g}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a,c,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(b);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=c}g.prototype.addText=function(b,a,c){this.values.push(b);this.charIndices.push(a);this.fields.push(c)};g.prototype.getParagraphIndex=function(){return this.paraIndex};g.prototype.getValue=function(b){return this.values[b]};g.prototype.numValues=
function(){return this.values.length};g.prototype.getChar=function(b){return this.charIndices[b]};g.prototype.getField=function(b){return this.fields[b]};return g}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b){this.elem=b}g.prototype.getIndexedCell=function(b,a){for(var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("IX");if(function(x,z){return x&&x.equals?x.equals(z):x===z}(k,b)||null==b){f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var n=0;n<f.length;n++){var p=f[n];k=p.getAttribute("N");if(function(x,z){return x&&
x.equals?x.equals(z):x===z}(k,a))return p}}}return null};return g}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.pageNumber=0;this.pageNumber=b;this.Id=a}g.prototype.getId=function(){return this.Id};g.prototype.getPageNumber=function(){return this.pageNumber};g.prototype.equals=function(b){return null==b||this.constructor!==b.constructor||this.pageNumber!==b.pageNumber||this.Id!==b.Id?!1:!0};g.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return g}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(A.vsdx||
(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=c;this.blue=d}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue};
b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,Math.min(c,d)),n=(f+k)/2;if(f===k)a=k=0;else{var p=f-k;k=.5<n?p/(2-f-k):p/(f+k);a=(f===a?(c-d)/p+(c<d?6:0):f===c?(d-a)/p+2:(a-c)/p+4)/6}return new h.mxgraph.io.vsdx.theme.HSLColor(a,k,n)};b.prototype.toHsv=function(){var a=this.getRed()/255,c=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(c,d)),k=Math.min(a,
Math.min(c,d)),n=f-k;a=f===k?0:(f===a?(c-d)/n+(c<d?6:0):f===c?(d-a)/n+2:(a-c)/n+4)/6;return new h.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:n/f,f)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var c=this.green.toString(16);c=1==c.length?"0"+c:c;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+c+d};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr=
function(a){this.gradientClr=a};return b}();m.Color=g;g.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.getFillStyle=function(a){var c=null;switch(a.nodeName){case "a:solidFill":c=new h.mxgraph.io.vsdx.theme.SolidFillStyle(h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":c=new h.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":c=new h.mxgraph.io.vsdx.theme.GradFill(a)}return c};return b}();m.FillStyleFactory=
g;g.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.color2=this.color1=null;a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=h.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-
1]))));null==this.color1&&(this.color1=this.color2=new h.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,c){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c));return d};return b}();m.GradFill=g;g.__class="com.mxgraph.io.vsdx.theme.GradFill";g.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=c;this.lum=d}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,c,d){0>d&&(d+=1);1<d&&--d;return d<1/6?
a+6*(c-a)*d:.5>d?c:d<2/3?a+(c-a)*(2/3-d)*6:a};b.prototype.toRgb=function(){var a=this.hue;var c=this.sat;var d=this.lum;if(0===c)d=c=a=d;else{var f=.5>d?d*(1+c):d+c-d*c,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);c=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new h.mxgraph.io.vsdx.theme.Color(255*d|0,255*c|0,255*a|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*=
a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();m.HSLColor=g;g.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d){this.h=a;this.s=c;this.v=d}b.prototype.toRgb=function(){var a=6*this.h,c=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-c);var k=this.v*(1-f*c);c=this.v*(1-(1-f)*c);d=(d|0)%6;return new h.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,c,this.v][d]|0,255*[c,this.v,this.v,k,a,a][d]|0,255*[a,a,c,this.v,this.v,k][d]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=
1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();m.HSVColor=g;g.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx=
{}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=
this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var c=a.getAttribute("cap");if(null!=c)switch(c){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}c=
a.getAttribute("cmpd");if(null!=c)switch(c){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<c.length;d++){var f=c[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=
h.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);
this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var n=f[k],p=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,
"d");n=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"sp");this.lineDashPattern.push(p/1E4);this.lineDashPattern.push(n/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,
"w");this.headEndLen=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=
null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}b.prototype.getLineEndType=function(a){var c=null;switch(a.getAttribute("type")){case "none":c=
b.LineEndType.NONE;break;case "triangle":c=b.LineEndType.TRIANGLE;break;case "stealth":c=b.LineEndType.STEALTH;break;case "diamond":c=b.LineEndType.DIAMOND;break;case "oval":c=b.LineEndType.OVAL;break;case "arrow":c=b.LineEndType.ARROW}return c};b.prototype.getLineColor=function(a,c){return null!=this.fillStyle?this.fillStyle.applyStyle(a,c):c.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=
function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();m.LineStyle=g;g.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";
a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(b.CompoundLineType||(b.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(b.LineEndType||(b.LineEndType={}))})(g=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,
"startSize");this.end=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=h.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=h.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}b.prototype.getRndg=function(){return this.rndg};b.prototype.getStart=function(){return this.start};b.prototype.getStartSize=
function(){return this.startSize};b.prototype.getEnd=function(){return this.end};b.prototype.getEndSize=function(){return this.endSize};b.prototype.isDashed=function(){return 1<this.pattern};b.prototype.getLineDashPattern=function(){return this.lineDashPattern};return b}();m.LineStyleExt=g;g.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.prototype.applyStyle=function(a,c){return h.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return b}();m.NoFillStyle=g;g.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";g.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}b.prototype.calcColor=
function(a,c){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};b.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,c){if(this.isDynamic||!this.isInitialized)this.calcColor(a,c),this.isInitialized=!0;return this.color};b.prototype.getColor=function(a,c){if("number"!==typeof a&&null!==a||
!(null!=c&&c instanceof h.mxgraph.io.vsdx.mxVsdxTheme||null===c)){if((null!=a&&a instanceof h.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===c)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};b.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};b.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};b.prototype.setShade=
function(a){this.shade=a;this.hasEffects=!0};b.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};b.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};b.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};b.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};b.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};b.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};b.prototype.setHue=function(a){this.hue=a;this.hasEffects=
!0};b.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};b.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};b.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};b.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};b.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};b.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};b.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};b.prototype.setLumMod=function(a){this.lumMod=
a;this.hasEffects=!0};b.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};b.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};b.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};b.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};b.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};b.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};b.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};b.prototype.setBlueOff=
function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};b.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};b.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return b}();m.OoxmlColor=g;g.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(){}b.getOoxmlColor=function(a){var c=null;switch(a.nodeName){case "a:scrgbClr":c=new h.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":c=new h.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":c=new h.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),
parseInt(a.getAttribute("lum")));break;case "a:sysClr":c=new h.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":c=new h.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":c=new h.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":c.setTint(k);break;
case "a:shade":c.setShade(k);break;case "a:satMod":c.setSatMod(k);break;case "a:lumMod":c.setLumMod(k);break;case "a:hueMod":c.setHueMod(k)}}return c};return b}();m.OoxmlColorFactory=g;g.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a,c,d,f,k,n,p,x,z,E){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=c;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=
n;this.quickStyleLineMatrix=p;this.quickStyleShadowColor=x;this.quickStyleType=z;this.quickStyleVariation=E}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};
b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor=
function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType=
function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();m.QuickStyleVals=g;g.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,c){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,c)};return b}();m.SolidFillStyle=g;g.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";g.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";A.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(){function m(){}m.getRotatedPoint=function(g,b,a,c){var d=g.x-c.x;g=g.y-c.y;return new mxPoint(d*b-g*a+c.x,g*b+d*a+c.y)};m.rotatedGeometry=function(g,b,a,c){b=b*Math.PI/180;var d=Math.cos(b);b=Math.sin(b);var f=g.getCenterX()-a,k=g.getCenterY()-c;g.x=Math.round(f*d-k*b+a-g.width/2);g.y=Math.round(k*d+f*b+c-g.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";A.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(h.mxgraph||
(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),n=Math.floor(Math.round(d.getLastX()*k)/100),p=Math.floor(Math.round(d.getLastY()*f)/100);c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var x=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();x=f-x;var z=
this.a*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(c-n);p=Math.abs(x-p);n=p=.5*z+(n*n+p*p)/(8*z);var E=Math.abs(p);p=Math.round(100*p/k*100)/100;n=Math.round(100*n/f*100)/100;c=Math.round(100*c/k*100)/100;x=Math.round(100*x/f*100)/100;z=Math.round(100*z)/100;p=Math.abs(p);n=Math.abs(n);f=0>z?"1":"0";z=E<Math.abs(z)?"1":"0";d.setLastX(c);d.setLastY(x);return'<arc rx="'+(new String(p)).toString()+'" ry="'+(new String(n)).toString()+'" x="'+(new String(c)).toString()+'" y="'+(new String(x)).toString()+
'" x-axis-rotation="0" large-arc-flag="'+z+'" sweep-flag="'+f+'"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.ArcTo=g;g.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){return b.call(this,c,null,null)||this}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.DelRow=g;g.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=d.getHeight();var f=d.getWidth(),k=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=c-d;var n=this.a*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
p=this.b*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=c-p;var x=this.c*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),z=this.d*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.abs(n-k);p=Math.abs(p-d);p=Math.sqrt(n*n+p*p);x=Math.abs(x-k);z=Math.abs(c-z-d);k=100*k/f;z=Math.round(100*Math.sqrt(x*x+z*z)/c/2*100)/100;f=Math.round(100*p/f/2*100)/100;x=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;c=Math.round(100*d/c*100)/100;return'<move x="'+(new String(x)).toString()+
'" y="'+(new String(c)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(z)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(z)).toString()+'" x="'+(new String(x)).toString()+'" y="'+(new String(c)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.Ellipse=
g;g.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,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();c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var p=this.a*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
x=this.b*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),z=this.c,E=this.d;c=100*c/k;n=100*n/f;var I=d.getLastX()*k/100,J=d.getLastY()*f/100,O=c*k/100,M=n*f/100,L=f-x,H=-z;z=Math.sqrt(I*I+J*J)*Math.cos(Math.atan2(J,I)-H);x=Math.sqrt(I*I+J*J)*Math.sin(Math.atan2(J,I)-H);var K=Math.sqrt(O*O+M*M)*Math.cos(Math.atan2(M,O)-H),P=Math.sqrt(O*O+M*M)*Math.sin(Math.atan2(M,O)-H),Q=Math.sqrt(p*p+L*L)*Math.cos(Math.atan2(L,p)-H),R=Math.sqrt(p*p+L*L)*Math.sin(Math.atan2(L,p)-H),ha=((z-K)*(z+K)*(P-R)-(K-
Q)*(K+Q)*(x-P)+E*E*(x-P)*(P-R)*(x-R))/(2*((z-K)*(P-R)-(K-Q)*(x-P))),X=((z-K)*(K-Q)*(z-Q)/(E*E)+(K-Q)*(x-P)*(x+P)-(z-K)*(P-R)*(P+R))/(2*((K-Q)*(x-P)-(z-K)*(P-R))),T=z-ha,V=x-X;T=Math.sqrt(T*T+V*V*E*E);E=T/E;H=180*H/Math.PI;c=Math.round(100*c)/100;n=Math.round(100*n)/100;T=Math.round(100*T/k*100)/100;E=Math.round(100*E/f*100)/100;H=Math.round(100*H)/100;f=0<(O-I)*(L-J)-(M-J)*(p-I)?"0":"1";k="0";h.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ha,X,z,x,K,P,Q,R)&&(k="1");d.setLastX(c);d.setLastY(n);return'<arc rx="'+
(new String(T)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(c)).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(c,d,f,k,n,p,x,z){f-=c;k-=d;p-=d;n=x-c;z-=d;d=c=0;f=180*(Math.atan2(k,f)-Math.atan2(d,c))/Math.PI;n=180*(Math.atan2(p,n)-Math.atan2(d,c))/Math.PI;c=180*(Math.atan2(z,x)-Math.atan2(d,c))/Math.PI;f=(f-c)%360;n=(n-c)%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}(h.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=g;g.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=g;g.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+
(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);m.LineTo=g;g.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y,n=d.getHeight(),p=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/p*100)/100;k=Math.round(100*(100-100*k/n))/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);
d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);m.MoveTo=g;g.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x,z){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;c.formulaE=z;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.formulaE.split("NURBS(").join("");p=p.split(")").join("");
p=new a.Nurbs(this,p,k,f);if(2<=p.getSize()){var x=p.getX(0),z=p.getY(0),E=p.getX(1),I=p.getY(1);c=Math.round(100*c/k*100)/100;n=Math.round(100*(100-100*n/f))/100;x=Math.round(100*x)/100;z=Math.round(100*z)/100;E=Math.round(100*E)/100;I=Math.round(100*I)/100;d.setLastX(c);d.setLastY(n);if(3===p.getDegree()&&p.isOrderedByThree(this.getA())){d=[];f=[];k=[];z=p.getSize();for(x=0;x<z-1;x+=3)d.push(new mxPoint(p.getX(x),p.getY(x))),f.push(new mxPoint(p.getX(x+1),p.getY(x+1))),x<z-2?k.push(new mxPoint(p.getX(x+
2),p.getY(x+2))):k.push(new mxPoint(c,n));c="";for(x=0;x<d.length;x++)c+='<curve x1="'+d[x].x+'" y1="'+d[x].y+'" x2="'+f[x].x+'" y2="'+f[x].y+'" x3="'+k[x].x+'" y3="'+k[x].y+'"/>\n';return c}return'<curve x1="'+(new String(x)).toString()+'" y1="'+(new String(z)).toString()+'" x2="'+(new String(E)).toString()+'" y2="'+(new String(I)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(n)).toString()+'"/>'}}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=g;g.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";
(function(b){var a=function(){function c(d,f,k,n){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}c.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,n=Math.round(100*this.getKnot(f+1))/100,p=Math.round(100*this.getKnot(f+2))/100;if(k!==
n||k!==p||n!==p)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};c.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};c.prototype.getKnotLast=function(){return this.nurbsValues[0]};c.prototype.getDegree=function(){return this.nurbsValues[1]};c.prototype.getXType=function(){return this.nurbsValues[2]};c.prototype.getYType=function(){return this.nurbsValues[3]};c.prototype.getX=
function(d){return this.nurbsValues[4*(d+1)]};c.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};c.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};c.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return c}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(g=m.NURBSTo||(m.NURBSTo={}))})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.formulaA=k;return c}__extends(a,b);a.prototype.handle=function(c,d){c="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),n=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),p=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=Math.round(100*n/k*100)/100;p=Math.round(100*(100-100*p/f))/100;var x=this.formulaA.replace(RegExp("\\s",
"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var z=x&&x.equals?x.equals("inh"):"inh"===x;if(z)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});x=x.split(",").slice(0).slice(0);z=parseFloat(x.splice(0,1));parseFloat(x.splice(0,1));for(var E,I;0<x.length;)E=parseFloat(x.splice(0,1))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
I=parseFloat(x.splice(0,1))*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===z&&(E=100*E/k),1===z&&(I=100*I/f),I=100-I,E=Math.round(100*E)/100,I=Math.round(100*I)/100,d.setLastX(E),d.setLastY(I),c+='<line x="'+(new String(E)).toString()+'" y="'+(new String(I)).toString()+'"/>';c+='<line x="'+(new String(n)).toString()+'" y="'+(new String(p)).toString()+'"/>';d.getLastMoveX()===n&&d.getLastMoveY()===p&&(c+="<close/>")}return c};return a}(h.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=g;g.__class=
"com.mxgraph.io.vsdx.geometry.PolylineTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b,p=100*this.c,x=100-100*this.d;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;p=Math.round(100*
p)/100;x=Math.round(100*x)/100;d.setLastX(c);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(n)).toString()+'" x2="'+(new String(p)).toString()+'" y2="'+(new String(x)).toString()+'" x3="'+(new String(c)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(B.geometry||
(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){return b.call(this,c,d,f)||this}__extends(a,b);a.prototype.handle=function(c,d){var f=c.x,k=c.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;c.x=f;c.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(h.mxgraph.io.vsdx.geometry.Row);
m.RelMoveTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){c=100*this.x;var f=100-100*this.y,k=100*this.a,n=100-100*this.b;c=Math.round(100*c)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;n=Math.round(100*n)/100;d.setLastX(c);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'+
(new String(n)).toString()+'" x2="'+(new String(c)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k){c=b.call(this,c,d,f)||this;c.a=k;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a){c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();c=Math.round(100*c)/100;f=Math.round(100*(100-f))/100;d.setLastX(c);d.setLastY(f)}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);
m.SplineKnot=g;g.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){c=b.call(this,c,d,f)||this;c.a=k;c.b=n;c.c=p;c.d=x;return c}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){d.getHeight();d.getWidth();c=this.x*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);c=Math.round(100*c)/
100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(c);d.setLastY(f);return"<curve "}return""};return a}(h.mxgraph.io.vsdx.geometry.Row);m.SplineStart=g;g.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(){function g(b,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=b;this.pm=a.getPropertiesManager();b=b.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=b&&0!==b.length?parseFloat(b):-1}catch(c){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}g.__static_initialize=function(){g.__static_initialized||(g.__static_initialized=!0,g.__static_initializer_0(),
g.__static_initializer_1())};g.styleTypes_$LI$=function(){g.__static_initialize();null==g.styleTypes&&(g.styleTypes={});return g.styleTypes};g.__static_initializer_0=function(){g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;
g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$().QuickStyleFillColor=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$().QuickStyleFillMatrix=h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]=
h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$().QuickStyleLineColor=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$().QuickStyleLineMatrix=
h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;
g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$()[h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]=
h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$().QuickStyleFontColor=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;g.styleTypes_$LI$().QuickStyleFontMatrix=h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};g.prototype.getTheme=function(){return null};g.prototype.getQuickStyleVals=function(){return null};g.prototype.isVertex=function(){return!1};g.prototype.styleDebug=function(b){g.vsdxStyleDebug&&console.info(b)};g.prototype.stylesheetRefs=function(b){this.styleParents[h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
b.getStylesheet(this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=b.getStylesheet(this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=b.getStylesheet(this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=b.getStylesheet("0")};g.prototype.cacheCells=function(b){if(null!=this.shape){var a=this.shape.childNodes;
if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,b),a=a.nextSibling}};g.prototype.parseShapeElem=function(b,a){a=b.nodeName;(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"Cell")?this.cellElements[b.getAttribute("N")]=b:function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Section")&&this.parseSection(b)};g.prototype.parseSection=function(b){var a=new h.mxgraph.io.vsdx.Section(b);this.sections[b.getAttribute("N")]=a};g.prototype.hasProperty=function(b,a){return this.cellElements.hasOwnProperty(a)};
g.prototype.getValue=function(b,a){return null!=b?b.getAttribute("V")||"":a};g.prototype.getValueAsDouble=function(b,a){if(null!=b){var c=b.getAttribute("V");if(null!=c){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(c,"Themed"))return 0;try{var d=parseFloat(c);(function(f,k){return f&&f.equals?f.equals(k):f===k})(b.getAttribute("U"),"PT")&&(d*=h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};g.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=
function(b,a){if(null!=b&&(b=b.getAttribute("V"),null!=b))try{var c=parseFloat(b);return this.getScreenNumericalValue$double(c)}catch(d){}return a};g.prototype.getScreenNumericalValue=function(b,a){if((null==b||1!=b.nodeType)&&null!==b||"number"!==typeof a&&null!==a){if("number"!==typeof b&&null!==b||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(b)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(b,a)};g.prototype.getScreenNumericalValue$double=
function(b){return b*h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};g.prototype.getAttribute=function(b,a,c){var d=this.cellElements;b=d[b]?d[b]:null;null!=b&&(c=b.getAttribute(a)||"");return c};g.prototype.getChildValues=function(b,a){var c={};for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType){var d=b,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var n=a[f]?a[f]:null;null!=
n&&(k=d.getAttribute(n)||"")}c[f]=k}b=b.nextSibling}return c};g.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(b,a,c){var d=function(p,x){return p[x]?p[x]:null}(this.sections,c),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,b));if(null!=f){d=f.getAttribute("F");var n=f.getAttribute("V");if(null!=d&&null!=n)if(function(p,x){return p&&p.equals?p.equals(x):p===x}(d,"Inh")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed"))k=!0;else if(function(p,x){return p&&
p.equals?p.equals(x):p===x}(d,"THEMEVAL()")&&function(p,x){return p&&p.equals?p.equals(x):p===x}(n,"Themed")&&null!=this.style){if(function(p,x){return p&&p.equals?p.equals(x):p===x}(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR,b))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c);if(null!=d)return d}}if(null==f||k)if(k=function(p,x){return p[x]?p[x]:null}(g.styleTypes_$LI$(),c),k=function(p,x){return p[x]?p[x]:null}(this.styleParents,k),null!=k&&(b=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,
a,c),null!=b))return b;return f};g.prototype.getCellElement=function(b,a,c){if("string"!==typeof b&&null!==b||"string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c){if("string"!==typeof b&&null!==b||void 0!==a||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(b)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(b,a,c)};g.prototype.getCellElement$java_lang_String=function(b){var a=function(k,n){return k[n]?k[n]:null}(this.cellElements,
b),c=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,n){return k&&k.equals?k.equals(n):k===n}(d,"Inh")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed"))c=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f,"Themed")&&null!=this.style){if(function(k,n){return k&&k.equals?k.equals(n):k===n}("FillForegnd",b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,
b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,
b)||function(k,n){return k&&k.equals?k.equals(n):k===n}(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,b))return a;d=this.style.getCellElement$java_lang_String(b);if(null!=d)return d}}if(null==a||c)if(c=function(k,n){return k[n]?k[n]:null}(g.styleTypes_$LI$(),b),c=function(k,n){return k[n]?k[n]:null}(this.styleParents,c),null!=c&&(b=c.getCellElement$java_lang_String(b),null!=b))return b;return a};g.prototype.getStrokeColor=function(){var b="";(function(a,c){return a&&a.equals?a.equals(c):a===c})(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),
"1"),"0")?b="none":(b=this.getColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,c){return a&&a.equals?a.equals(c):a===c}("Themed",b)&&(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return b};g.prototype.getFillColor=function(){if(function(c,d){return c&&c.equals?c.equals(d):c===d}("1",this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),
"0"))){var b=function(c,d){return c[d]?c[d]:null}(this.sections,"FillGradient");if(null!=b&&(b=this.getColor(b.getIndexedCell("0","GradientStopColor")),null!=b&&0!==b.length))return b}b=this.getColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(c,d){return c&&c.equals?c.equals(d):c===d})("Themed",b)&&(b=this.getTheme(),null!=b?(b=b.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),b=b.toHexStr()):b="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),
"0");return null!=a&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?"none":b};g.prototype.getColor=function(b){b=this.getValue(b,"");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)||function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};g.prototype.getTextBkgndColor=function(b){b=this.getValue(b,"");return function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")?b:function(a,c){return a&&a.equals?
a.equals(c):a===c}(b,"0")||function(a,c){return a&&a.equals?a.equals(c):a===c}(b,"255")||0===b.length?"none":this.pm.getColor((new String(parseInt(b)-1)).toString())};g.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};g.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),
0)};g.prototype.getNameU=function(){return this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};g.prototype.getName=function(){return this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};g.prototype.getUniqueID=function(){return this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};g.prototype.getId=function(){return this.Id};g.prototype.getTextColor=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR,
b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=this.getValue(b,"#000000");(function(a,c){return a&&a.equals?a.equals(c):a===c})("Themed",b)?(b=this.getTheme(),b=null!=b?(this.isVertex()?b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):b.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,c,d){void 0===d&&(d=0);return a.substr(d,c.length)===c}(b,"#")||(b=this.pm.getColor(b));return b};g.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),
0)};g.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN),0)};g.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};g.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),
0)};g.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.STYLE,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};g.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};g.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.POS,
b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};g.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};g.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
return this.getValue(b,"")};g.prototype.getHorizontalAlign=function(b,a){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(b,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};g.prototype.getIndentFirst=
function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};g.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,
0))|0)).toString()};g.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};g.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);
return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};g.prototype.getSpAfter=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};g.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,
b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a=b&&b.equals?b.equals(""):""===b;return a?0:parseFloat(b)};g.prototype.getFlags=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};g.prototype.getLetterSpace=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,
b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};g.prototype.getBullet=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BULLET,b,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(b,"0")};g.prototype.getShape=function(){return this.shape};g.prototype.setShape=function(b){this.shape=b};g.lineDashPatterns_$LI$=function(){g.__static_initialize();
null==g.lineDashPatterns&&(g.lineDashPatterns=[]);return g.lineDashPatterns};g.__static_initializer_1=function(){g.lineDashPatterns_$LI$().push([]);g.lineDashPatterns_$LI$().push([]);g.lineDashPatterns_$LI$().push([]);var b=[];b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);
b=[];b.push(g.DASH);b.push(g.SPACE);b.push(g.DASH);b.push(g.SPACE);b.push(g.DOT);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.SPACE);b.push(g.SHORT_DASH);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.SPACE);b.push(g.SHORT_DASH);b.push(g.SPACE);b.push(g.SHORT_DASH);b.push(g.SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DOT);b.push(g.SHORT_SPACE);
g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.DOT);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SHORT_SPACE);
b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DASH);b.push(g.SHORT_SPACE);b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);b.push(g.SHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);
b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.LONG_DASH);b.push(g.LONG_SPACE);b.push(g.DOT);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.XLONG_DASH);b.push(g.LONG_SPACE);b.push(g.DASH);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.XLONG_DASH);b.push(g.LONG_SPACE);b.push(g.DASH);b.push(g.LONG_SPACE);
b.push(g.DASH);b.push(g.LONG_SPACE);g.lineDashPatterns_$LI$().push(b);b=[];b.push(g.XSHORT_DASH);b.push(g.SHORT_SPACE);g.lineDashPatterns_$LI$().push(b)};g.getLineDashPattern=function(b){return 0<=b&&23>=b?g.lineDashPatterns_$LI$()[b]:g.lineDashPatterns_$LI$()[0]};return g}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(A.vsdx||
(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){var k=b.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=c/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new h.mxgraph.io.vsdx.theme.HSLColor(c,d,f)).toRgb();return k}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=g;g.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||
(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){var d=b.call(this)||this;d.val=c;d.color=new h.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=g;g.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){var d=b.call(this)||this;d.isDynamic=!0;d.val=c;return d}__extends(a,b);a.prototype.calcColor=function(c,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(c):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,c,d)};return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=g;g.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||
(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f){var k=b.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=c;k.g=d;k.b=f;k.color=new h.mxgraph.io.vsdx.theme.Color(c,d,f);return k}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=g;g.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c){var d=b.call(this)||this;d.hexVal=null;d.hexVal=c;d.color=h.mxgraph.io.vsdx.theme.Color.decodeColorHex(c);return d}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=g;g.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d){var f=b.call(this)||this;f.lastClr=null;f.val=c;f.lastClr=d;if(null==d)switch(c){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=h.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,b);return a}(h.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=g;g.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(A.vsdx||(A.vsdx={}))})(y.io||
(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){(function(m){var g=function(b){function a(c,d,f,k,n,p,x){return b.call(this,c,d,f,k,n,p,x)||this}__extends(a,b);a.prototype.handle=function(c,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight()/h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return b.prototype.handle.call(this,
c,d)};return a}(h.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=g;g.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(B.geometry||(B.geometry={}))})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){(function(B){var m=function(g){function b(a,c){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=g.call(this,a,c)||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,h.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,h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,g);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",
b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,c){this.theme=a;this.themeVariant=c};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new h.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}};b.prototype.parseShapeElem=function(a,c){g.prototype.parseShapeElem.call(this,a,c);var d=a.nodeName;if(function(z,E){return z&&z.equals?z.equals(E):z===E}(d,"ForeignData")){d=function(z,E){for(z=z.firstChild;null!=z;){if(1==z.nodeType){var I=z;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){z=E.lastIndexOf("/");var J="",O="";try{J=E.substring(0,z),O=E.substring(z,E.length)}catch(M){break}z=c.getRelationship(I,J+"/_rels"+O+".rels");
if(null!=z){E=z.getAttribute("Target")||"";I=z.getAttribute("Type");z=E.lastIndexOf("/");try{E=E.substring(z+1,E.length)}catch(M){break}return{type:I,target:E}}break}}z=z.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",p=null;if(function(z,E){return z&&z.equals?z.equals(E):z===E}(k,"Bitmap"))n=n.toLowerCase();else if(function(z,E){return z&&z.equals?z.equals(E):z===E}(k,"MetaFile"))n="png";else if(function(z,E){return z&&z.equals?
z.equals(E):z===E}(k,"Enhanced Metafile")||function(z,E){return z&&z.equals?z.equals(E):z===E}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(p=d(a,f),0<p.type.indexOf("/oleObject"))if(n=c.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=n){p=n.getAttribute("Target");k=n.getAttribute("Type");try{var x=p.lastIndexOf("/");p=p.substring(x+1,p.length)}catch(z){return}n="png";p={type:k,target:p}}else return}else return;null==p&&(p=d(a,f));k=p.type;p=p.target;null!=k&&function(z,
E){var I=z.length-E.length;z=z.indexOf(E,I);return-1!==z&&z===I}(k,"image")&&(this.imageData={},(a=c.getMedia(h.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=a,function(z,E){var I=z.length-E.length;z=z.indexOf(E,I);return-1!==z&&z===I}(p.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(z,E){return z&&z.equals?z.equals(E):z===E})(d,h.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=
a)};b.prototype.parseSection=function(a){var c=a.getAttribute("N");if(function(I,J){return I&&I.equals?I.equals(J):I===J}(c,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,J){return I&&I.equals?I.equals(J):I===J}(c,"Field")){a=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){c=a[d];var f=c.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,J){return I&&I.equals?I.equals(J):I===J}("1",
c.getAttribute("Del")))this.fields[f]="";else{for(var k=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell"),n="",p="",x=0;x<k.length;x++){var z=k[x];c=z.getAttribute("N");z=z.getAttribute("V")||z.textContent||"";switch(c){case "Value":n=z;break;case "Format":p=z}}if("esc(0)"==p)this.fields[f]=n;else if(0!==n.length){try{var E=isNaN(n)?new Date(n):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));p="c"==p?0==E.getHours()+E.getMinutes()+E.getSeconds()+E.getMilliseconds()?"m/d/yyyy":
"m/d/yyyy h:MM:ss tt":"ddddd"==p?"m/d/yyyy":"dddddd"==p?"dddd, mmmm dd, yyyy":"C"==p?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==p?"h:MM:ss tt":p.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(E,"UTC:"+p.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else g.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=
this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){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(c){}return 0===this.width&&0<this.height?1:this.width};b.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(c){}return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var c=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(c='<ul style="margin: 0;list-style-type: '+
("4"==a?"square":"disc")+'">'));return c};b.prototype.getTextParagraphFormated=function(a){var c="",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 c+=this.insertAttributes(a,
d)};b.prototype.getTextCharFormated=function(a){var c="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;",p="line-height:"+this.getSpcLine(this.pp),x=";opacity:"+this.getTextOpacity(this.cp),z=this.getTextPos(this.cp),E=this.getTextCase(this.cp);(function(I,J){return I&&I.equals?I.equals(J):
I===J})(E,"1")?a=a.toUpperCase():function(I,J){return I&&I.equals?I.equals(J):I===J}(E,"2")&&(a=h.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,J){return I&&I.equals?I.equals(J):I===J})(z,"1")?a=h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,J){return I&&I.equals?I.equals(J):I===J}(z,"2")&&(a=h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
"i"):a;a=this.isUnderline(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?h.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+c+k+n+p+x+'">'+a+"</font>"};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):
c===d}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var c=!1;a=this.getSpLine(a);0<a?a*=h.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),c=!0);return(new String(a)).toString()+(c?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,c){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);c=' style="'+h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(c,":")+'"';return a+
c+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,h.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(c,d){return c&&c.equals?c.equals(d):c===d})(a,"0")?a="ltr":function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,
"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=1===(parseInt(a)&1));return c};b.prototype.isItalic=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=2===(parseInt(a)&2));return c};b.prototype.isUnderline=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&
d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=4===(parseInt(a)&4));return c};b.prototype.isSmallCaps=function(a){var c=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(c=8===(parseInt(a)&8));return c};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
a=this.getValue(a,"0");var c="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),c=(new String(a)).toString());return c};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,h.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,c=parseInt(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),
"1"));0===c?a=mxConstants.ALIGN_TOP:2===c&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=
a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};b.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var c=this.getHeight(),d=this.getWidth(),f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),p,x,z=0;z<n.length;z++){var E=
n[z],I=E.getAttribute("N");E=this.getScreenNumericalValue$org_w3c_dom_Element$double(E,0);"X"==I?p=mxUtils.format(E/d):"Y"==I&&(x=mxUtils.format(1-E/c))}null!=p&&null!=x&&a.push({x:p,y:x})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return b}(h.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"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph=
(function(h){(function(y){(function(A){(function(B){var m=function(g){function b(a,c,d,f,k,n){var p=this;p.masterShape=null;p.master=null;p.parentHeight=0;p=g.call(this,c,n)||this;p.htmlLabels=!0;p.rootShape=p;p.shapeName=null;p.shapeIndex=0;p.vertex=!0;p.childShapes={};var x=p.getMasterId(),z=p.getShapeMasterId();p.master=null!=x?f[x]?f[x]:null:k;null!=p.master&&(p.masterShape=null==x&&null!=z?p.master.getSubShape(z):p.master.getMasterShape());f=p.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,
k));p.shapeName=f;c=c.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=c&&0<c.length&&(c=c.item(0),p.childShapes=a.parseShapes(c,p.master,!1));c=p.calcRotation();p.rotation=100*c/100;p.rotation%=360;c=a.getCellIntValue("ThemeIndex",-100);-100===c&&(c=parseInt(p.getValue(p.getCellElement$java_lang_String("ThemeIndex"),"0")));c=function(E,I){null==E.entries&&(E.entries=[]);for(var J=0;J<E.entries.length;J++)if(null!=E.entries[J].key.equals&&E.entries[J].key.equals(I)||E.entries[J].key===
I)return E.entries[J].value;return null}(n.getThemes(),c);null==c&&(c=n.getDefaultTheme());n=a.getCellIntValue("VariationColorIndex",0);p.setThemeAndVariant(c,n);f=function(E){null==E.entries&&(E.entries=[]);return E.entries}(p.childShapes);for(k=0;k<f.length;k++)x=f[k].getValue(),x.setRootShape(p),null==x.theme&&x.setThemeAndVariant(c,n);p.quickStyleVals=new h.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(p.getValue(p.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=p.masterShape?(p.masterShape.processGeomList(null),p.processGeomList(p.masterShape.getGeomList()),0===p.width&&(p.width=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===p.height&&(p.height=p.getScreenNumericalValue$org_w3c_dom_Element$double(p.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
0))):p.processGeomList(null);p.vertex=d||!a.connectsMap[p.Id]&&null!=p.childShapes&&!function(E){null==E.entries&&(E.entries=[]);return 0==E.entries.length}(p.childShapes)||null!=p.geomList&&(!p.geomList.isNoFill()||1<p.geomList.getGeoCount());p.layerMember=p.getValue(p.getCellElement$java_lang_String("LayerMember"));p.layerMember&&(p.layerMember=p.layerMember.split(";"));return p}__extends(b,g);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};
b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=
0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
25,"ERmandOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===
c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
29,"ERzeroToMany");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
7,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
11,"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
16,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,c,d){null==
a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),31,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===
c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),32,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
33,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),34,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),36,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<
a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),39,mxConstants.ARROW_BLOCK);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),40,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),41,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
43,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,c,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(c)||
a.entries[f].key===c){a.entries[f].value=d;return}a.entries.push({key:c,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){b.__static_initialize();null==b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return b.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};b.prototype.getShapeNode=function(a){var c=this.cellElements;c=c[a]?c[a]:
null;return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):c};b.prototype.getTextLabel=function(a){var c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");c="1".equals?"1".equals(c):"1"===c;if(c)return null;c=this.getTextChildren();null==c&&null!=this.masterShape&&(c=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=c)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),
this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow="width"),this.getHtmlTextContent(c)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};b.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};b.prototype.initLabels=function(a){this.paragraphs={};for(var c=null,d=null,f=null,k=0;k<a.length;k++){var n=a.item(k);switch(n.nodeName){case "cp":c=this.getIndex(n);break;case "tp":this.getIndex(n);
break;case "pp":d=this.getIndex(n);break;case "fld":f=this.getIndex(n);break;case "#text":n=n.textContent;var p=this.paragraphs;p=p[d]?p[d]:null;null==p?(p=new h.mxgraph.io.vsdx.Paragraph(n,c,d,f),this.paragraphs[d]=p):p.addText(n,c,f)}}};b.prototype.createHybridLabel=function(a){var c=function(p,x){return p[x]?p[x]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=
0;this.styleMap.fontStyle=(new String(d)).toString();a=c.numValues();d=null;for(var f=0;f<a;f++){var k=c.getValue(f);if(0===k.length&&null!=this.fields){var n=c.getField(f);null!=n&&(k=function(p,x){return p[x]?p[x]:null}(this.fields,n),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(p,x){return p[x]?p[x]:null}(this.masterShape.fields,n)))}null!=k&&(d=null==d?k:d+k)}return d};b.prototype.getHtmlTextContent=function(a){function c(z){z=h.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(z);
n&&(z="<li>"+z,n=!1);k?(z=z.split("\n"),z[z.length-1]||(z.pop(),n=!0),z=z.join("</li><li>")):z=z.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(h.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(z)}var d="",f=!0,k=!1,n=!1;if(null!=a&&0<a.length)for(var p=0;p<a.length;p++){var x=a.item(p);(function(z,E){return z&&z.equals?z.equals(E):z===E})(x.nodeName,"cp")?this.cp=this.getIndex(x):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"tp")?this.tp=
this.getIndex(x):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"pp")?(this.pp=this.getIndex(x),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),x=this.getPPList(this.pp),n=k=null!=x,d+=k?x:""):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"fld")?(this.fld=this.getIndex(x),x=null,null!=this.fields&&(x=function(z,E){return z[E]?z[E]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(z,
E){return z[E]?z[E]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=c.call(this,x))):function(z,E){return z&&z.equals?z.equals(E):z===E}(x.nodeName,"#text")&&(x=x.textContent,d+=c.call(this,x))}k&&(d+="</li></ul>");return h.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};b.prototype.isConnectorBigNameU=function(a){return function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,
d.length)===d}(a,"45 degree single")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree double")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree  tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree  tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"45 degree tail")||function(c,d,f){void 0===
f&&(f=0);return c.substr(f,d.length)===d}(a,"60 degree tail")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(c,d,f){void 0===f&&(f=0);return c.substr(f,d.length)===d}(a,"Fancy arrow")};
b.prototype.isVertex=function(){return this.vertex};b.prototype.getOriginPoint=function(a,c){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),n=this.getLocPinX(),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=n;a-=f+(x-k);return!c||k===x/2&&n===p/2||0===this.rotation?new mxPoint(d,a):(c=p/2-n,k-=
x/2,x=Math.cos((360-this.rotation)*Math.PI/180),n=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+c-(c*x-k*n),c*n+k*x+a-k))};b.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<c?1:a,0===c&&0<a?1:c)};b.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),
0)};b.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};b.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};b.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};b.prototype.getOpacity=
function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};b.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,
"Row");a=this.getColor(a.getIndexedCell(c[c.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(c)?a=this.getColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(c=this.getTheme(),null!=c&&(c=c.getFillGraientColor(this.getQuickStyleVals()),null!=c&&(a=c.toHexStr())));return a};b.prototype.getGradientDirection=
function(){var a="",c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};b.prototype.calcRotation=
function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};b.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};b.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};b.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};b.prototype.getLeftSpacing=function(){return 100*
(this.getTextLeftMargin()/2-2.8)/100};b.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};b.prototype.getLabelRotation=function(){var a=!0,c=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=c;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};b.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",
null,"Hyperlink");a=this.getValue(a,"");var c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");c=this.getValue(c,"");return{extLink:a,pageLink:c}};b.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var c=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<c.length;d++){var f=c[d],k=f.getAttribute("N");f=h.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var n=0;n<f.length;n++){var p=f[n];if("Value"==p.getAttribute("N")){a.push({key:k,val:p.getAttribute("V")});break}}}return a};b.prototype.getStyleFromShape=function(){this.styleMap[h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=
"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var c=this.getId();this.styleDebug("ID = "+c+" , Fill Color = "+a);a=this.getGradient();(function(n,p){return n&&n.equals?n.equals(p):n===p})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(n,p){return n&&n.equals?n.equals(p):n===p}(a,"")||function(n,p){return n&&n.equals?n.equals(p):n===p}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=
a));a=this.getOpacity(h.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(n,p,x){void 0===x&&(x=0);return n.substr(x,p.length)===p}(function(n,p){return n[p]?n[p]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=
"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+c+" , Color = "+d+" , stroke transparency = "+f);(function(n,p){return n&&n.equals?n.equals(p):n===p})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=
""+c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=h.mxgraph.io.vsdx.mxVsdxConstants.TRUE);c=Math.round(this.getTopSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c);c=Math.round(this.getBottomSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c);c=Math.round(this.getLeftSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+c);c=Math.round(this.getRightSpacing())|0;0!==c&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c);a=
this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(n,p){return n&&n.equals?n.equals(p):n===p})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(n,p){return n&&n.equals?n.equals(p):n===p})("1",c)&&(this.styleMap[mxConstants.STYLE_FLIPV]=
"1");try{var k=this.getConnections();a=[];for(c=0;c<k.length;c++)a.push("["+k[c].x+","+k[c].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(n){console.log(n)}this.resolveCommonStyles();return this.styleMap};b.prototype.getDashPattern=function(){var a=null,c=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(c&&c.equals?c.equals("Themed"):"Themed"===c)?(c=this.getTheme(),null!=c&&(a=this.isVertex()?c.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
c.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(c));if(null!=a&&0!=a.length){c="";for(var d=0;d<a.length;d++)c=c.concat(a[d].toFixed(2)+" ");return c.trim()}return null};b.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
a.isConnLineDashed(this.getQuickStyleVals())}else if(!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return!0;return!1};b.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),c=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else c=parseFloat(a),c=this.getScreenNumericalValue$double(c)}catch(k){}1>c&&(c*=2);return c};b.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else c=
parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var c=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(c=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else c=parseFloat(a);return b.arrowSizes_$LI$()[c]}catch(k){}return 4};b.prototype.getRounding=
function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var c=a;c="Themed".equals?"Themed".equals(c):"Themed"===c;c&&(a="0");return parseFloat(a)};b.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Themed")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")?!1:!0};b.prototype.getEdgeStyle$java_util_Map=
function(a){var c={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?c[mxConstants.STYLE_EDGE]=mxConstants.NONE:c[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return c};b.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};b.prototype.getMasterId=
function(){return this.shape.hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};b.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};b.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};b.getType=function(a){return a.getAttribute("Type")};
b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME),c;(c=null==a)||(c=(c=a)&&c.equals?c.equals(""):""===c);c&&null!=this.masterShape&&(a=this.masterShape.getName());return a};
b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,c){var d="",f="";this.shape.hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));
if(function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(d,"Organizational unit")||function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(f,"Organizational unit")){var k=this.shape.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
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(z,E){return z&&z.equals?z.equals(E):z===E})(d,"Inh")&&(d="0.0");(function(z,E){return z&&z.equals?z.equals(E):z===E})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");c=c.split(";");for(var n="",p=0;p<c.length;p++){var x=c[p];x=x.trim();(function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E})(x,"tabHeight=")&&
(n=x.split("tabHeight=").join(""))}(function(z,E){return z&&z.equals?z.equals(E):z===E})(n,"")&&(n="20");c=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-c/2);a.getGeometry().offset=d}else if(function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(d,"Domain 3D")||function(z,E,I){void 0===I&&(I=0);return z.substr(I,E.length)===E}(f,"Domain 3D")){k=this.shape.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;
d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(h.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(z,E){return z&&z.equals?z.equals(E):z===E}(d,"Inh")||function(z,E){return z&&z.equals?z.equals(E):z===E}(d,""))d="0.0";if(function(z,E){return z&&z.equals?z.equals(E):
z===E}(f,"Inh")||function(z,E){return z&&z.equals?z.equals(E):z===E}(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}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var c=b.getType(this.getShape());this.styleDebug("shape type = "+c);if(null!=this.imageData||function(M,L){return M&&M.equals?M.equals(L):M===L}(h.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,c)&&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(M,L){return M[L]?M[L]:null}(d,"iType"),k=function(M,L){return M[L]?M[L]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),x=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),z=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
"0")),E=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=p||x!=E||z!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:p,imgWidth:x,imgHeight:z,width:E,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var J=this.parseGeom();if(function(M,L){return M&&M.equals?M.equals(L):M===L}(J,""))return this.styleDebug("No geom found"),a;var O=Graph.compress(J);a[mxConstants.STYLE_SHAPE]=
"stencil("+O+")"}catch(M){}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Off-page reference")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
this.shapeName);if(null!=a&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")&&!function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")){if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a=
(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),c=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,
"F",""),f=this.getAttribute(h.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(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===c||function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"inh"))c=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):
k===n}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"width*0.5")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(c.toLowerCase(),"height*0.5")&&function(k,n){return k&&k.equals?k.equals(n):
k===n}(d.toLowerCase(),"width*1")&&function(k,n){return k&&k.equals?k.equals(n):k===n}(f.toLowerCase(),"height*1")||!(function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(c.toLowerCase(),"height*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(d.toLowerCase(),"width*")&&function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(f.toLowerCase(),"height*")||function(k,
n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(a.toLowerCase(),"controls.row_")||function(k,n,p){void 0===p&&(p=0);return k.substr(p,n.length)===n}(c.toLowerCase(),"controls.row_"))?!1:!0};b.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};b.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,
"V","");null!=this.masterShape&&function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")&&(a=this.masterShape.getAttribute(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"0.0")||function(c,d){return c&&c.equals?c.equals(d):c===d}(a,"")?!1:!0};b.prototype.setRootShape=function(a){this.rootShape=a};b.prototype.getRootShape=function(){return this.rootShape};b.prototype.getStartXY=
function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getEndXY=function(a){var c=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.END_X),
0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(c,a)};b.prototype.getRoutingPoints=function(a,c,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,c,d):null};b.prototype.getControlPoints=function(a){var c=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.GEOM);
if(0<f.length&&(f=f.item(0).getElementsByTagName(h.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,n=[];0<k--;)n.push(0);for(k=0;k<f.length;k++)n[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var p=new mxPoint,x=n[k+3];p.x=Math.floor(Math.round(100*(c.x+
Math.min(100,Math.abs(a.x-c.x))*n[k+2]))/100);p.y=Math.floor(Math.round(100*(c.y-100*x))/100);d.push(p)}return d}}return null};b.prototype.getStyleFromEdgeShape=function(a){this.styleMap[h.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var c in a)this.styleMap[c]=a[c];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",c=this.getDashPattern(),null!=c&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=
c));c=this.getEdgeMarker(!0);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=c);c=this.getEdgeMarker(!1);null!=c&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(c,b.ARROW_NO_FILL_MARKER)&&(c=c.substring(b.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=
c);c=Math.round(this.getStartArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+c);c=Math.round(this.getFinalArrowSize())|0;6!==c&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+c);c=Math.round(this.getLineWidth())|0;1!==c&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+c);c=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(c,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=c);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=h.mxgraph.io.vsdx.mxVsdxConstants.TRUE);
this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,c=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(c,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=c));c=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+c;c=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+c;c=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+
c;c=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+c;c=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=c;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};b.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(h.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var c=a&&a.equals?a.equals(""):""===a;c||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),
"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?h.mxgraph.io.vsdx.mxVsdxConstants.TRUE:h.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};b.prototype.getEdgeMarker=function(a){var c=this.getValue(this.getCellElement$java_lang_String(a?h.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:h.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,n){return k&&k.equals?k.equals(n):k===n}(c,"Themed")){var f=
this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(c)}catch(k){}a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(b.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,n){null==k.entries&&(k.entries=[]);for(var p=0;p<k.entries.length;p++)if(null!=
k.entries[p].key.equals&&k.entries[p].key.equals(n)||k.entries[p].key===n)return k.entries[p].value;return null}(b.arrowTypes_$LI$(),1));return a};b.prototype.getCellElement$java_lang_String=function(a){var c=g.prototype.getCellElement$java_lang_String.call(this,a);return null==c&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):c};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,c,d){var f=g.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,
a,c,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,c,d):f};b.prototype.getCellElement=function(a,c,d){if("string"!==typeof a&&null!==a||"string"!==typeof c&&null!==c||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==c||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,c,d)};b.prototype.createLabelSubShape=
function(a,c){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),
f/2),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),z=this.getValueAsDouble(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),E=this.getTextLabel(1>d||1>f);if(null!=E&&0!==E.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()&&(z+=Math.PI+.01,I.horizontal="0");var J=this.getRotation();0!==z&&(z=360-180*z/Math.PI,z=Math.round((z+J)%360*100)/100,0!==z&&(I.rotation=""+z));I="text;"+h.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=c.getGeometry().height-
(x+f-n);k=p-k;0<J&&(p=new mxGeometry(k,n,d,f),k=c.getGeometry(),h.mxgraph.online.Utils.rotatedGeometry(p,J,k.width/2,k.height/2),k=p.x,n=p.y);return a.insertVertex(c,null,E,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};b.prototype.getLblEdgeOffset=function(a,c){if(null!=c&&1<c.length){var d=new mxCellState;d.absolutePoints=c;a.updateEdgeBounds(d);a=a.getPoint(d);d=c[0];var f=c[c.length-1];c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),
0),z=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(h.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(z-p+k/2);a=x-n+c/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};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(h.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"})(A.vsdx||(A.vsdx={}))})(y.io||(y.io={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));
(function(h){(function(y){(function(A){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var g=256,b=[];0<g--;)b.push(0);m.IA=b}return m.IA};m.__static_initializer_0=function(){for(var g=m.IA_$LI$(),
b=0;b<g.length;b++)g[b]=-1;g=0;for(b=m.CA_$LI$().length;g<b;g++)m.IA_$LI$()[m.CA_$LI$()[g].charCodeAt(0)]=g;m.IA_$LI$()[61]=0};m.encodeToChar=function(g,b,a){var c=null!=g?g.length-b:0;if(0===c)return[];var d=3*(c/3|0),f=((c-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),n=b,p=0,x=0;n<d+b;){var z=(g[n++]&255)<<16|(g[n++]&255)<<8|g[n++]&255;k[p++]=m.CA_$LI$()[z>>>18&63];k[p++]=m.CA_$LI$()[z>>>12&63];k[p++]=m.CA_$LI$()[z>>>6&63];k[p++]=m.CA_$LI$()[z&63];a&&19===++x&&p<f-2&&(k[p++]="\r",k[p++]=
"\n",x=0)}a=c-d;0<a&&(z=(g[d+b]&255)<<10|(2===a?(g[c+b-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[z>>12],k[f-3]=m.CA_$LI$()[z>>>6&63],k[f-2]=2===a?m.CA_$LI$()[z&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(g){var b=null!=g?g.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[g[c].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[g[--c].charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(g[c])&&d++;b=(6*(b-a)>>3)-d;a=function(p){for(var x=
[];0<p--;)x.push(0);return x}(b);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[g[d++].charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decode=function(g){if(null!=g&&g instanceof Array&&(0==g.length||null==g[0]||"string"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decode$char_A(g);if(null!=g&&g instanceof Array&&(0==g.length||null==g[0]||"number"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decode$byte_A(g);
if("string"===typeof g||null===g)return h.mxgraph.online.mxBase64.decode$java_lang_String(g);throw Error("invalid overload");};m.decodeFast$char_A=function(g){var b=g.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[g[a].charCodeAt(0)];)a++;for(;0<c&&0>m.IA_$LI$()[g[c].charCodeAt(0)];)c--;var d=61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g[c])?61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g[c-1])?2:1:0,f=c-a+1,k=76<b?(13==function(E){return null==E.charCodeAt?
E:E.charCodeAt(0)}(g[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(E){for(var I=[];0<E--;)I.push(0);return I}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var z=m.IA_$LI$()[g[a++].charCodeAt(0)]<<18|m.IA_$LI$()[g[a++].charCodeAt(0)]<<12|m.IA_$LI$()[g[a++].charCodeAt(0)]<<6|m.IA_$LI$()[g[a++].charCodeAt(0)];b[n++]=z>>16|0;b[n++]=z>>8|0;b[n++]=z|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=z=0;a<=c-d;k++)z|=m.IA_$LI$()[g[a++].charCodeAt(0)]<<18-6*k;for(g=16;n<f;g-=8)b[n++]=z>>g|0}return b};m.decodeFast=function(g){if(null!=
g&&g instanceof Array&&(0==g.length||null==g[0]||"string"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decodeFast$char_A(g);if(null!=g&&g instanceof Array&&(0==g.length||null==g[0]||"number"===typeof g[0])||null===g)return h.mxgraph.online.mxBase64.decodeFast$byte_A(g);if("string"===typeof g||null===g)return h.mxgraph.online.mxBase64.decodeFast$java_lang_String(g);throw Error("invalid overload");};m.encodeToByte=function(g,b){var a=null!=g?g.length:0;if(0===a)return[];for(var c=3*(a/
3|0),d=((a-1)/3|0)+1<<2,f=d+=b?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var n=0,p=0,x=0;n<c;)f=(g[n++]&255)<<16|(g[n++]&255)<<8|g[n++]&255,k[p++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[p++]=m.CA_$LI$()[f&63].charCodeAt(0),b&&19===++x&&p<d-2&&(k[p++]=13,k[p++]=10,x=0);b=a-c;0<b&&(f=(g[c]&255)<<10|(2===b?(g[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=
2===b?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(g){for(var b=g.length,a=0,c=0;c<b;c++)0>m.IA_$LI$()[g[c]&255]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[g[--c]&255];)61==g[c]&&d++;c=b=(6*(b-a)>>3)-d;for(a=[];0<c--;)a.push(0);for(var f=d=0;f<b;){for(var k=c=0;4>k;k++){var n=m.IA_$LI$()[g[d++]&255];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$byte_A=function(g){var b=g.length;if(0===
b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[g[a]&255];)a++;for(;0<c&&0>m.IA_$LI$()[g[c]&255];)c--;var d=61==g[c]?61==g[c-1]?2:1:0,f=c-a+1,k=76<b?(13==g[76]?f/78|0:0)<<1:0,n=f=(6*(f-k)>>3)-d;for(b=[];0<n--;)b.push(0);for(var p=n=0,x=3*(f/3|0);n<x;){var z=m.IA_$LI$()[g[a++]]<<18|m.IA_$LI$()[g[a++]]<<12|m.IA_$LI$()[g[a++]]<<6|m.IA_$LI$()[g[a++]];b[n++]=z>>16|0;b[n++]=z>>8|0;b[n++]=z|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=z=0;a<=c-d;k++)z|=m.IA_$LI$()[g[a++]]<<18-6*k;for(g=16;n<f;g-=8)b[n++]=z>>
g|0}return b};m.encodeToString=function(g,b,a){return m.encodeToChar(g,b,a).join("")};m.decode$java_lang_String=function(g){var b=null!=g?g.length:0;if(0===b)return[];for(var a=0,c=0;c<b;c++)0>m.IA_$LI$()[g.charAt(c).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;var d=0;for(c=b;1<c&&0>=m.IA_$LI$()[g.charAt(--c).charCodeAt(0)];)61==function(p){return null==p.charCodeAt?p:p.charCodeAt(0)}(g.charAt(c))&&d++;b=(6*(b-a)>>3)-d;a=function(p){for(var x=[];0<p--;)x.push(0);return x}(b);for(var f=d=0;f<b;){for(var k=
c=0;4>k;k++){var n=m.IA_$LI$()[g.charAt(d++).charCodeAt(0)];0<=n?c|=n<<18-6*k:k--}a[f++]=c>>16|0;f<b&&(a[f++]=c>>8|0,f<b&&(a[f++]=c|0))}return a};m.decodeFast$java_lang_String=function(g){var b=g.length;if(0===b)return[];for(var a=0,c=b-1;a<c&&0>m.IA_$LI$()[function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(a))&255];)a++;for(;0<c&&0>m.IA_$LI$()[function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(c))&255];)c--;var d=61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(c))?
61==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(c-1))?2:1:0,f=c-a+1,k=76<b?(13==function(E){return null==E.charCodeAt?E:E.charCodeAt(0)}(g.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;b=function(E){for(var I=[];0<E--;)I.push(0);return I}(f);for(var n=0,p=0,x=3*(f/3|0);n<x;){var z=m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[g.charAt(a++).charCodeAt(0)];b[n++]=z>>16|0;b[n++]=z>>
8|0;b[n++]=z|0;0<k&&19===++p&&(a+=2,p=0)}if(n<f){for(k=z=0;a<=c-d;k++)z|=m.IA_$LI$()[g.charAt(a++).charCodeAt(0)]<<18-6*k;for(g=16;n<f;g-=8)b[n++]=z>>g|0}return b};return m}();B.__static_initialized=!1;A.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(h.mxgraph||(h.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();
EditorUi.prototype.doImportVisio=function(h,y,A,B){B=B||h.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(h,y,null,A):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(h,y,null,A)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;
mxGraphMlCodec.prototype.decode=function(h,y,A){try{var B=mxUtils.parseXml(h),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);h='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var g=m[B],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(g,b,b.getDefaultParent()),B=0;B<this.edges.length;B++)for(var c=this.edges[B],d=c.edges,f=c.parent,k=c.dx,n=c.dy,
p=0;p<d.length;p++)this.importEdge(d[p],b,f,k,n)}catch(X){throw console.log(X),X;}finally{a.endUpdate()}a.beginUpdate();try{var x=b.getModel().cells,z;for(z in x){var E=x[z];if(E.edge&&0<E.getChildCount())for(B=0;B<E.getChildCount();B++){var I=E.children[B].geometry;if(I.adjustIt){var J=b.view.getState(E),O=J.absolutePoints,M=O[0],L=O[O.length-1],H=I.x,K=I.y;k=L.x-M.x;n=L.y-M.y;var P=M.x+H*k,Q=M.y+H*n,R=Math.sqrt(k*k+n*n);k/=R;n/=R;P-=K*n;Q+=K*k;var ha=b.view.getRelativePoint(J,P,Q);I.x=ha.x;I.y=
ha.y}}}}catch(X){throw console.log(X),X;}finally{a.endUpdate()}h+=this.processPage(b,B+1)}y&&y(h+"</mxfile>")}catch(X){A&&A(X)}};
mxGraphMlCodec.prototype.initializeKeys=function(h){var y=this.getDirectChildNamedElements(h,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 A,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),g=m[mxGraphMlConstants.ID],b=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],c=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(A=g);a=a?a:c;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]=
{key:g,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:g,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:g,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:g,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}h=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA);for(B=0;B<h.length;B++)if(h[B].getAttribute(mxGraphMlConstants.KEY)==A)for(b=this.getDirectChildNamedElements(h[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<b.length;y++)for(a=
this.getDirectChildElements(b[y]),m=0;m<a.length;m++)g=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[g]=a[m];else for(b=this.getDirectChildNamedElements(h[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<b.length;y++)for(a=this.getDirectChildElements(b[y]),m=0;m<a.length;m++)g=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[g]=a[m]};
mxGraphMlCodec.prototype.parseAttributes=function(h,y){if(h=h.attributes)for(var A=0;A<h.length;A++){var B=h[A].nodeValue,m=this.refRegexp.exec(B),g=this.staticRegexp.exec(B);m?(B=m[1],m=this.cachedRefObj[B],m||(m={},m[this.sharedData[B].nodeName]=this.dataElem2Obj(this.sharedData[B]),this.cachedRefObj[B]=m),y[h[A].nodeName]=m):g?(y[h[A].nodeName]={},y[h[A].nodeName][g[1]]=g[2]):y[h[A].nodeName]=B}};
mxGraphMlCodec.prototype.dataElem2Obj=function(h){var y=this.getDirectFirstChildNamedElements(h,mxGraphMlConstants.GRAPHML_REFERENCE)||h.getAttribute(mxGraphMlConstants.REFID),A=null,B=h,m={};if(y){A="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[A])return this.parseAttributes(h,y),y;h=this.sharedData[A]}this.parseAttributes(h,m);for(y=0;y<h.childNodes.length;y++){var g=h.childNodes[y];if(1==g.nodeType){var b=g.nodeName;if(b==mxGraphMlConstants.X_LIST){var a=
[];g=this.getDirectChildElements(g);for(var c=0;c<g.length;c++)b=g[c].nodeName,a.push(this.dataElem2Obj(g[c]));m[b]=a}else b==mxGraphMlConstants.X_STATIC?(b=g.getAttribute(mxGraphMlConstants.MEMBER),a=b.lastIndexOf("."),m[b.substr(0,a)]=b.substr(a+1)):(a=b.lastIndexOf("."),0<a&&(b=b.substr(a+1)),null!=m[b]?(m[b]instanceof Array||(m[b]=[m[b]]),m[b].push(this.dataElem2Obj(g))):m[b]=this.dataElem2Obj(g))}else 3!=g.nodeType&&4!=g.nodeType||!g.textContent.trim()||(m["#text"]=g.textContent)}return A?(h=
{},this.parseAttributes(B,h),h[this.sharedData[A].nodeName]=m,this.cachedRefObj[A]=h):m};mxGraphMlCodec.prototype.mapArray=function(h,y,A){for(var B={},m=0;m<h.length;m++)h[m].name&&(B[h[m].name]=h[m].value||h[m]);this.mapObject(B,y,A)};
mxGraphMlCodec.prototype.mapObject=function(h,y,A){if(y.defaults)for(var B in y.defaults)A[B]=y.defaults[B];for(B in y){for(var m=B.split("."),g=h,b=0;b<m.length&&g;b++)g=g[m[b]];null==g&&h&&(g=h[B]);if(null!=g)if(m=y[B],"string"===typeof g)if("string"===typeof m)A[m]=g.toLowerCase();else if("object"===typeof m){b=g.toLowerCase();switch(m.mod){case "color":0==g.indexOf("#")&&9==g.length?b="#"+g.substr(3)+g.substr(1,2):"TRANSPARENT"==g&&(b="none");break;case "shape":b=mxGraphMlShapesMap[g.toLowerCase()];
break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[g.toLowerCase()];break;case "bpmnSymbol":b=mxGraphMlShapesMap.bpmnSymbol[g.toLowerCase()];break;case "bool":b="true"==g?"1":"0";break;case "scale":try{b=parseFloat(g)*m.scale}catch(a){}break;case "arrow":b=mxGraphMlArrowsMap[g]}null!=b&&(A[m.key]=b)}else m(g,A);else g instanceof Array?this.mapArray(g,m,A):null!=g.name&&null!=g.value?this.mapArray([g],m,A):this.mapObject(g,m,A)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};
mxGraphMlCodec.prototype.importGraph=function(h,y,A){for(var B=this.getDirectChildNamedElements(h,mxGraphMlConstants.NODE),m=A,g=0,b=0;m&&m.geometry;)g+=m.geometry.x,b+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,A,g,b);this.edges.push({edges:this.getDirectChildNamedElements(h,mxGraphMlConstants.EDGE),parent:A,dx:g,dy:b})};
mxGraphMlCodec.prototype.importPort=function(h,y){var A=h.getAttribute(mxGraphMlConstants.PORT_NAME),B={};h=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA);for(var m=0;m<h.length;m++){var g=h[m];g.getAttribute(mxGraphMlConstants.KEY);g=this.dataElem2Obj(g);g.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(g,{"y:FreeNodePortLocationModelParameter.Ratio":function(b,a){b=b.split(",");a.pos={x:b[0],y:b[1]}}},B)}y[A]=B};
mxGraphMlCodec.prototype.styleMap2Str=function(h){var y="",A="",B;for(B in h)A+=y+B+"="+h[B],y=";";return A};
mxGraphMlCodec.prototype.importNode=function(h,y,A,B,m){var g=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA),b=h.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,A);A={graphMlID:b};for(var c=null,d=null,f=null,k=null,n=0;n<g.length;n++){var p=this.dataElem2Obj(g[n]);if(p.key)if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,p,B,m);else if(p.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=
p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)c=p,p["yjs:StringTemplateNodeStyle"]?d=p["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,p,A);else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=p;else if(p.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var x=c=null;for(x in p)if("key"!=x&&"#text"!=x){if("y:ProxyAutoBoundsNode"==x){if(x=p[x]["y:Realizers"])for(var z in x)if("active"!=z&&"#text"!=z){c=x[z][x.active];p={};p[z]=c;break}}else c=
p[x];break}c&&(c[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,c[mxGraphMlConstants.GEOMETRY],B,m),c[mxGraphMlConstants.NODE_LABEL]&&(k=c[mxGraphMlConstants.NODE_LABEL]));c=p;this.addNodeStyle(a,p,A)}}m=this.getDirectChildNamedElements(h,mxGraphMlConstants.PORT);B={};for(n=0;n<m.length;n++)this.importPort(m[n],B);d&&this.handleTemplates(d,f,a,A);this.handleFixedRatio(a,A);this.handleCompoundShape(a,A,c,null);0==A.strokeWidth&&(A.strokeColor="none");a.style=this.styleMap2Str(A);h=this.getDirectChildNamedElements(h,
mxGraphMlConstants.GRAPH);for(n=0;n<h.length;n++)this.importGraph(h[n],y,a,B);k&&this.addLabels(a,k,A,y);this.nodesMap[b]={node:a,ports:B}};
mxGraphMlCodec.prototype.addNodeStyle=function(h,y,A){h=function(H,K){if("line"!=H){K.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),K.dashPattern=H)}};h={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",
mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,K){"true"==H&&(K.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,K){"false"==H&&(K.strokeColor="none")},
type:h},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:h,"dashStyle.yjs:DashStyle.dashes":h,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var B=mxUtils.clone(h);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(h);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var g=mxUtils.clone(h);g.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};
var b=mxUtils.clone(h);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(h);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var c=mxUtils.clone(h);c.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(h);d.defaults={shape:"datastore"};var f=mxUtils.clone(h);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=
mxUtils.clone(h);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(h);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 p=mxUtils.clone(h);p.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};p.drawShadow={key:"shadow",mod:"bool"};var x=mxUtils.clone(h);x.defaults={shape:"swimlane",
startSize:20,strokeWidth:4,spacingLeft:10};x.isCollapsible={key:"collapsible",mod:"bool"};x.borderColor={key:"strokeColor",mod:"color"};x.folderFrontColor={key:"fillColor",mod:"color"};var z=mxUtils.clone(h);z.defaults={shape:"swimlane",startSize:20,spacingLeft:10};z["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 E=mxUtils.clone(h);E.defaults={shape:"js:table"};var I=mxUtils.clone(h);I.defaults={shape:"image"};I.image=function(H,K){K.image=H};var J=mxUtils.clone(h);J.defaults={shape:"image"};J["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,K){K.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var O=mxUtils.clone(h);O.defaults={shape:"swimlane",startSize:20};O["y:Shape.type"]=function(H,K){"roundrectangle"==H&&(K.rounded=1,K.arcSize=5)};var M=mxUtils.clone(h);M.defaults={shape:"js:table2"};
var L=mxUtils.clone(h);L.defaults={gradientDirection:"east"};L["y:Fill"].color2={key:"gradientColor",mod:"color"};L["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":h,"demostyle:FlowchartNodeStyle":h,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":g,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":c,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":p,"demostyle:DemoGroupStyle":x,"yjs:CollapsibleNodeStyleDecorator":z,
"bpmn:PoolNodeStyle":E,"yjs:TableNodeStyle":E,"demotablestyle:DemoTableStyle":E,"yjs:ImageNodeStyle":I,"y:ShapeNode":h,"y:GenericNode":L,"y:GenericGroupNode":L,"y:TableNode":M,"y:SVGNode":J,"y:GroupNode":O},A)};
mxGraphMlCodec.prototype.handleTemplates=function(h,y,A,B){if(h){var m=A.geometry.width,g=A.geometry.height;A='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+g+'"><g>';for(var b,a=[],c=/\{TemplateBinding\s+([^}]+)\}/g;null!=(b=c.exec(h));){var d="";switch(b[1]){case "width":d=m;break;case "height":d=g}a.push({match:b[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(b=m.exec(h));)if(g=b[1].split(","),
c=y[g[0]])1<g.length&&g[1].indexOf("Converter=")&&(d=mxGraphMlConverters[g[1].substr(11)])&&(c=[c],g[2]&&c.push(g[2].substr(11)),c=d.apply(null,c)),a.push({match:b[0],repl:mxUtils.htmlEntities(c)});for(b=0;b<a.length;b++)h=h.replace(a[b].match,a[b].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(b=y.exec(h));)c=b[0].substr(0,b[0].length-7)+b[1]+"</text>",a.push({match:b[0],repl:c});for(b=0;b<a.length;b++)h=h.replace(a[b].match,a[b].repl);h=A+h+"</g></svg>";B.shape="image";B.image=
"data:image/svg+xml,"+(window.btoa?btoa(h):Base64.encode(h))}};
mxGraphMlCodec.prototype.handleCompoundShape=function(h,y,A,B){var m=y.shape;if(m&&0==m.indexOf("js:")){switch(m){case "js:bpmnArtifactShadow":y.shadow="1";case "js:bpmnArtifact":y.shape=y.symbol;delete y.fillColor;delete y.strokeColor;delete y.gradientColor;this.handleCompoundShape(h,y,A,B);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":y.shape="note;size=16";A=A["bpmn:DataObjectNodeStyle"]||A["y:GenericNode"]||A["y:GenericGroupNode"];B={};this.mapObject(A,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType",
"com.yworks.bpmn.marker1":"marker1"}},B);if("true"==A.collection||"bpmn_marker_parallel"==B.marker1){var g=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");g.vertex=!0;g.geometry.relative=!0;g.geometry.offset=new mxPoint(-5,-10);h.insert(g)}if("INPUT"==A.type||"data_object_type_input"==B.dataObjectType)g=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),g.vertex=!0,g.geometry.relative=!0,g.geometry.offset=new mxPoint(2,
2),h.insert(g);else if("OUTPUT"==A.type||"data_object_type_output"==B.dataObjectType)g=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),g.vertex=!0,g.geometry.relative=!0,g.geometry.offset=new mxPoint(2,2),h.insert(g);break;case "js:BpmnChoreography":this.mapObject(A,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},y);g=h.geometry;g=new mxCell("",new mxGeometry(0,g.height-
20,g.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");g.vertex=!0;h.insert(g);B&&B.lblTxts&&(h.value=B.lblTxts[0],g.value=B.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":y.shape="ext;rounded=1";B={};A=A["y:GenericNode"]||A["y:GenericGroupNode"];this.mapObject(A,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3",
"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":b=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_user":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");
b.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":b=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":b=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");b.geometry.offset=new mxPoint(4,7);break;case "task_type_service":b=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");b.geometry.offset=new mxPoint(4,5);break;case "task_type_script":b=
new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geometry.offset=new mxPoint(4,5)}b&&(b.vertex=!0,b.geometry.relative=!0,h.insert(b),b=null);var a=0;for(g=1;4>=g;g++)B["marker"+g]&&a++;A=-7.5*a-2*(a-1);for(g=1;g<=a;g++){switch(B["marker"+g]){case "bpmn_marker_closed":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_open":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");b.geometry.offset=
new mxPoint(A,-20);var c=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");c.geometry.offset=new mxPoint(-4,-1);c.geometry.relative=!0;c.vertex=!0;b.insert(c);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_sequential":b=new mxCell("",
new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(A,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(A,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(A,-18)}b.geometry.relative=!0;b.vertex=!0;h.insert(b);
A+=20}break;case "js:table":y.shape="swimlane;collapsible=0;swimlaneLine=0";B=A["yjs:TableNodeStyle"]||A["demotablestyle:DemoTableStyle"];!B&&A["bpmn:PoolNodeStyle"]&&(B=A["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(B,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",
mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},y);y.swimlaneFillColor=y.fillColor;B=B.table["y:Table"];var d=a=0,f={x:0};A=0;(g=B.Insets)?(g=g.split(","),"0"!=g[0]?(y.startSize=g[0],f.x=parseFloat(g[0]),y.horizontal="0"):"0"!=g[1]&&(y.startSize=g[1],A=parseFloat(g[1]),d+=A)):y.startSize="0";var k={},n={Insets:function(z,E){E.startSize=z.split(",")[0]},
mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":n},k);b={};c={Insets:function(z,E){E.startSize=z.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",
"y:StripeDefaults":c},b);g=h.geometry;a=B.Rows["y:Row"];d+=parseFloat(b.startSize);var p=f.x,x=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),g=0;g<a.length;g++)f.x=x,f.lx=x,d=this.addRow(a[g],h,g&1,d,f,n,k),p=Math.max(f.x,p);B=B.Columns["y:Column"];a=p;if(B)for(B instanceof Array||(B=[B]),g=0;g<B.length;g++)a=this.addColumn(B[g],h,g&1,a,A,c,b);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(A,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",
POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;n=b=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?n=parseFloat(B.tblHWidth):b=parseFloat(B.tblHHeight);
y.startSize=b?b:n;try{a=A["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];c=A["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);c instanceof Array||(c=[c]);f=parseFloat(B.rowHWidth);for(g=0;g<a.length;g++)a[g]["y:Insets"]&&(f=Math.max(f,parseFloat(a[g]["y:Insets"].left)+parseFloat(a[g]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(g=0;g<c.length;g++)c[g]["y:Insets"]&&(k=Math.max(k,parseFloat(c[g]["y:Insets"].top)+
parseFloat(c[g]["y:Insets"].bottom)));d?(this.addTbl2Rows(h,a,b,n,f,k,d,B),this.addTbl2Cols(h,c,b,n,f,k,d,B)):(this.addTbl2Cols(h,c,b,n,f,k,d,B),this.addTbl2Rows(h,a,b,n,f,k,d,B))}catch(z){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(h=A["y:GenericNode"]["y:Fill"])y.fillColor=h.color2,y.swimlaneFillColor=h.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow=
mxGraphMlCodec.prototype.addTbl2Rows=function(h,y,A,B,m,g,b,a){A+=g;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none",n.swimlaneLine="0");if(b){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].height);p=c&&0==d?g:0;
k.geometry=new mxGeometry(B,A-p,h.geometry.width-B,f+p);A+=f;k.style=this.styleMap2Str(n);h.insert(k)}};
mxGraphMlCodec.prototype.addTbl2Cols=function(h,y,A,B,m,g,b,a){B=m+B;for(var c=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var n={shape:"swimlane;collapsible=0",startSize:g,fillColor:a.secColor||"none",swimlaneLine:c?"0":"1"};0==parseFloat(n.startSize)&&(n.fillColor="none");if(!b){var p=f?a.headerColorAlt:a.headerColor;n.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;n.fillColor=p?p:n.swimlaneFillColor}f=parseFloat(y[d].width);p=c&&0==d?m:0;k.geometry=new mxGeometry(B-p,
A,f+p,h.geometry.height-A);B+=f;k.style=this.styleMap2Str(n);h.insert(k)}};
mxGraphMlCodec.prototype.addRow=function(h,y,A,B,m,g,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(h,g,c);A?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));A=parseFloat(c.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,A);var d=h.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);h=h["y:Row"];m.lx=0;c.startSize&&
(m.lx=parseFloat(c.startSize),m.x+=m.lx);y=c=m.x;d=m.lx;var f=0;if(h){h instanceof Array||(h=[h]);for(var k=0;k<h.length;k++)m.x=c,m.lx=d,f=this.addRow(h[k],a,k&1,f,m,g,b),y=Math.max(m.x,y)}m.x=y;A=Math.max(A,f);a.geometry.height=A;return B+=A};
mxGraphMlCodec.prototype.addColumn=function(h,y,A,B,m,g,b){var a=new mxCell;a.vertex=!0;var c=mxUtils.clone(b);this.mapObject(h,g,c);A?(c.oddFill&&(c.fillColor=c.oddFill),c.oddLaneFill&&(c.swimlaneFillColor=c.oddLaneFill)):(c.evenFill&&(c.fillColor=c.evenFill),c.evenLaneFill&&(c.swimlaneFillColor=c.evenLaneFill));A=parseFloat(c.width);a.geometry=new mxGeometry(B,m,A,y.geometry.height-m);var d=h.Labels;d&&this.addLabels(a,d,c);a.style=this.styleMap2Str(c);y.insert(a);h=h["y:Column"];y=0;if(h)for(h instanceof
Array||(h=[h]),c=0;c<h.length;c++)y=this.addColumn(h[c],a,c&1,y,m,g,b);A=Math.max(A,y);a.geometry.width=A;return B+=A};mxGraphMlCodec.prototype.handleFixedRatio=function(h,y){y=y.shape;h=h.geometry;if(y&&h)if(0<y.indexOf(";aspect=fixed"))y=Math.min(h.height,h.width),y==h.height&&(h.x+=(h.width-y)/2),h.height=y,h.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=h.height;var A=h.width;h.height=A;h.width=y;y=(y-A)/2;h.x-=y;h.y+=y}};
mxGraphMlCodec.prototype.addNodeGeo=function(h,y,A,B){var m=y[mxGraphMlConstants.RECT],g=0,b=0,a=30,c=30;m?(g=m[mxGraphMlConstants.X],b=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],c=m[mxGraphMlConstants.HEIGHT]):(g=y[mxGraphMlConstants.X_L]||g,b=y[mxGraphMlConstants.Y_L]||b,a=y[mxGraphMlConstants.WIDTH_L]||a,c=y[mxGraphMlConstants.HEIGHT_L]||c);h=h.geometry;h.x=parseFloat(g)-A;h.y=parseFloat(b)-B;h.width=parseFloat(a);h.height=parseFloat(c)};
mxGraphMlCodec.prototype.importEdge=function(h,y,A,B,m){var g=this.getDirectChildNamedElements(h,mxGraphMlConstants.DATA),b=h.getAttribute(mxGraphMlConstants.ID),a=h.getAttribute(mxGraphMlConstants.EDGE_SOURCE),c=h.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=h.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);h=h.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];c=this.nodesMap[c];A=y.insertEdge(A,null,"",a.node,c.node,"graphMLId="+b);b={graphMlID:b};for(var f=0;f<g.length;f++){var k=
this.dataElem2Obj(g[f]),n=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(A,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(A,k,b):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(A,k,b,y):n&&(this.addEdgeStyle(A,k,b),k=this.addEdgePath(A,n["y:Path"],b,B,m),n["y:EdgeLabel"]&&this.addLabels(A,n["y:EdgeLabel"],
b,y,k),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(b.exitX=y.pos.x,b.exitY=y.pos.y));c.ports&&h&&(y=c.ports[h],y.pos&&(b.entryX=y.pos.x,b.entryY=y.pos.y));A.style=this.styleMap2Str(b);return A};
mxGraphMlCodec.prototype.addEdgeGeo=function(h,y,A,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],g=0;g<y.length;g++){var b=y[g][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),m.push(new mxPoint(parseFloat(b[0])-A,parseFloat(b[1])-B)))}h.geometry.points=m}};
mxGraphMlCodec.prototype.addEdgePath=function(h,y,A,B,m){var g=[];if(y){var b=parseFloat(y.sx),a=parseFloat(y.sy),c=parseFloat(y.tx),d=parseFloat(y.ty),f=h.source.geometry;0!=b||0!=a?(A.exitX=(b+f.width/2)/f.width,A.exitY=(a+f.height/2)/f.height,g.push(new mxPoint(f.x+A.exitX*f.width-B,f.y+A.exitY*f.height-m))):g.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));b=h.target.geometry;0!=c||0!=d?(A.entryX=(c+b.width/2)/b.width,A.entryY=(d+b.height/2)/b.height,A=new mxPoint(b.x+A.entryX*b.width-B,b.y+
A.entryY*b.height-m)):A=new mxPoint(b.x+b.width/2-B,b.y+b.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);c=[];for(d=0;d<y.length;d++)b=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),c.push(b),g.push(b);h.geometry.points=c}g.push(A)}return g};
mxGraphMlCodec.prototype.addEdgeStyle=function(h,y,A){h=function(a,c){c.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),c.dashPattern=a)};var B=function(a,c){c.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,c){c.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},
g={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,c){"line"!=a&&(c.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&&(c.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,c){c.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,c)},target:function(a,c){c.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,c)}},"y:BendStyle":{smoothed:{key:"rounded",
mod:"bool"}}},b=mxUtils.clone(g);b.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,c){c.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:h,"dashStyle.yjs:DashStyle.dashes":h,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":g,"y:GenericEdge":g,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},A)};
mxGraphMlCodec.prototype.addLabels=function(h,y,A,B,m){A=h.getChildCount();var g=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var b=[],a=[];if(g){g instanceof Array||(g=[g]);for(var c=0;c<g.length;c++){var d=g[c],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},p=function(O,M){O&&(O=O.toUpperCase());var L=M.fontStyle||0;switch(O){case "ITALIC":L|=2;break;case "BOLD":L|=1;break;case "UNDERLINE":L|=4}M.fontStyle=L};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(O,M){O&&(M.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
fontSize:"fontSize",fontStyle:p,fontWeight:p,textDecoration:p}},"Style.y:VoidLabelStyle":function(O,M){M.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:p,underlinedText:function(O,M){var L=M.fontStyle||0;"true"==O&&(L|=4);M.fontStyle=L},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),b.push(f),a.push(n))}}for(c=
0;c<y.length;c++)if(y[c]&&(!a[c]||!a[c]["bpmn:ParticipantParameter"])){y[c]=mxUtils.htmlEntities(y[c],!1).replace(/\n/g,"<br/>");n=h.geometry;f=new mxCell(y[c],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[c]));f.vertex=!0;h.insert(f,A);g=f.geometry;if(a[c]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[c],b[c].fontSize,b[c].fontFamily),(d=a[c]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),g.x=parseFloat(d[0]),g.y=parseFloat(d[1]),
g.width=n.width,g.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[c]["y:InteriorLabelModel"]){switch(a[c]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":g.height=1;break;case "West":g.width=n.height,g.height=n.width,g.y=n.height/2-n.width/2,g.x=-g.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"])switch(a[c]["y:StretchStripeLabelModel"]||a[c]["y:StripeLabelModelParameter"].Position){case "North":g.height=
1;break;case "West":g.width=n.height,g.height=n.width,g.y=n.height/2-n.width/2,g.x=-g.y,f.style+=";rotation=-90;"}else if(a[c]["bpmn:PoolHeaderLabelModel"]){switch(a[c]["bpmn:PoolHeaderLabelModel"]){case "NORTH":g.height=1;break;case "WEST":g.width=n.height,g.height=n.width,g.y=n.height/2-n.width/2,g.x=-g.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[c]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[c]["y:ExteriorLabelModel"])switch(a[c]["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[c]["y:FreeEdgeLabelModelParameter"]){g.relative=!0;g.adjustIt=!0;n=a[c]["y:FreeEdgeLabelModelParameter"];
d=n.Ratio;p=n.Distance;var x=n.Angle;d&&(g.x=parseFloat(d));p&&(g.y=parseFloat(p));x&&(f.style+=";rotation="+parseFloat(x)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[c]["y:EdgePathLabelModelParameter"]){g.relative=!0;n=a[c]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;g.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":g.y=-15;break;case "LeftOfEdge":g.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[c].x),d=parseFloat(a[c].y),a[c].width&&(g.width=
parseFloat(a[c].width)),a[c].height&&(g.height=parseFloat(a[c].height)),h.edge)if(g.relative=!0,g.x=0,g.y=0,f=h.source.geometry.getCenterX()-h.target.geometry.getCenterX(),k=h.source.geometry.getCenterY()-h.target.geometry.getCenterY(),B&&m&&a[c]["y:ModelParameter"]&&a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[c]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];x=parseFloat(n.angle);p=parseFloat(n.distance);var z=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var E=
new mxCellState;E.absolutePoints=m;B.view.updateEdgeBounds(E);var I="left"==z?1:-1;if(-1==n&&6.283185307179586==x)g.offset=new mxPoint(1>Math.abs(d)?E.segments[0]*d:d,I*p);else{-1==n&&(n=0);for(var J=x=0;J<n;J++)x+=E.segments[J];x+=E.segments[n]*d;g.x=x/E.length*2-1;g.y=(("center"==z?0:p)+g.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(g.offset=new mxPoint(n+f/2+(0<f?-g.width:g.width),d));else g.x=n||0,g.y=d||0;b[c].rotation&&270==b[c].rotation&&(g.x-=g.height/2)}return{lblTxts:y,
lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(h,y){h=(new mxCodec).encode(h.getModel());h.setAttribute("style","default-style2");h=mxUtils.getXml(h);y='<diagram name="Page '+y+'">'+Graph.compress(h);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(h,y){var A=[];for(h=h.firstChild;null!=h;h=h.nextSibling)null!=h&&1==h.nodeType&&y==h.nodeName&&A.push(h);return A};
mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(h,y){for(h=h.firstChild;null!=h;h=h.nextSibling)if(null!=h&&1==h.nodeType&&y==h.nodeName)return h;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(h){var y=[];for(h=h.firstChild;null!=h;h=h.nextSibling)null!=h&&1==h.nodeType&&y.push(h);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(h){for(h=h.firstChild;null!=h;h=h.nextSibling)if(null!=h&&1==h.nodeType)return h;return null};
var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(h,y){if("string"===typeof h){for(var A=h;20<A.length&&-1<A.indexOf(" ");)A=A.substring(0,A.lastIndexOf(" "));return"true"===y?A:h.substring(A.length)}return""},"orgchartconverters.borderconverter":function(h,y){return"boolean"===typeof h?h?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(h,y){return"string"===typeof h?"string"===typeof y?"#"+h+y:"#"+h:h},"orgchartconverters.intermediateconverter":function(h,
y){return"string"===typeof h&&17<h.length?h.replace(/^(.)(\S*)(.*)/,"$1.$3"):h},"orgchartconverters.overviewconverter":function(h,y){return"string"===typeof h&&0<h.length?h.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open",
EditorUi.prototype.doImportGraphML=function(h,y,A){(new mxGraphMlCodec).decode(h,y,A)};/*!
/*! @license DOMPurify 3.0.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.0.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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.3",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmod)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
/*! @license DOMPurify 3.0.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.0.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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.3",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmod)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.2",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=
new mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled()&&(this.delayedSelection?this.cell=a:this.start(a,b.getX(),b.getY()),
this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)))};mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
function Dialog(b,e,g,n,y,q,E,K,S,G,L){this.editorUi=b;var R=S?57:0,V=g,d=n,f=S?0:64,l=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(l.height=window.innerHeight);var u=l.height;l=Math.max(1,Math.round((l.width-g-f)/2));var A=Math.max(1,Math.round((u-n-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-f):g;n=Math.min(n,u-f);0<b.dialogs.length&&
q.className="geDialogClose",q.style.top=A+14+"px",q.style.left=l+g+38-R+"px",q.style.zIndex=this.zIndex,mxEvent.addListener(q,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(q),this.dialogImg=q,!L)){var M=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(O){M=!0}),null,mxUtils.bind(this,function(O){M&&(b.hideDialog(!0),M=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var O=G();null!=O&&(V=g=O.w,d=n=O.h)}O=Editor.inlineFullscreen||
var ErrorDialog=function(b,e,g,n,y,q,E,K,S,G,L){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var V=document.createElement("div");V.style.padding="0px";V.style.margin="0px";V.style.fontSize="18px";V.style.paddingBottom="16px";V.style.marginBottom="10px";V.style.borderBottom="1px solid #c0c0c0";V.style.color="gray";V.style.whiteSpace="nowrap";V.style.textOverflow="ellipsis";V.style.overflow="hidden";mxUtils.write(V,e);V.setAttribute("title",e);R.appendChild(V)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=g;R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=L&&L()}),G.className="geBtn",g.appendChild(G));var d=mxUtils.button(n,
PrintDialog.prototype.create=function(b){function e(d){var f=E.checked||G.checked,l=parseInt(R.value)/100;isNaN(l)&&(l=1,R.value="100%");mxClient.IS_SF&&(l*=.75);var u=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,A=1/g.pageScale;if(f){var B=E.checked?1:parseInt(L.value);isNaN(B)||(A=mxUtils.getScaleForPageCount(B,g,u))}var F=B=0;u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*l);u.height=Math.ceil(u.height*l);A*=l;!f&&g.pageVisible?(l=g.getPageLayout(),B-=l.x*u.width,F-=l.y*u.height):
"click",function(d){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(d)});q.appendChild(K);var L=document.createElement("input");L.setAttribute("value","1");L.setAttribute("type","number");L.setAttribute("min","1");L.setAttribute("size","4");L.setAttribute("disabled","disabled");L.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(L);mxUtils.write(K," "+mxResources.get("pages")+" (max)");q.appendChild(K);y.appendChild(q);mxEvent.addListener(G,"change",
function(){G.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");E.checked=!G.checked});q=q.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");q.appendChild(K);K=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";K.appendChild(R);q.appendChild(K);y.appendChild(q);q=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
var PageSetupDialog=function(b){function e(){var l=R;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(L.style.backgroundImage="url("+l.src+")",L.style.display="inline-block"):(L.style.backgroundImage="",L.style.display="none");L.style.backgroundColor="";null!=V&&V!=mxConstants.NONE&&(L.style.backgroundColor=V,L.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var y=document.createElement("tbody");
q.appendChild(E);E=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var L=document.createElement("div");L.style.display="inline-block";L.style.verticalAlign="middle";L.style.backgroundPosition="center center";L.style.backgroundRepeat="no-repeat";L.style.backgroundSize="contain";L.style.border="1px solid lightGray";L.style.borderRadius="4px";L.style.marginRight="14px";L.style.height="32px";
L.style.width="64px";L.style.cursor="pointer";L.style.padding="4px";var R=g.backgroundImage,V=g.background,d=g.shadowVisible,f=function(l){b.showBackgroundImageDialog(function(u,A,B,F){A||(null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src}),R=u,d=F);V=B;e()},R,V,!0);mxEvent.consume(l)};mxEvent.addListener(G,"click",f);mxEvent.addListener(L,"click",f);e();E.appendChild(L);E.appendChild(G);q.appendChild(E);y.appendChild(q);q=document.createElement("tr");E=document.createElement("td");
ja.format.width&&g.height==ja.format.height?(K.value=ja.key,q.setAttribute("checked","checked"),q.defaultChecked=!0,q.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,O=!0):g.width==ja.format.height&&g.height==ja.format.width&&(K.value=ja.key,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,O=E.checked=!0));O?(S.style.display="",L.style.display="none"):(R.value=g.width/100,V.value=g.height/100,q.setAttribute("checked",
"checked"),K.value="custom",S.style.display="none",L.style.display="")}}e="format-"+e;var q=document.createElement("input");q.setAttribute("name",e);q.setAttribute("type","radio");q.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.width=
"206px";var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";q.style.marginRight="6px";S.appendChild(q);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));S.appendChild(G);var L=document.createElement("div");
L.style.marginLeft="4px";L.style.width="210px";L.style.height="24px";var R=document.createElement("input");R.setAttribute("size","7");R.style.textAlign="right";L.appendChild(R);mxUtils.write(L," in x ");var V=document.createElement("input");V.setAttribute("size","7");V.style.textAlign="right";L.appendChild(V);mxUtils.write(L," in");S.style.display="none";L.style.display="none";for(var d={},f=PageSetupDialog.getFormats(),l=0;l<f.length;l++){var u=f[l];d[u.key]=u;var A=document.createElement("option");
A.setAttribute("value",u.key);mxUtils.write(A,u.title);K.appendChild(A)}var B=!1;y();b.appendChild(K);mxUtils.br(b);b.appendChild(S);b.appendChild(L);var F=g,M=function(O,H){O=d[K.value];null!=O.format?(R.value=O.format.width/100,V.value=O.format.height/100,L.style.display="none",S.style.display=""):(S.style.display="none",L.style.display="");O=parseFloat(R.value);if(isNaN(O)||0>=O)R.value=g.width/100;O=parseFloat(V.value);if(isNaN(O)||0>=O)V.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100*
parseFloat(R.value)),Math.floor(100*parseFloat(V.value)));"custom"!=K.value&&E.checked&&(O=new mxRectangle(0,0,O.height,O.width));H&&B||O.width==F.width&&O.height==F.height||(F=O,null!=n&&n(F))};mxEvent.addListener(e,"click",function(O){q.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(G,"click",function(O){E.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(R,"blur",M);mxEvent.addListener(R,"click",M);mxEvent.addListener(V,"blur",M);mxEvent.addListener(V,"click",M);mxEvent.addListener(E,
"change",M);mxEvent.addListener(q,"change",M);mxEvent.addListener(K,"change",function(O){B="custom"==K.value;M(O,!0)});M();return{set:function(O){g=O;y(null,null,!0)},get:function(){return F},widthInput:R,heightInput:V}};
var FilenameDialog=function(b,e,g,n,y,q,E,K,S,G,L,R,V){S=null!=S?S:!0;var d=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),u=document.createElement("td");d.style.margin="0 auto";u.style.textOverflow="ellipsis";u.style.whiteSpace="nowrap";u.style.textAlign="right";u.style.maxWidth=(V?V+15:100)+"px";u.style.fontSize="10pt";u.style.width=(V?V:84)+"px";mxUtils.write(u,(y||mxResources.get("filename"))+":");l.appendChild(u);var A=document.createElement("input");
A.setAttribute("value",e||"");A.style.marginLeft="4px";A.style.width=null!=R?R+"px":"180px";var B=mxUtils.button(g,function(){if(null==q||q(A.value))S&&b.hideDialog(),n(A.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=y||null==E)if(null!=L?Editor.selectFilename(A):(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var F=d.parentNode;if(null!=F){var M=null;mxEvent.addListener(F,"dragleave",
function(O){null!=M&&(M.style.backgroundColor="",M=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=A,M.style.backgroundColor="#ebf2f9");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(O.dataTransfer.getData("text/uri-list")),
B.click());O.stopPropagation();O.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(A);l.appendChild(u);if(null!=y||null==E)f.appendChild(l),null!=L&&(u.appendChild(FilenameDialog.createTypeHint(b,A,L)),null!=b.editor.diagramFileTypes&&(l=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+
2;u.style.paddingTop=null!=L?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});R.className="geBtn";null!=K&&(e=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),e.className="geBtn",u.appendChild(e));b.editor.cancelFirst&&u.appendChild(R);mxEvent.addListener(A,"keypress",function(F){13==F.keyCode&&B.click()});u.appendChild(B);b.editor.cancelFirst||u.appendChild(R);
mxGraphView.prototype.validateBackgroundStyles=function(E,K,S){var G=this.graph;E=null!=E?E:1;var L=null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background,R=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",V="none",d="";if(G.isGridEnabled()||G.gridVisible){d=10;mxClient.IS_SVG?(V=unescape(encodeURIComponent(this.createSvgGrid(R,E))),V=window.btoa?btoa(V):Base64.encode(V,!0),V="url(data:image/svg+xml;base64,"+V+")",d=G.gridSize*this.scale*this.gridSteps*
null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=d,G.view.backgroundPageShape.node.style.backgroundImage=V,G.view.backgroundPageShape.node.style.backgroundColor=L,G.view.backgroundPageShape.node.style.borderColor=G.defaultPageBorderColor,G.container.classList.add("geDiagramBackdrop"),E.style.backgroundImage="none",E.style.backgroundColor="",G.container.style.backgroundColor=R?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),
E.style.backgroundPosition=d,E.style.backgroundImage=V,!R||null!=G.background&&G.background!=mxConstants.NONE?E.style.backgroundColor=L:(E.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E,K){for(K=this.graph.gridSize*this.scale*(null!=K?K:1);K<this.minGridSize;)K*=2;for(var S=this.gridSteps*K,G=[],L=1;L<this.gridSteps;L++){var R=L*K;G.push("M 0 "+R+" L "+S+" "+R+" M "+R+" 0 L "+R+" "+S)}return'<svg width="'+S+'" height="'+
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+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+K,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.view.scale,L=this.view.translate,R=this.pageFormat,V=G*this.pageScale,d=this.view.getBackgroundPageBounds();K=d.width;S=d.height;var f=new mxRectangle(G*
L.x,G*L.y,R.width*V,R.height*V),l=(E=E&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,u=E?Math.ceil(K/f.width)-1:0,A=d.x+K,B=d.y+S;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(F){if(null!=F){for(var M=F==this.horizontalPageBreaks?l:u,O=0;O<=M;O++){var H=F==this.horizontalPageBreaks?[new mxPoint(Math.round(d.x),Math.round(d.y+(O+1)*f.height)),new mxPoint(Math.round(A),
Math.round(d.y+(O+1)*f.height))]:[new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(d.y)),new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(B))];null!=F[O]?(F[O].points=H,F[O].redraw()):(H=new mxPolyline(H,this.pageBreakColor),H.dialect=this.dialect,H.isDashed=this.pageBreakDashed,H.pointerEvents=!1,H.init(this.view.backgroundPane),H.redraw(),F[O]=H)}for(O=M;O<F.length;O++)null!=F[O]&&F[O].destroy();F.splice(M,F.length-M)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,S){for(var G=0;G<K.length;G++){if(this.graph.isTableCell(K[G])||this.graph.isTableRow(K[G]))return!1;if(this.graph.getModel().isVertex(K[G])){var L=this.graph.getCellGeometry(K[G]);if(null!=L&&L.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,S){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,L=this.graph.pageScale,R=G.width*L;G=G.height*L;L=Math.floor(Math.min(0,K)/R);var V=Math.floor(Math.min(0,
S)/G);return new mxRectangle(this.scale*(this.translate.x+L*R),this.scale*(this.translate.y+V*G),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/R)-L)*R,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/G)-V)*G)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,S,G,L,R){var V=y.apply(this,arguments);null==R||R||mxEvent.addListener(V,"mousedown",function(d){mxEvent.consume(d)});return V};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,K,S){var G=this.graph.model.getParent(E);if(K){var L=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);
L=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=L&&L.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(L=q.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))L=G,this.graph.isTable(L)||(L=this.graph.model.getParent(L)),L=!this.graph.selectionCellsHandler.isHandled(L)||this.graph.isCellSelected(L)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&
this.graph.isCellSelected(G);return L};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),S=K.getParent(E),G=this.graph.view.getState(S),L=this.graph.isCellSelected(E);null!=G&&(K.isVertex(S)||K.isEdge(S));){var R=this.graph.isCellSelected(S);L=L||R;if(R||!L&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=K.getParent(S)}return E}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this,y=this.editor.graph;y.lightbox=g;var q=y.getGraphBounds;y.getGraphBounds=function(){var P=q.apply(this,arguments),U=this.backgroundImage;if(null!=U&&null!=U.width&&null!=U.height){var k=this.view.translate,z=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((k.x+U.x)*z,(k.y+U.y)*z,U.width*z,U.height*z))}return P};y.useCssTransforms&&(this.lazyZoomDelay=
S="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),G=!1,L=!1;this.setDefaultStyle=function(P){try{y.getModel().isEdge(P)?L=!1:G=!1;var U=y.getCellStyle(P,!1),k=[],z=[],J;for(J in U)k.push(U[J]),z.push(J);y.getModel().isEdge(P)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",z,"values",k,"cells",[P],"force",!0));y.getModel().isEdge(P)?L=!0:G=!0}catch(W){this.handleError(W)}};
this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);G=L=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var R=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<R.length;e++)0>mxUtils.indexOf(E,R[e])&&E.push(R[e]);var V="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize",
var F=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(P){return F.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var M=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return n.isSpaceDown()||M.apply(this,arguments)};var O=!1,H=null,ja=null,da=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&O!=y.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,
window.setTimeout(function(){null!=n.hoverIcons&&n.hoverIcons.update(y.view.getState(k[k.length-1]))},0));f(k)});this.addListener("styleChanged",mxUtils.bind(this,function(P,U){P=U.getProperty("force");if(this.updateDefaultStyle||P){var k=U.getProperty("cells"),z=P=!1;if(0<k.length)for(var J=0;J<k.length&&(P=y.getModel().isVertex(k[J])||P,!(z=y.getModel().isEdge(k[J])||z)||!P);J++);else z=P=!0;P=P&&!G;z=z&&!L;k=U.getProperty("keys");U=U.getProperty("values");for(J=0;J<k.length;J++){var W=0<=mxUtils.indexOf(R,
EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,n=g.getParent(e[0]),y=g.getParent(n);if(null!=n&&null!=y){for(var q=n.getIndex(e[0]),E=y.getIndex(n),K=null,S=1,G=1,L=0,R=E<y.getChildCount()-1?g.getChildAt(g.getChildAt(y,E+1),q):null;L<e.length-1;){var V=e[++L];null==R||R!=V||null!=K&&S!=K||(K=S,S=0,G++,n=g.getParent(R),R=E+G<y.getChildCount()?g.getChildAt(g.getChildAt(y,E+G),q):null);var d=this.editor.graph.view.getState(V);
if(V==g.getChildAt(n,q+S)&&null!=d&&1==mxUtils.getValue(d.style,"colspan",1)&&1==mxUtils.getValue(d.style,"rowspan",1))S++;else break}L==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};
{willReadFrequently:!0});y.filter="invert(100%) hue-rotate(180deg) saturate(1.3)";g.model.beginUpdate();try{for(var q=0;q<b.length;q++)if(g.model.isEdge(b[q])||g.model.isVertex(b[q])){var E=g.getCurrentCellStyle(b[q]);if(null!=E)for(var K=0;K<e.length;K++)try{var S=E[e[K]];if(null!=S&&"#"==S.charAt(0)){var G=n[S];if(null==G){y.fillStyle=S;y.fillRect(0,0,1,1);var L=y.getImageData(0,0,1,1);G="#"+(16777216|L.data[2]|L.data[1]<<8|L.data[0]<<16).toString(16).substring(1);n[S]=G}g.setCellStyles(e[K],G,
function(){return n.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var y=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var L=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(L.x,L.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
g);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();q.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,L){var R=L.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?E.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(V,d,f){var l=b.getCompositeParent(S.cell);V=b.getCellGeometry(l);for(L.consume();null!=l&&b.model.isVertex(l)&&null!=V&&V.relative;)cell=
l,l=b.model.getParent(cell),V=b.getCellGeometry(l);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(L.getGraphX(),L.getGraphY(),l,mxUtils.bind(this,function(u){f(u);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(u))}),G)}),30)}),mxUtils.bind(this,function(V){this.graph.selectCellsForConnectVertex(V,R,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var L=
G.getProperty("arrow"),R=G.getProperty("direction"),V=G.getProperty("event");L=L.getBoundingClientRect();var d=mxUtils.getOffset(b.container),f=b.container.scrollLeft+L.x-d.x;d=b.container.scrollTop+L.y-d.y;var l=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),u=e.showShapePicker(f,d,l,mxUtils.bind(this,function(A){null!=A&&b.connectVertex(l,R,b.defaultEdgeLength,V,!0,!1,function(B,F,M){M(A);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(A))},
function(B){b.selectCellsForConnectVertex(B)},V,this.hoverIcons)}),R,!0);this.centerShapePicker(u,L,f,d,R);mxUtils.setOpacity(u,30);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K)}))}};
EditorUi.prototype.createShapePicker=function(b,e,g,n,y,q,E,K,S,G,L){L=null!=L?L:!0;var R=this.editor.graph,V=null;S=null!=S?S:function(l){l=l[0];var u=0,A=0,B=l.geometry;null!=B&&(R.model.isEdge(l)&&(l=B.getTerminalPoint(!1),B=new mxRectangle(0,0,l.x,l.y)),u=B.width/2,A=B.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-u),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-A))};if(null!=E&&0<E.length){var d=this;R=this.editor.graph;V=document.createElement("div");
0,A.x,A.y));null!=A&&u.appendChild(this.sidebar.createVertexTemplateFromCells([l],A.width,A.height,"",!0,!1,null,!1,mxUtils.bind(this,function(B){if(!mxEvent.isShiftDown(B)||null==g&&R.isSelectionEmpty()){var F=R.cloneCell(l);if(null!=n)n(F);else{var M=S([F]);R.model.isEdge(F)?F.geometry.translate(M.x,M.y):(F.geometry.x=M.x,F.geometry.y=M.y);R.model.beginUpdate();try{R.addCell(F),R.model.isVertex(F)&&R.isAutoSizeCell(F)&&R.updateCellSize(F)}finally{R.model.endUpdate()}R.setSelectionCell(F);R.scrollCellToVisible(F);
L&&R.startEditing(F);null!=d.hoverIcons&&d.hoverIcons.update(R.view.getState(F))}}else F=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(l,F);null!=q&&q(B);mxEvent.consume(B)}),25,25,null,null,g))});for(G=0;G<(K?Math.min(E.length,4):E.length);G++)y(E[G]);E=V.offsetTop+V.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<E&&(V.style.top=Math.max(R.container.scrollTop+22,e-E)+"px");E=V.offsetLeft+V.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<E&&(V.style.left=
EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var E=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||q.getSelectionCells();E=q.getExportableCells(q.model.getTopmostCells(E));for(var K={},S=q.createCellLookup(E),G=q.cloneCells(E,null,K),L=new mxGraphModel,R=L.getChildAt(L.getRoot(),
0),V=0;V<G.length;V++){L.add(R,G[V]);var d=q.view.getState(E[V]);if(null!=d){var f=q.getCellGeometry(G[V]);null!=f&&f.relative&&!L.isEdge(E[V])&&null==S[mxObjectIdentity.get(L.getParent(E[V]))]&&(f.offset=null,f.relative=!1,f.x=d.x/d.view.scale-d.view.translate.x,f.y=d.y/d.view.scale-d.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(K,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(q){var E=
"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var L=q(mxUtils.bind(this,function(z){this.actions.get("nextPage").funct();mxEvent.consume(z)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";L.style.paddingLeft="4px";L.style.paddingRight=
"0px";var V=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(L.style.display="",S.style.display="",G.style.display="inline-block"):(L.style.display="none",S.style.display="none",G.style.display="none");R()});this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",R)}q(mxUtils.bind(this,function(z){this.actions.get("zoomOut").funct();mxEvent.consume(z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(V=0;V<this.lightboxToolbarActions.length;V++){var F=this.lightboxToolbarActions[V];F.elem=q(F.fn,F.icon,F.tooltip)}if(null!=y.refreshBtn){var M=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);
q(mxUtils.bind(this,function(z){null!=M?window.location.href=M:window.location.reload();mxEvent.consume(z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(z){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&
e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==
e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("copyData").setEnabled(1==e.cells.length);this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("editStyle").setEnabled(1==e.cells.length);this.actions.get("editTooltip").setEnabled(1==
EditorUi.prototype.addSplitHandler=function(b,e,g,n){function y(R){if(null!=E){var V=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));n(Math.max(0,K+(e?V.x-E.x:E.y-V.y)-g));mxEvent.consume(R);K!=L()&&(S=!0,G=null)}}function q(R){y(R);E=K=null}var E=null,K=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var L=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){E=new mxPoint(mxEvent.getClientX(R),
mxEvent.getClientY(R));K=L();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var V=null!=G?G-g:0;G=L();n(V);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
EditorUi.prototype.showError=function(b,e,g,n,y,q,E,K,S,G,L,R,V){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),n,y,q,E,R,K,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,L||100+20*e,!0,!1,V);b.init()};EditorUi.prototype.showDialog=function(b,e,g,n,y,q,E,K,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,n,y,q,E,K,S,G);this.dialogs.push(this.dialog)};
0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(L){}try{var S=q.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(L){}}catch(L){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(y){b(null)})}))["catch"](function(n){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(n){n.text().then(function(y){b(y)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
f=0,37==R?f=-V:38==R?l=-V:39==R?f=V:40==R&&(l=V),B.currentDx+=f*A,B.currentDy+=l*A,B.checkPreview(),B.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=B.first){var F=B.roundLength(B.currentDx/A),M=B.roundLength(B.currentDy/A);B.moveCells(B.cells,F,M);B.reset()}},400))}}}}var g=this,n=this.editor.graph,y=new mxKeyHandler(n),q=y.isEventIgnored;y.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||
mxEvent.isShiftDown(R)?n.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?n.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(R,V,d,f){var l=this.actions.get(d);null!=l&&(d=function(){l.isEnabled()&&l.funct.apply(this,arguments)},V?f?y.bindControlShiftKey(R,d):y.bindControlKey(R,d):f?y.bindShiftKey(R,d):y.bindKey(R,d))});var G=this,L=y.escape;y.escape=function(R){L.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){n.exitGroup()});
!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,
!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){n.isEnabled()&&
n.startEditingAtCell()});mxClient.IS_WIN?y.bindAction(89,!0,"redo"):y.bindAction(90,!0,"redo",!0);return y};
arguments[2])}var K=Number(y.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),g);for(var S=e(this)?Object(new this(K)):Array(K),G=0,L;G<K;)L=y[G],S[G]=q?"undefined"===typeof E?q(L,G):q.call(E,L,G):L,G+=1;S.length=K;return S}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
return null!=X?"1"==X.html||"wrap"==X[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var E=null,K=null,S=null,G=null,L=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(X,P){if("mouseDown"==P.getProperty("eventName")&&this.isEnabled()){X=P.getProperty("event");var U=X.getState();P=this.view.scale;if(!mxEvent.isAltDown(X.getEvent())&&null!=U&&(R=this.isCellSelected(U.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(X.getEvent()))){var k=this.selectionCellsHandler.getHandler(U.cell);
this.isEnabled()){X=P.getProperty("event");var U=X.getState();mxEvent.isAltDown(X.getEvent())||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P)||R||null==U||!this.model.isEdge(U.cell)||(E=new mxPoint(X.getGraphX(),X.getGraphY()),L=this.isCellSelected(U.cell),S=U,K=X,null!=U.text&&null!=U.text.boundingBox&&mxUtils.contains(U.text.boundingBox,X.getGraphX(),X.getGraphY())?G=mxEvent.LABEL_HANDLE:(P=this.selectionCellsHandler.getHandler(U.cell),null!=P&&null!=P.bends&&0<P.bends.length&&(G=P.getHandleForEvent(X))))}}));
if(null!=z&&null!=z.bends&&0<z.bends.length){z.redrawHandles();var J=null!=G?G:z.getHandleForEvent(K),W=this.view.getEdgeStyle(U),T=W==mxEdgeStyle.EntityRelation;k=U.absolutePoints;L||(J=G);J!=mxEvent.LABEL_HANDLE&&null!=k&&(J=G,null==J&&(X=new mxRectangle(E.x,E.y),X.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(X,k[0].x,k[0].y)?J=0:mxUtils.contains(X,k[k.length-1].x,k[k.length-1].y)?J=z.bends.length-1:null!=k&&(null==W&&null==J||W==mxEdgeStyle.SegmentConnector||W==mxEdgeStyle.OrthConnector)&&
this.isCellSelected(U.cell)||(this.selectionCellsHandler.handlers.put(U.cell,z),this.selectCellForEvent(U.cell,P.getEvent())):this.isCellSelected(U.cell)||z.destroy());L=!1;E=K=S=G=null}}else if(U=P.getState(),null!=U&&this.isCellEditable(U.cell)){z=null;if(this.model.isEdge(U.cell)&&!this.isCellSelected(U.cell)&&!mxEvent.isAltDown(P.getEvent())&&!mxEvent.isControlDown(P.getEvent())&&!mxEvent.isShiftDown(P.getEvent())){if(X=new mxRectangle(P.getGraphX(),P.getGraphY()),X.grow(mxEdgeHandler.prototype.handleImage.width/
this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(X){return mxEvent.isShiftDown(X.getEvent())&&mxEvent.isAltDown(X.getEvent())?!1:null!=this.currentState&&X.getState()==this.currentState&&2E3<A||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&F.apply(this,arguments)};var M=this.isToggleEvent;this.isToggleEvent=function(X){return M.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(X)};var O=
1;var E=q[0].getAttribute("width"),K=q[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var S=q[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(K)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/E,n=parseFloat(G[3])/K)}var L=q[0].getBBox();0<L.width&&0<L.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",L.x+" "+L.y+" "+L.width+" "+L.height),g.getElementsByTagName("svg")[0].setAttribute("width",
L.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",L.height/n))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(q[0]))}}}catch(R){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=g.view.graph.tolerance,q=!0,E=null,K=mxUtils.bind(this,function(L){q=!0;E=new mxPoint(mxEvent.getClientX(L),mxEvent.getClientY(L))}),S=mxUtils.bind(this,function(L){q=q&&null!=E&&Math.abs(E.x-mxEvent.getClientX(L))<y&&Math.abs(E.y-mxEvent.getClientY(L))<y}),G=mxUtils.bind(this,function(L){if(q)for(var R=mxEvent.getSource(L);null!=
R&&R!=n.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,L);break}R=R.parentNode}});mxEvent.addGestureListeners(n.node,K,S,G);mxEvent.addListener(n.node,"click",function(L){mxEvent.consume(L)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var n=mxEvent.getSource(g);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
E?E:!0;K=null!=K?K:!0;var S=this.model;return S.filterDescendants(function(G){return E&&S.isVertex(G)||K&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(E,K,S){E=this.getCellStyle(E).newEdgeStyle;if(null!=E){this.model.beginUpdate();try{var G=JSON.parse(E),L;for(L in G)this.setCellStyles(L,G[L],K),"edgeStyle"==L&&"elbowEdgeStyle"==G[L]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",K)}finally{this.model.endUpdate()}}};
Graph.prototype.getCommonStyle=function(E){for(var K={},S=0;S<E.length;S++){var G=this.view.getState(E[S]);null!=G&&this.mergeStyle(G.style,K,0==S)}return K};Graph.prototype.mergeStyle=function(E,K,S){if(null!=E){var G={},L;for(L in E){var R=E[L];null!=R&&(G[L]=!0,null==K[L]&&S?K[L]=R:K[L]!=R&&delete K[L])}for(L in K)G[L]||delete K[L]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||
function(E,K,S,G){null!=E&&(G||(S=null!=S?S:Graph.pasteStyles,Graph.removeKeys(E,function(L){return 0>mxUtils.indexOf(S,L)})),this.updateCellStyles(E,K))};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var S=0;S<K.length;S++)if(this.model.isVertex(K[S])||this.model.isEdge(K[S])){var G=this.getCellStyle(K[S],!1),L=G[mxConstants.STYLE_PERIMETER],R=!1;for(d in E){var V=E[d];if(G[d]!=V){if(d==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[d]&&"umlLifeline"!=V){R=!0;var d="participant"}this.setCellStyles(d,
V,[K[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,L,[K[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(E,K,S,G,L,R){this.useCssTransforms&&
(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,S,G,L,R){G=null!=G?G:!0;L=null!=L?L:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var V=this.model.getChildCount(S)-1;0<=V;V--){var d=this.model.getChildAt(S,V),f=this.getScaledCellAt(E,K,d,G,L,R);if(null!=f)return f;if(this.isCellVisible(d)&&(L&&this.model.isEdge(d)||
K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K=new mxDictionary,S=[],G=0;G<E.length;G++){var L=this.getCompositeParent(E[G]);this.isTableCell(L)&&(L=this.graph.model.getParent(L));this.isTableRow(L)&&(L=this.graph.model.getParent(L));null==L||K.get(L)||(K.put(L,!0),S.push(L))}return S};Graph.prototype.getReferenceTerminal=
this.graph.currentTranslate);y.apply(this,arguments);E&&(this.scale=K,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.useCssTransforms,L=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);G&&(this.view.scale=L,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),n=b.segments,y=b.length,q=g.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var S=[g[0]];K=E/K;e||(K=1-K);for(var G=y*K,L=1;L<q;L++)if(G<=n[L-1]){S.push(new mxPoint(g[L-1].x+(g[L].x-g[L-1].x)*G/n[L-1],g[L-1].y+(g[L].y-g[L-1].y)*G/n[L-1]));break}else G-=n[L-1],S.push(g[L]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var K=g?"getUTC":"get",S=b[K+"Date"](),G=b[K+"Day"](),L=b[K+"Month"](),R=b[K+"FullYear"](),V=b[K+"Hours"](),d=b[K+"Minutes"](),f=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var l=g?0:b.getTimezoneOffset(),u={d:S,dd:E(S),ddd:n.i18n.dayNames[G],dddd:n.i18n.dayNames[G+7],m:L+1,mm:E(L+1),mmm:n.i18n.monthNames[L],mmmm:n.i18n.monthNames[L+
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var n=this.getModel(),y=n.getChildCount(n.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function K(){n.isVisible(E)?(L.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(L.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[S]));var L=document.createElement("img");L.setAttribute("draggable","false");L.setAttribute("align","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.width="16px";L.style.padding="0px 6px 0 4px";e&&(L.style.filter="invert(100%)",L.style.top="-2px");G.appendChild(L);mxUtils.write(G,S);g.appendChild(G);
Graph.prototype.connectVertex=function(b,e,g,n,y,q,E,K){q=q?q:!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),L=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(L.x+=G.geometry.width/2,L.y-=g):e==
mxConstants.DIRECTION_SOUTH?(L.x+=G.geometry.width/2,L.y+=G.geometry.height+g):(L.x=e==mxConstants.DIRECTION_WEST?L.x-g:L.x+(G.geometry.width+g),L.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var V=this.view.translate;G=V.x*g;V=V.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,V=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(L.x+=b.parent.geometry.x,L.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(G+L.x*g,V+L.y*g)).grow(40*g);q=null!=q?
!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||y;A&&("1"!=urlParams.sketch||y)&&(e==mxConstants.DIRECTION_NORTH?L.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?L.y+=b.geometry.height/2:L.x=e==mxConstants.DIRECTION_WEST?L.x-b.geometry.width/2:L.x+b.geometry.width/2);var B=[],F=f;f=d;y=mxUtils.bind(this,function(M){if(null==E||null!=M||null==f&&S){this.model.beginUpdate();try{if(null==F&&A){var O=this.getAbsoluteParent(null!=M?M:b);O=S?b:this.getCompositeParent(O);F=null!=M?M:this.duplicateCells([O],
!1)[0];null!=M&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var H=this.getCellGeometry(F);null!=H&&(null!=M&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?L.y-=H.height/2:e==mxConstants.DIRECTION_SOUTH?L.y+=H.height/2:L.x=e==mxConstants.DIRECTION_WEST?L.x-H.width/2:L.x+H.width/2),H.x=L.x-H.width/2,H.y=L.y-H.height/2);null!=d?(this.addCells([F],d,null,null,null,!0),f=null):A&&!S&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var ja=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&A||null==f&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());null!=ja&&(B.push(ja),this.applyNewEdgeStyle(b,[ja],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ja,b));if(null==f&&null!=F&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var da=b.parent.getIndex(b);this.model.add(b.parent,F,da)}null==f&&null!=F&&B.push(F);null==F&&null!=ja&&ja.geometry.setTerminalPoint(L,!1);null!=ja&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[ja]))}finally{this.model.endUpdate()}}if(null!=K)K(B);else return B});if(null==E||null!=F||!A||null==f&&S)return y(F);E(G+L.x*g,V+L.y*g,y)};
Graph.prototype.foldCells=function(b,e,g,n,y){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<g.length;q++){var E=this.view.getState(g[q]),K=this.getCellGeometry(g[q]);if(null!=E&&null!=K){var S=0,G=0;if(K.alternateBounds)S=K.width-K.alternateBounds.width,G=K.height-K.alternateBounds.height;else{var L=this.useCssTransforms?1:this.view.scale;
S=Math.round(K.width-E.width/L);G=Math.round(K.height-E.height/L)}if(0!=G||0!=S){var R=this.model.getParent(g[q]),V=this.layoutManager.getLayout(R);null==V?null!=y&&this.isMoveCellsEvent(y,E)&&this.moveSiblings(E,R,S,G):null!=y&&mxEvent.isAltDown(y)||V.constructor!=mxStackLayout||V.resizeLast||this.resizeParentStacks(R,V,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,S,G){if(null!=g){var L=new mxRectangle(S,G,K.clientWidth,K.clientHeight);mxUtils.intersects(L,g)&&(K==this.arrowUp?G-=L.y+L.height-g.y:K==this.arrowRight?S+=g.x+g.width-L.x:K==this.arrowDown?G+=g.y+g.height-L.y:K==this.arrowLeft&&(S-=L.x+L.width-g.x))}K.style.left=S+"px";K.style.top=G+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
Graph.prototype.visitTableCells=function(b,e){var g=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<n.length;y++){for(var q=this.getActualStartSize(n[y],!0),E=this.model.getChildCells(n[y],!0),K=this.getCellStyle(n[y],!0),S=null,G=[],L=0;L<E.length;L++){var R=this.getCellGeometry(E[L]),V={cell:E[L],rospan:1,colspan:1,row:y,col:L,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;V.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+q.x),R.height+(null!=g&&null!=
g[0]?g[0].point.y:b.y+q.y));V.actual=V;null!=g&&null!=g[L]&&1<g[L].rowspan?(V.rowspan=g[L].rowspan-1,V.colspan=g[L].colspan,V.actual=g[L].actual):null!=S&&1<S.colspan?(V.rowspan=S.rowspan,V.colspan=S.colspan-1,V.actual=S.actual):(S=this.getCurrentCellStyle(E[L],!0),null!=S&&(V.rowspan=parseInt(S.rowspan||1),V.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(V,E.length,
Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var n=this.getModel();n.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=e;n.setGeometry(b,y);var q=n.getParent(b),E=n.getChildCells(q,!0);if(!g){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var S=E[K+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,n.setGeometry(S,G))}}var L=this.getCellGeometry(q);null!=L&&(g||(g=b==E[E.length-1]),g&&(L=L.clone(),L.height+=e,n.setGeometry(q,L)))}}finally{n.endUpdate()}};
Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var n=this.getModel(),y=n.getParent(b),q=n.getParent(y),E=n.getChildCells(y,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;n.beginUpdate();try{for(var S=n.getChildCells(q,!0),G=0;G<S.length;G++){y=S[G];E=n.getChildCells(y,!0);var L=E[b],R=this.getCellGeometry(L);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),n.setGeometry(L,R));b<E.length-1&&(L=E[b+1],R=this.getCellGeometry(L),null!=R&&(R=R.clone(),
R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),n.setGeometry(L,R)))}if(K||g){var V=this.getCellGeometry(q);null!=V&&(V=V.clone(),V.width+=e,n.setGeometry(q,V))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(n,"resizeLastRow","0"),q="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,L=E.getChildCells(b,!0),R=0;R<L.length;R++)E.setVisible(L[R],!0);var V=this.getSize(L,!1);if(0<S&&0<G&&0<
L.length&&0<V){if(y){var d=this.graph.getCellGeometry(L[L.length-1]);null!=d&&(d=d.clone(),d.height=S-V+d.height,E.setGeometry(L[L.length-1],d))}var f=q?null:this.getRowLayout(L[0],G),l=[],u=e.y;for(R=0;R<L.length;R++)d=this.graph.getCellGeometry(L[R]),null!=d&&(d=d.clone(),d.x=e.x,d.width=G,d.y=Math.round(u),u=y||n?u+d.height:u+d.height/V*S,d.height=Math.round(u)-d.y,E.setGeometry(L[R],d)),K=Math.max(K,this.layoutRow(L[R],f,d.height,G,l));n&&S<V&&(g=g.clone(),g.height=u+e.height,E.setGeometry(b,
g));q&&G<K+Graph.minTableColumnWidth&&(g=g.clone(),g.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(A){E.setVisible(A.cell,A.actual.cell==A.cell);if(A.actual.cell!=A.cell){if(A.actual.row==A.row){var B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo;A.actual.geo.width+=B.width}A.actual.col==A.col&&(B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo,A.actual.geo.height+=B.height)}}))}else for(R=0;R<L.length;R++)E.setVisible(L[R],
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(L,R){R=null!=R?R:!0;var V=this.getState(L);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&!V.invalid&&this.updateLineJumps(V)&&this.graph.cellRenderer.redraw(V,!1,this.isRendering());V=e.apply(this,
arguments);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(V);return V};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var L=this.node.getElementsByTagName("path");if(1<L.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&L[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var R=this.state.view.graph.getFlowAnimationStyle();null!=R&&L[1].setAttribute("class",R.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(L,R){return n.apply(this,arguments)||null!=L.routedPoints&&null!=R.routedPoints&&!mxUtils.equalPoints(R.routedPoints,L.routedPoints)};var y=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(L){y.apply(this,arguments);this.graph.model.isEdge(L.cell)&&1!=L.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(L)};mxGraphView.prototype.updateLineJumps=function(L){var R=L.absolutePoints;if(Graph.lineJumpsEnabled){var V=null!=L.routedPoints,d=null;if(null!=R&&null!=this.validEdges&&"none"!==mxUtils.getValue(L.style,"jumpStyle","none")){var f=function(ia,ma,aa){var la=new mxPoint(ma,aa);la.type=ia;d.push(la);la=null!=L.routedPoints?L.routedPoints[d.length-1]:null;return null==la||
la.type!=ia||la.x!=ma||la.y!=aa},l=.5*this.scale;V=!1;d=[];for(var u=0;u<R.length-1;u++){for(var A=R[u+1],B=R[u],F=[],M=R[u+2];u<R.length-2&&mxUtils.ptSegDistSq(B.x,B.y,M.x,M.y,A.x,A.y)<1*this.scale*this.scale;)A=M,u++,M=R[u+2];V=f(0,B.x,B.y)||V;for(var O=0;O<this.validEdges.length;O++){var H=this.validEdges[O],ja=H.absolutePoints;if(null!=ja&&mxUtils.intersects(L,H)&&"1"!=H.style.noJump)for(H=0;H<ja.length-1;H++){var da=ja[H+1],ca=ja[H];for(M=ja[H+2];H<ja.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,
M.x,M.y,da.x,da.y)<1*this.scale*this.scale;)da=M,H++,M=ja[H+2];M=mxUtils.intersection(B.x,B.y,A.x,A.y,ca.x,ca.y,da.x,da.y);if(null!=M&&(Math.abs(M.x-B.x)>l||Math.abs(M.y-B.y)>l)&&(Math.abs(M.x-A.x)>l||Math.abs(M.y-A.y)>l)){da=M.x-B.x;ca=M.y-B.y;M={distSq:da*da+ca*ca,x:M.x,y:M.y};for(da=0;da<F.length;da++)if(F[da].distSq>M.distSq){F.splice(da,0,M);M=null;break}null==M||0!=F.length&&F[F.length-1].x===M.x&&F[F.length-1].y===M.y||F.push(M)}}}for(H=0;H<F.length;H++)V=f(1,F[H].x,F[H].y)||V}M=R[R.length-
1];V=f(0,M.x,M.y)||V}L.routedPoints=d;return V}return!1};var q=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(L,R,V){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)q.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-
2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),u=!0,A=null,B=null,F=[],M=null;L.begin();for(var O=0;O<this.state.routedPoints.length;O++){var H=this.state.routedPoints[O],ja=new mxPoint(H.x/this.scale,H.y/this.scale);0==O?ja=R[0]:O==this.state.routedPoints.length-1&&(ja=R[R.length-1]);var da=!1;if(null!=A&&1==H.type){var ca=this.state.routedPoints[O+1];H=ca.x/this.scale-ja.x;ca=ca.y/this.scale-ja.y;H=H*H+ca*ca;null==M&&(M=new mxPoint(ja.x-A.x,ja.y-A.y),B=Math.sqrt(M.x*M.x+
M.y*M.y),0<B?(M.x=M.x*f/B,M.y=M.y*f/B):M=null);H>f*f&&0<B&&(H=A.x-ja.x,ca=A.y-ja.y,H=H*H+ca*ca,H>f*f&&(da=new mxPoint(ja.x-M.x,ja.y-M.y),H=new mxPoint(ja.x+M.x,ja.y+M.y),F.push(da),this.addPoints(L,F,V,d,!1,null,u),F=0>Math.round(M.x)||0==Math.round(M.x)&&0>=Math.round(M.y)?1:-1,u=!1,"sharp"==l?(L.lineTo(da.x-M.y*F,da.y+M.x*F),L.lineTo(H.x-M.y*F,H.y+M.x*F),L.lineTo(H.x,H.y)):"line"==l?(L.moveTo(da.x+M.y*F,da.y-M.x*F),L.lineTo(da.x-M.y*F,da.y+M.x*F),L.moveTo(H.x-M.y*F,H.y+M.x*F),L.lineTo(H.x+M.y*F,
H.y-M.x*F),L.moveTo(H.x,H.y)):"arc"==l?(F*=1.3,L.curveTo(da.x-M.y*F,da.y+M.x*F,H.x-M.y*F,H.y+M.x*F,H.x,H.y)):(L.moveTo(H.x,H.y),u=!0),F=[H],da=!0))}else M=null;da||(F.push(ja),A=ja)}this.addPoints(L,F,V,d,!1,null,u);L.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(L,R,V,d){return null!=R&&"centerPerimeter"==R.style[mxConstants.STYLE_PERIMETER]?new mxPoint(R.getCenterX(),R.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(L,R,V,d){if(null==R||null==L||"1"!=R.style.snapToPoint&&"1"!=L.style.snapToPoint)K.apply(this,arguments);else{R=this.getTerminalPort(L,R,d);var f=this.getNextPoint(L,V,d),l=this.graph.isOrthogonal(L),u=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),A=new mxPoint(R.getCenterX(),R.getCenterY());if(0!=u){var B=Math.cos(-u),F=Math.sin(-u);f=mxUtils.getRotatedPoint(f,B,F,A)}B=parseFloat(L.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);B+=parseFloat(L.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==u&&l,B);0!=u&&(B=Math.cos(u),F=Math.sin(u),f=mxUtils.getRotatedPoint(f,B,F,A));L.setAbsoluteTerminalPoint(this.snapToAnchorPoint(L,R,V,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(L,R,V,d,f){if(null!=R&&null!=L){L=this.graph.getAllConnectionConstraints(R);d=V=null;if(null!=L)for(var l=0;l<L.length;l++){var u=this.graph.getConnectionPoint(R,
L[l]);if(null!=u){var A=(u.x-f.x)*(u.x-f.x)+(u.y-f.y)*(u.y-f.y);if(null==d||A<d)V=u,d=A}}null!=V&&(f=V)}return f};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(L,R,V){var d=S.apply(this,arguments);"1"==L.getAttribute("placeholders")&&null!=V.state&&(d=V.state.view.graph.replacePlaceholders(V.state.cell,d));return d};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(L){if(null!=L.style&&"undefined"!==typeof pako){var R=
mxUtils.getValue(L.style,mxConstants.STYLE_SHAPE,null);if(null!=R&&"string"===typeof R&&"stencil("==R.substring(0,8))try{var V=R.substring(8,R.length-1),d=mxUtils.parseXml(Graph.decompress(V));return new mxShape(new mxStencil(d.documentElement))}catch(f){null!=window.console&&console.log("Error in shape: "+f)}}return G.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(v){return null!=v&&S.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellMovable(this.model.getParent(v)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(v){var N=this.model.getParent(v);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==N||!this.isTable(N))};var L=Graph.prototype.splitEdge;
Graph.prototype.splitEdge=function(v,N,Q,Y,ea,ka,oa,wa){null==wa&&(wa=this.model.getParent(v),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=L.apply(this,[v,N,Q,Y,ea,ka,oa,wa]);this.model.setValue(Q,"");var sa=this.getChildCells(Q,!0);for(N=0;N<sa.length;N++){var ua=this.getCellGeometry(sa[N]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(sa[N])}var Fa=this.getChildCells(v,!0);for(N=0;N<Fa.length;N++)ua=this.getCellGeometry(Fa[N]),
wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var M=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(v,N){if(null!=this.textarea)if(v=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=v){var Q=v.view.scale;this.bounds=mxRectangle.fromRectangle(v);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=
Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",M.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(v,N){if("0"==mxUtils.getValue(v.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var Q=this.graph.getEditingValue(v.cell,N);"1"==mxUtils.getValue(v.style,"nl2Br",
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function R(){mxShape.call(this)}
function V(){mxShape.call(this)}function d(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function f(){mxActor.call(this)}function l(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");
c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.close(),c.fill()),c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.end(),c.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(L,G);mxCellRenderer.registerShape("note2",L);L.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=
this.scale,0,0,0):null};L.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,m,x,p,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,t)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",M);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,
new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ma.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,m,x,p){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=t?M.prototype.fixedSize:M.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));t&&(C*=m.view.scale);var D=c.x,fa=c.y,I=c.width,va=c.height;m=null!=m?mxUtils.getValue(m.style,
"size",G.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[hb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,
!0,aa.prototype.fixedSize),hexagon:gb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:gb(H.prototype.size,!1),display:gb(Sa.prototype.size,!1),cube:ub(1,n.prototype.size,!1),card:ub(.5,A.prototype.size,!0),loopLimit:ub(.5,v.prototype.size,!0),trapezoid:tb(.5,O.prototype.size,O.prototype.fixedSize),parallelogram:tb(1,M.prototype.size,M.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=Ab;var Db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
.25),!1)];M.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;F.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),
Actions.prototype.init=function(){function b(G){q.escape();G=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),G);null!=G&&q.setSelectionCells(G)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),L=0;L<G.length;L++)q.cellLabelChanged(G[L],"")}finally{q.getModel().endUpdate()}}}function g(G,L,R,V,d){d.getModel().beginUpdate();try{var f=d.getCellGeometry(G);null!=f&&R&&V&&(R/=V,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,d.getModel().setGeometry(G,
f));d.setCellStyles(mxConstants.STYLE_CLIP_PATH,L,[G]);d.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{d.getModel().endUpdate()}}var n=this.editorUi,y=n.editor,q=y.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),
function(){q.popupMenuHandler.hideMenu();var G=q.view.scale,L=q.container.scrollLeft,R=q.container.scrollTop,V=q.view.translate.x,d=q.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(G-q.view.scale)&&5>Math.abs(L-q.container.scrollLeft)&&5>Math.abs(R-q.container.scrollTop)&&V==q.view.translate.x&&d==q.view.translate.y&&n.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){q.isEnabled()&&(q.isSelectionEmpty()?n.actions.get("smartFit").funct():
q.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,L){try{var R=mxUtils.parseXml(G);y.graph.setSelectionCells(y.graph.importGraphModel(R.documentElement))}catch(V){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+V.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null!=G&&q.removeCells(G,!1)}catch(L){}try{null==G&&mxClipboard.cut(q)}catch(L){n.handleError(L)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(G){}try{mxClipboard.copy(q)}catch(G){n.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(L){if(null!=L){q.getModel().beginUpdate();
try{n.pasteXml(L,!0)}finally{q.getModel().endUpdate()}}else mxClipboard.paste(q)}),G=!0)}catch(L){}G||mxClipboard.paste(q)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function L(V){if(null!=V){for(var d=!0,f=0;f<V.length&&d;f++)d=d&&q.model.isEdge(V[f]);var l=q.view.translate;f=q.view.scale;var u=l.x,A=l.y;l=null;if(1==V.length&&d){var B=q.getCellGeometry(V[0]);null!=B&&(l=B.getTerminalPoint(!0))}l=null!=l?l:q.getBoundingBoxFromGeometry(V,d);null!=l&&(d=Math.round(q.snap(q.popupMenuHandler.triggerX/
f-u)),f=Math.round(q.snap(q.popupMenuHandler.triggerY/f-A)),q.cellsMoved(V,d-l.x,f-l.y))}}function R(){q.getModel().beginUpdate();try{L(mxClipboard.paste(q))}finally{q.getModel().endUpdate()}}if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(V){if(null!=V){q.getModel().beginUpdate();try{L(n.pasteXml(V,!0))}finally{q.getModel().endUpdate()}}else R()}),G=!0)}catch(V){}G||R()}});this.addAction("swap",function(){var G=
q.getSelectionCells(),L=q.getModel();if(2==G.length&&L.isVertex(G[0])&&L.isVertex(G[1])&&2==q.getMovableCells(G).length){var R=q.getCellGeometry(G[0]),V=q.getCellGeometry(G[1]);if(null!=R&&null!=V){R=R.clone();V=V.clone();L.beginUpdate();try{L.setGeometry(G[0],V),L.setGeometry(G[1],R)}finally{L.endUpdate()}}}});this.addAction("copySize",function(){var G=q.getSelectionCell();q.isEnabled()&&null!=G&&q.getModel().isVertex(G)&&(G=q.getCellGeometry(G),null!=G&&(n.copiedSize=new mxRectangle(G.x,G.y,G.width,
G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedSize){q.getModel().beginUpdate();try{for(var G=q.getResizableCells(q.getSelectionCells()),L=0;L<G.length;L++)if(q.getModel().isVertex(G[L])){var R=q.getCellGeometry(G[L]);null!=R&&(R=R.clone(),R.width=n.copiedSize.width,R.height=n.copiedSize.height,q.getModel().setGeometry(G[L],R))}}finally{q.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",
function(){var G=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(n.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,L){function R(f,l){var u=V.getValue(f);l=f.cloneValue(l);l.removeAttribute("placeholders");null==u||isNaN(u.nodeType)||l.setAttribute("placeholders",u.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||l.setAttribute("label",q.convertValueToString(f));V.setValue(f,l)}G=null!=
L?L:G;var V=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedValue){V.beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());if(0==d.length)R(V.getRoot(),n.copiedValue);else for(L=0;L<d.length;L++)R(d[L],n.copiedValue)}finally{V.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,L){G=null!=L?L:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",
G.colspan,[G.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=n.getSelectionState();if(0<G.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,G.cells),q.setCellStyles("colspan",null,G.cells)}finally{q.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,L){G=null!=L?L:G;q.turnShapes(q.getResizableCells(q.getSelectionCells()),
!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){q.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),L=q.getCurrentCellStyle(q.getSelectionCell()),R=1==mxUtils.getValue(L,mxConstants.STYLE_EDITABLE,1)?0:1;q.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);q.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);q.setCellStyles(mxConstants.STYLE_ROTATABLE,R,
mxUtils.sortCells(q.getSelectionCells(),!0);1!=G.length||q.isTable(G[0])||q.isTableRow(G[0])?(G=q.getCellsForGroup(G),1<G.length&&q.setSelectionCell(q.groupCells(null,0,G))):q.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(q.isEnabled()){var G=q.getEditableCells(q.getSelectionCells());q.model.beginUpdate();try{var L=q.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)q.model.contains(G[R])&&(0==q.model.getChildCount(G[R])&&q.model.isVertex(G[R])&&
q.setCellStyles("container","0",[G[R]]),L.push(G[R]))}finally{q.model.endUpdate()}0<L.length&&q.setSelectionCells(L)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var G=q.getSelectionCells();if(null!=G){for(var L=[],R=0;R<G.length;R++)q.isTableRow(G[R])||q.isTableCell(G[R])||L.push(G[R]);q.removeCellsFromParent(L)}}});this.addAction("edit",function(){q.isEnabled()&&q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=
q.getSelectionCell()||q.getModel().getRoot();n.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var L="";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(L=R)}L=new TextareaDialog(n,
mxResources.get("editTooltip")+":",L,function(V){q.setTooltipForCell(G,V)});n.showDialog(L.container,320,200,!0,!0);L.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=q.getLinkForCell(q.getSelectionCell());null!=G&&q.openLink(G)});this.addAction("editLink...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var L=q.getLinkForCell(G)||"";n.showLinkDialog(L,mxResources.get("apply"),function(R,V,d){R=mxUtils.trim(R);q.setLinkForCell(G,
n.showLinkDialog("",mxResources.get("insert"),function(G,L,R){G=mxUtils.trim(G);if(0<G.length){var V=null,d=q.getLinkTitle(G);null!=L&&0<L.length&&(V=L[0].iconUrl,d=L[0].name||L[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));L=new mxCell(d,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=V?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+V:"spacing=10;"));L.vertex=!0;V=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([L],
!0));L.geometry.x=V.x;L.geometry.y=V.y;q.setAttributeForCell(L,"linkTarget",R);q.setLinkForCell(L,G);q.cellSizeUpdated(L,!0);q.getModel().beginUpdate();try{L=q.addCell(L),q.fireEvent(new mxEventObject("cellsInserted","cells",[L]))}finally{q.getModel().endUpdate()}q.setSelectionCell(L);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var G=q.getSelectedElement(),
L=q.getParentByName(G,"A",q.cellEditor.textarea),R="";if(null==L&&null!=G&&null!=G.getElementsByTagName)for(var V=G.getElementsByTagName("a"),d=0;d<V.length&&null==L;d++)V[d].textContent==G.textContent&&(L=V[d]);null!=L&&"A"==L.nodeName&&(R=L.getAttribute("href")||"",q.selectNode(L));var f=q.cellEditor.saveSelection();n.showLinkDialog(R,mxResources.get("apply"),mxUtils.bind(this,function(l){q.cellEditor.restoreSelection(f);null!=l&&q.insertLink(l)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():
this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=q.getSelectionCells();if(null!=G){q.getModel().beginUpdate();try{for(var L=0;L<G.length;L++){var R=G[L];q.getModel().isVertex(R)&&(0<q.getModel().getChildCount(R)?q.updateGroupBounds([R],0,!0):q.updateCellSize(R))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();
var G=q.getCommonStyle(q.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var L=q.getEditableCells(q.getSelectionCells()),R=0;R<L.length;R++)if(state=q.getView().getState(L[R]),null!=state){var V=mxUtils.getValue(state.style,"html","0");if("1"==V&&null==G)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",G,[L[R]]);else if("0"==V&&"1"==G){var d=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,
"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(d));q.setCellStyles("html",G,[L[R]])}}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",L))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=q.getView().getState(q.getSelectionCell()),L="wrap";q.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(L=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,L)});this.addAction("rotation",
function(){var G="0",L=q.getView().getState(q.getSelectionCell());null!=L&&(G=L.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(n,G,mxResources.get("apply"),function(R){null!=R&&0<R.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){q.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){q.isFastZoomEnabled()?
mxUtils.bind(this,function(L){L=parseInt(L);!isNaN(L)&&0<L&&q.zoomTo(L/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(L){L=parseInt(L);!isNaN(L)&&0<L&&(L=new ChangePageSetup(n,null,null,null,L/100),L.ignoreColor=!0,L.ignoreImage=!0,q.model.execute(L))}),
"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));K=mxUtils.bind(this,function(G,L,R,V){return this.addAction(G,function(){if(null!=R&&q.cellEditor.isContentEditing())R();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,L,d);(L&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?q.updateLabelElements(d,function(l){l.style.fontWeight=null;"B"==l.nodeName&&q.replaceElement(l)}):(L&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(d,function(l){l.style.fontStyle=null;"I"==l.nodeName&&q.replaceElement(l)}):(L&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(d,function(l){l.style.textDecoration=null;"U"==l.nodeName&&q.replaceElement(l)});for(var f=0;f<d.length;f++)0==q.model.getChildCount(d[f])&&q.autoSizeCell(d[f],
!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),L=0;L<G.length;L++)q.removeTextStyleForCell(G[L],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),L=q.getCurrentCellStyle(G[0]),R="1"==mxUtils.getValue(L,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,R);q.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
L="1";null!=G&&null!=q.getFoldingImage(G)&&(L="0");q.setCellStyles("collapsible",L);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[L],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var G=q.getEditableCells(q.getSelectionCells());if(null!=G&&0<G.length){var L=q.getModel();L=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",L.getStyle(G[0])||"",function(R){null!=R&&q.setCellStyle(mxUtils.trim(R),G)},null,null,
400,220);this.editorUi.showDialog(L.container,420,300,!0,!0);L.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&n.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=q.getSelectionCell();if(null!=G&&q.getModel().isEdge(G)){var L=y.graph.selectionCellsHandler.getHandler(G);
if(L instanceof mxEdgeHandler){var R=q.view.translate,V=q.view.scale,d=R.x;R=R.y;G=q.getModel().getParent(G);for(var f=q.getCellGeometry(G);q.getModel().isVertex(G)&&null!=f;)d+=f.x,R+=f.y,G=q.getModel().getParent(G),f=q.getCellGeometry(G);d=Math.round(q.snap(q.popupMenuHandler.triggerX/V-d));V=Math.round(q.snap(q.popupMenuHandler.triggerY/V-R));L.addPointAt(L.state,d,V)}}});this.addAction("removeWaypoint",function(){var G=n.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,
G.index)});this.addAction("clearWaypoints",function(G,L){G=null!=L?L:G;var R=q.getSelectionCells();if(null!=R){R=q.getEditableCells(q.addAllEdges(R));q.getModel().beginUpdate();try{for(var V=0;V<R.length;V++){var d=R[V];if(q.getModel().isEdge(d)){var f=q.getCellGeometry(d);null!=L&&mxEvent.isShiftDown(G)?(q.setCellStyles(mxConstants.STYLE_EXIT_X,null,[d]),q.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_Y,
mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",L=q.getView().getState(q.getSelectionCell()),R="",V=null;null!=L&&(R=L.style[mxConstants.STYLE_IMAGE]||R,V=L.style[mxConstants.STYLE_CLIP_PATH]||V);var d=
q.cellEditor.saveSelection();n.showImageDialog(G,R,function(f,l,u,A,B,F){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(d),q.insertImage(f,l,u);else{var M=q.getSelectionCells();if(null!=f&&(0<f.length||0<M.length)){var O=null;q.getModel().beginUpdate();try{if(0==M.length){M=[q.insertVertex(q.getDefaultParent(),null,"",0,0,l,u,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(M,!0));
M[0].geometry.x=H.x;M[0].geometry.y=H.y;null!=A&&g(M[0],A,B,F,q);O=M;q.fireEvent(new mxEventObject("cellsInserted","cells",O))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<f.length?f:null,M);var ja=q.getCurrentCellStyle(M[0]);"image"!=ja[mxConstants.STYLE_SHAPE]&&"label"!=ja[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",M):0==f.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,M);null==A&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,M);if(null!=l&&null!=u)for(f=0;f<
M.length;f++){var da=M[f];if("0"!=q.getCurrentCellStyle(da).expand){var ca=q.getModel().getGeometry(da);null!=ca&&(ca=ca.clone(),ca.width=l,ca.height=u,q.getModel().setGeometry(da,ca))}null!=A&&g(da,A,B,F,q)}}finally{q.getModel().endUpdate()}null!=O&&(q.setSelectionCells(O),q.scrollCellToVisible(O[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,V)}}).isEnabled=E;this.addAction("crop...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
null!=G){var L=q.getCurrentCellStyle(G),R=L[mxConstants.STYLE_IMAGE],V=L[mxConstants.STYLE_SHAPE];R&&"image"==V&&(L=new CropImageDialog(n,R,L[mxConstants.STYLE_CLIP_PATH],function(d,f,l){g(G,d,f,l,q)}),n.showDialog(L.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
null!=G){var L=new ConnectionPointsDialog(n,G);n.showDialog(L.container,350,450,!0,!1,function(){L.destroy()});L.init()}},null,null,"Alt+Shift+Q").isEnabled=E};Actions.prototype.addAction=function(b,e,g,n,y){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var q=mxResources.get(b)+"..."}else q=mxResources.get(b);return this.put(b,new Action(q,e,g,n,y))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
K[0]),L=this.ui.getHashValueForPages(G,n),R=this.ui.getHashValueForPages(q,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",E,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",L,"current",R,"valid",L==R,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=L&&L!=R){var V=this.compressReportData(this.getAnonymizedXmlForPages(q)),d=this.compressReportData(this.getAnonymizedXmlForPages(G)),f=this.ui.hashValue(b.getCurrentEtag()),
l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(g,K,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+L+"\nCurrent: "+R+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+f+"\nTo: "+l+"\n\nFile Data:\n"+V+"\nPatched Shadow:\n"+d,null,"mergeFile",L,R,b.getCurrentRevisionId())}else{if(null!=this.sync){var u=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null,null,y);null==u||mxUtils.isEmptyObject(u)||K.push(u)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:
null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(F);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var A=this.getCurrentUser(),B=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,F)}}catch(M){}}}else throw Error(mxResources.get("notADiagramFile"));
25E3);this.sendErrorReport("Checksum Error in "+y+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+u+(null!=l?"\n\nRemote:\n"+l:""),null,7E4)});null==n?G(null):this.getLatestVersion(mxUtils.bind(this,function(l){null!=l&&l.getCurrentEtag()==n?G(l):G(null)}),function(){})}else{var L=this.getCurrentUser(),R=null!=L?L.id:"unknown",V=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(e).length,f=null;if(null!=e&&this.constructor==DriveFile&&400>d){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
DrawioFile.prototype.sendErrorReport=function(b,e,g,n){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),L=G.lastIndexOf(".");E="xml";0<L&&(E=G.substring(L));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
DrawioFile.prototype.patch=function(b,e,g,n){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),E=y.indexOfNextAdd,K=this.ui.editor.graph;K.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=K.foldingEnabled,L=K.mathEnabled,R=K.cellRenderer.redraw;K.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());R.apply(this,arguments)};K.model.beginUpdate();
this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{K.container.style.visibility="";K.model.endUpdate();K.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(y.history=q,y.indexOfNextAdd=E,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=K.mathEnabled?(this.ui.editor.updateGraphComponents(),K.refresh()):(G!=K.foldingEnabled?K.view.revalidate():
this.inConflictState=!0;this.descriptorChanged();null!=n&&n(G);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,G);else{var K=this.getCurrentUser(),S=null!=K?K.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=n&&n(G)}};
LocalFile.prototype.saveFile=function(b,e,g,n,y){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var q=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),S=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var L=mxUtils.bind(this,
function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){try{var l=this.desc;this.savingFile=!1;this.desc=f;this.fileSaved(E,l,K,L);this.removeDraft()}catch(u){L(u)}}),L)}),L)}),L):(this.inConflictState=!0,L())}),mxUtils.bind(this,function(d){this.invalidFileHandle=!0;L(d)}))}),L)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,q?"image/png":"text/xml",q);else if(G.length<MAX_REQUEST_SIZE){var R=b.lastIndexOf(".");R=0<R?b.substring(R+1):"xml";
mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,z){var J=null;null!=k.editor.graph.getModel().getParent(z)?J=z.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 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 R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var z=this.editorUi,J=z.editor.graph;if(J.isEnabled()){var W=z.getCurrentFile();null!=W&&W.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
k&&null!=k.src){var J=Graph.getSvgFromDataUri(k.src);if(null!=J)try{var W=(new DOMParser).parseFromString(J,"text/xml"),T=W.getElementsByTagName("style");for(J=0;J<T.length;J++)if(T[J].innerHTML==Graph.svgDarkModeCss){T[J].parentNode.removeChild(T[J]);break}if("dark"==z||"auto"==z){var Z=Graph.createSvgDarkModeStyle(W,z);W.getElementsByTagName("defs")[0].appendChild(Z)}k=new mxImage(Editor.createSvgDataUri(mxUtils.getXml(W.documentElement)),k.width,k.height,k.x,k.y)}catch(ba){}}return k};var M=Graph.prototype.getSvg;
this.refresh());var Pa=null;Editor.enableCssDarkMode&&null!=this.backgroundImage&&(Pa=this.backgroundImage,this.backgroundImage=this.adaptBackgroundPage(Pa,xa));var ta=M.apply(this,arguments);if(Editor.enableCssDarkMode&&("dark"==xa||"auto"==xa)){var Da=Graph.createSvgDarkModeStyle(ta.ownerDocument,xa);ta.getElementsByTagName("defs")[0].appendChild(Da)}var Aa=this.getCustomFonts();if(pa&&0<Aa.length){var ya=ta.ownerDocument;Da=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,n){n.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.6.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
"")+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=A.stack?"&stack="+encodeURIComponent(A.stack):""))}catch(M){}try{F||null==window.console||console.error(B,d,f,l,u,A)}catch(M){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?
!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,f,l){var u=null==d||null==f;l=null!=l?l:24;var A=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=A.spin;A.spin=function(M,O){var H=
!1;this.active||(B.call(this,M),this.active=!0,null!=O&&(u&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,
d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),H.innerHTML=O,M.appendChild(H),A.status=H),this.pause=mxUtils.bind(this,function(){var ja=function(){};this.active&&(ja=mxUtils.bind(this,function(){this.spin(M,O)}));
[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=l)for(A=0;A<l.length;A++)f.model.execute(new ChangePage(this,l[A],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,l,u,A,B,F,M,O,H,ja){f=null!=f?f:this.editor.graph;A=null!=A?A:!1;O=null!=O?O:!0;ja=
f,u,null,M,O,da,null,null,l.scale,l.border);return ja};EditorUi.prototype.getXmlFileData=function(d,f,l,u){d=null!=d?d:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var A=this.editor.getGraphXml(d,u);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(O){var H=O.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&l?(H=mxUtils.trim(mxUtils.getTextContent(O)),O=O.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&O.appendChild(mxUtils.parseXml(H).documentElement))):
null==H||l?O=O.cloneNode(!0):(O=O.cloneNode(!1),mxUtils.setTextContent(O,Graph.compressNode(H)));A.appendChild(O)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(A)),A=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],F=B.node;if(B!=this.currentPage)if(B.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
M,null,u);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(M));delete B.needsUpdate}else u&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
null!=B.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,M,null,u),F=F.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(M))));d(F)}return A};EditorUi.prototype.anonymizeString=function(d,f){for(var l=[],u=0;u<d.length;u++){var A=d.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(A)?l.push(A):isNaN(parseInt(A))?A.toLowerCase()!=A?l.push(String.fromCharCode(65+Math.round(25*
d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var u in d[EditorUi.DIFF_UPDATE]){var A=d[EditorUi.DIFF_UPDATE][u];null!=A.name&&(A.name=this.anonymizeString(A.name));null!=A.cells&&(f=mxUtils.bind(this,function(B){var F=A.cells[B];if(null!=F){for(var M in F)null!=F[M].value&&(F[M].value="["+F[M].value.length+"]"),null!=F[M].xmlValue&&(F[M].xmlValue="["+F[M].xmlValue.length+"]"),null!=F[M].style&&(F[M].style=
"["+F[M].style.length+"]"),mxUtils.isEmptyObject(F[M])&&delete F[M];mxUtils.isEmptyObject(F)&&delete A.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(A.cells)&&delete A.cells);mxUtils.isEmptyObject(A)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&
M,O,H,ja){A=null!=A?A:!0;B=null!=B?B:!1;H=null!=H?H:!Editor.defaultCompressed;var da=this.editor.graph;if(f||!d&&null!=O&&/(\.svg)$/i.test(O.getTitle())){var ca=null!=da.themes&&"darkTheme"==da.defaultThemeName;if(ca||null!=this.pages&&this.currentPage!=this.pages[0]){var ia=da.getGlobalVariable;da=this.createTemporaryGraph(ca?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var ma=null!=this.pages?
d,f,l,u,A,M,H);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,l,u,A,B){B=null!=B?B:!0;var F=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var O=f.view.scale;B=Math.floor(F.x/O-f.view.translate.x);O=Math.floor(F.y/O-f.view.translate.y);F=f.background;null==A&&(f=this.getBasenames().join(";"),0<f.length&&(M=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",
(null==A?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+A+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,l,u,A){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=A&&(A=A.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
M=F.getChildren(F.root);for(A=0;A<M.length;A++){var O=M[A];F.setVisible(O,f[O.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,l,u,A,B,F,M,O,H,ja,da){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename("remoteSvg"==d?!1:!A),ia=ca+("xml"==d||"pdf"==d&&ja?".drawio":"")+"."+d;if("xml"==d){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,A,null,null,null,f);this.saveData(ia,d,ma,"text/xml")}else if("html"==d)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,
ca),this.saveData(ia,d,ma,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)ia=ca+".png";else if("jpeg"==d)ia=ca+".jpg";else if("remoteSvg"==d){ia=ca+".svg";d="svg";var aa=parseInt(O);"string"===typeof M&&0<M.indexOf("%")&&(M=parseInt(M)/100);if(0<aa){var la=this.editor.graph,X=la.getGraphBounds();var P=Math.ceil(X.width*M/la.view.scale+2*aa);var U=Math.ceil(X.height*M/la.view.scale+2*aa)}}this.saveRequest(ia,d,mxUtils.bind(this,
function(T,Z){try{var ba=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ha=this.createDownloadRequest(T,d,u,Z,F,A,M,O,H,ja,da,P,U);this.editor.graph.pageVisible=ba;return ha}catch(qa){this.handleError(qa)}}))}else{var k=null,z=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ia,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==
function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){d=this.downloadRequestBuilder(d,f,l,u,A,B,F,M,O,H,ja,da,ca);f="";for(var ia in d)l=d[ia],null!=l&&(f+=ia+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){var ia=this.editor.graph,ma=ia.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==B?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var aa=null,la=null,X=null;if(ma.width*ma.height>
steps:ia.view.gridSteps,color:ia.view.gridColor});Graph.translateDiagram&&(A.diagramLanguage=Graph.diagramLanguage);return{format:f,from:aa,to:la,allPages:X,bg:null!=B?B:mxConstants.NONE,base64:u,embedXml:H,xml:l,filename:null!=d?d:"",extras:JSON.stringify(A),scale:F,border:M,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null}};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=
this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){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==d||mxUtils.isEmptyObject(d)||(f=f+"#"+encodeURIComponent(JSON.stringify(d)))}catch(u){}window.location.hash=f}};EditorUi.prototype.loadDescriptor=function(d,f,l){var u=window.location.hash,A=mxUtils.bind(this,function(F){var M=null!=d.data?d.data:"";null!=F&&0<F.length&&
(0<M.length&&(M+="\n"),M+=F);F=new LocalFile(this,"csv"!=d.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return u};this.fileLoaded(F);"csv"==d.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var O=null!=d.interval?parseInt(d.interval):6E4,H=null,ja=mxUtils.bind(this,function(){var ca=
d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var A=this.editor.graph,B=A.getModel();B.beginUpdate();var F=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var M=B.getCell(d.getAttribute("id"));if(null!=M){try{var O=d.getAttribute("value");if(null!=O){var H=mxUtils.parseXml(O).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))B.setValue(M,H);else for(var ja=H.attributes,da=0;da<ja.length;da++)A.setAttributeForCell(M,ja[da].nodeName,0<ja[da].nodeValue.length?
ja[da].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+M.id+": "+U)}try{var ca=d.getAttribute("style");null!=ca&&A.model.setStyle(M,ca)}catch(U){null!=window.console&&console.log("Error in style for "+M.id+": "+U)}try{var ia=d.getAttribute("icon");if(null!=ia){var ma=0<ia.length?JSON.parse(ia):null;null!=ma&&ma.append||A.removeCellOverlays(M);null!=ma&&A.addCellOverlay(M,f(ma))}}catch(U){null!=window.console&&console.log("Error in icon for "+M.id+": "+U)}try{var aa=
d.getAttribute("geometry");if(null!=aa){aa=JSON.parse(aa);var la=A.getCellGeometry(M);if(null!=la){la=la.clone();for(key in aa){var X=parseFloat(aa[key]);"dx"==key?la.x+=X:"dy"==key?la.y+=X:"dw"==key?la.width+=X:"dh"==key?la.height+=X:la[key]=parseFloat(aa[key])}A.model.setGeometry(M,la)}}}catch(U){null!=window.console&&console.log("Error in icon for "+M.id+": "+U)}}}else if("model"==d.nodeName){for(var P=d.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(new mxCodec(d.firstChild)).decode(P,
f){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var u=l.lastIndexOf(".");0<=u&&(d=l.substring(u),l=l.substring(0,u));if(f){f=l;var A=new Date;l=A.getFullYear();u=A.getMonth()+1;var B=A.getDate(),F=A.getHours(),M=A.getMinutes();A=A.getSeconds();l=f+(" "+(l+"-"+u+"-"+B+"-"+F+"-"+M+"-"+A))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.fileLoaded=function(d,f,l){var u=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);
d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+F})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=
d)try{d.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+M.message,label:"stack_"+M.stack})}catch(O){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=u?this.fileLoaded(u)||B():B()});f?d():this.handleError(M,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else B();
return A};EditorUi.prototype.getHashValueForPages=function(d,f){var l=0,u=new mxGraphModel,A=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var F=d[B].node.cloneNode(!1);F.removeAttribute("name");u.root=d[B].root;var M=A.encode(u);this.editor.graph.saveViewState(d[B].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");F.appendChild(M);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,
d;B=this.sidebar.palettes[d.getHash()];B=null!=B?B[B.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var F=null,M=mxUtils.bind(this,function(P,U){0==P.length&&d.isEditable()?(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),U.appendChild(F)):this.addLibraryEntries(P,U)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
var O=this.sidebar.addPalette(d.getHash(),l,null!=u?u:!0,mxUtils.bind(this,function(P){M(f,P)}));null!=A&&(A.div=O);this.repositionLibrary(B);var H=O.parentNode.previousSibling;u=H.getAttribute("title");null!=u&&0<u.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+u);var ja=document.createElement("div");ja.style.position="absolute";ja.style.right="0px";ja.style.top="0px";ja.style.padding="8px";ja.style.backgroundColor="inherit";H.style.position="relative";
JSON.parse(mxUtils.getTextContent(pa.documentElement));M(Ca,O);f=f.concat(Ca);aa(P);this.spinner.stop();qa=!0}catch(Qa){}else if("mxfile"==pa.documentElement.nodeName)try{var Ba=pa.documentElement.getElementsByTagName("diagram");for(Ca=0;Ca<Ba.length;Ca++){var za=this.stringToCells(Editor.getDiagramNodeXml(Ba[Ca])),Ma=this.editor.graph.getBoundingBoxFromGeometry(za);la(za,new mxRectangle(0,0,Ma.width,Ma.height),P)}qa=!0}catch(Qa){null!=window.console&&console.log("error in drop handler:",Qa)}qa||
".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,l,u,A,B,F){d=new ImageDialog(this,d,f,l,u,A,B,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,f,l,u,A,B){var F=localStorage.getItem(f);d=new TextareaDialog(this,d,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(M){if(null!=M)try{if(null!=B&&
B(M),M==F)this.hideDialog();else{if(0<M.length){var O=JSON.parse(M);localStorage.setItem(f,JSON.stringify(O))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(H){this.handleError(H)}}),null,mxResources.get("close"),null,null,null,!0,null,null,A,l,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f,l,u){d=null!=d?d:mxUtils.bind(this,function(A,B,F,M){B||(A=new ChangePageSetup(this,
u?F:null,A),A.ignoreColor=!u,null!=M&&u&&(A.shadowVisible=M),this.editor.graph.model.execute(A))});d=new BackgroundImageDialog(this,d,f,l,u);this.showDialog(d.container,400,u?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,l,u,A){d=new LibraryDialog(this,d,f,l,u,A);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
function(d){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(d,f,l,u,A,B,F){var M=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+
(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(ia){}if(null!=O||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var H=mxResources.get("ok"),ja=null;f=null!=f?f:mxResources.get("error");if(null!=O){null!=O.retry&&(H=mxResources.get("cancel"),ja=function(){M();O.retry()});if(404==O.code||404==O.status||403==O.code){F=403==O.code?null!=O.message?mxUtils.htmlEntities(O.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
l&&l()};EditorUi.prototype.alert=function(d,f,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,l,u,A,B){d=null!=d?d:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=l&&l()},u,A,null,null,null,null,M);this.showDialog(d.container,
340,46+M,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,l,u,A,B,F,M,O){var H=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";M=null!=M?M:"translate(-50%,0%)";var ja=A?500:1E3;H=A?"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");
aa()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,function(){aa()}),ja)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(X){var P=mxEvent.getSource(X);P!=ia&&P!=ma?(null!=l&&l(),aa(),mxEvent.consume(X)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",M)}),ja/2);window.setTimeout(la,A?4E3:3E4);H=!0}return H};EditorUi.prototype.setCurrentFile=function(d){null!=
typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var M=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(M?parseInt(M[2],10):!1)?!1:B}if(B||this.isOffline()){F.href=URL.createObjectURL(u?this.base64ToBlob(d,l):new Blob([d],{type:l}));B?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(O){}}else this.createEchoRequest(d,f,l,u,A).simulate(document,
"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,l,u,A,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=l?"&mime="+l:"")+(null!=A?"&format="+A:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(u?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var l=d.length,u=Math.ceil(l/1024),A=Array(u),B=0;B<u;++B){for(var F=1024*B,M=Math.min(F+1024,l),O=Array(M-F),H=0;F<M;++H,++F)O[H]=d[F].charCodeAt(0);A[B]=
new Uint8Array(O)}return new Blob(A,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,l,u,A,B,F,M){B=null!=B?B:!1;F=null!=F?F:"vsdx"!=A&&(!mxClient.IS_IOS||!navigator.standalone);var O=mxUtils.bind(this,function(ja,da,ca,ia){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,u);else if(null!=l&&"text/html"==l.substring(0,9)){var ma=new EmbedDialog(this,d);this.showDialog(ma.container,450,240,!0,!0);ma.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,
!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(d,ja,l,u,null,M);else if(null!=ja&&0<ja.length){var la=mxUtils.bind(this,function(X){try{this.exportFile(d,ja,l,u,da,X)}catch(P){this.handleError(P)}});null!=ia?la(ia):this.pickFolder(da,la)}}catch(X){this.handleError(X)}});if("1"==urlParams["save-dialog"])A=[],B||A.push(App.MODE_BROWSER),F||A.push("_blank"),f=new SaveDialog(this,f,mxUtils.bind(this,
mxEvent.addListener(this.editor.graph.container,"click",A);this.editor.exportToCanvas(mxUtils.bind(this,function(M){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var O=this.createImageDataUri(M,null,"png");M=document.createElement("img");M.style.maxWidth="140px";M.style.maxHeight="140px";M.style.cursor="pointer";M.style.backgroundColor="white";M.setAttribute("title",mxResources.get("openInNewWindow"));M.setAttribute("border",
"0");M.setAttribute("src",O);this.exportDialog.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.openInNewWindow(O.substring(O.indexOf(",")+1),"image/png",!0);A.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(M){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(M)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(u)}),
Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,l,u,A){this.isLocalFileSave()?this.saveLocalFile(l,d,u,A,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,F){return this.createEchoRequest(l,B,u,A,f,F)}),l,A,u)};EditorUi.prototype.saveRequest=function(d,f,l,u,A,B,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var M=mxUtils.bind(this,function(ja,da,ca,ia){if("_blank"==da||null!=ja&&0<ja.length){var ma=l("_blank"==da?null:ja,da==App.MODE_DEVICE||"download"==
aa)}catch(la){this.handleError(la)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}))}),null!=ia?ca(ia):this.pickFolder(da,ca)))}});if("1"==urlParams["save-dialog"]){var O=[App.MODE_BROWSER];F||O.push("_blank");d=new SaveDialog(this,d,mxUtils.bind(this,function(ja,da,ca){M(ja.value,da,ja,ca);this.hideDialog()}),O,null,"application/pdf");this.showDialog(d.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}))}else{O=
this.getServiceCount(!1);isLocalStorage&&O++;var H=4>=O?2:6<O?4:3;d=new CreateDialog(this,d,M,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<O,H,u,B,A);F=this.isServices(O)?4<O?390:280:160;this.showDialog(d.container,420,F,!0,!0)}d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,l,u,A,B){};EditorUi.prototype.getServiceForName=
function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,f,l){f(null)};EditorUi.prototype.exportSvg=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia){if(this.spinner.spin(document.body,mxResources.get("export")))try{var ma=this.editor.graph.isSelectionEmpty();l=null!=l?l:ma;var aa=f?null:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);null==aa&&0==f&&(aa="dark"!=ja||Editor.enableSvgDarkMode?"#ffffff":Editor.darkColor);
var la=this.editor.graph.getSvg(aa,d,F,M,null,l,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!ca,ja,da);u&&this.editor.graph.addSvgShadow(la);var X=this.getBaseFilename()+(A?".drawio":"")+".svg";ia=null!=ia?ia:mxUtils.bind(this,function(k){this.isLocalFileSave()||k.length<=MAX_REQUEST_SIZE?this.saveData(X,"svg",k,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});var P=mxUtils.bind(this,
EditorUi.prototype.addRadiobox=function(d,f,l,u,A,B,F){return this.addCheckbox(d,l,u,A,B,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,l,u,A,B,F,M){B=null!=B?B:!0;var O=document.createElement("input");O.style.marginRight="8px";O.style.marginTop="16px";O.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();O.id=F;null!=M&&O.setAttribute("name",M);l&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);u&&O.setAttribute("disabled","disabled");B&&(d.appendChild(O),l=document.createElement("label"),
"geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));B.appendChild(u);u=document.createElement("option");u.setAttribute("value","custom");mxUtils.write(u,mxResources.get("custom")+"...");B.appendChild(u);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var F=new FilenameDialog(this,A,mxResources.get("ok"),function(M){null!=M?A=M:B.value="blank"},mxResources.get("url"),null,null,null,
null,function(){B.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===B.value?"_blank":A:null},getEditInput:function(){return l},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=function(d,f){function l(){var M=document.createElement("div");
M.style.width="100%";M.style.height="100%";M.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(M.style.border="1px solid black",M.style.backgroundColor=B):(M.style.backgroundPosition="center center",M.style.backgroundRepeat="no-repeat",M.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(M)}mxUtils.write(d,mxResources.get("links")+":");var u=document.createElement("select");u.style.width="100px";u.style.padding="0px";u.style.marginLeft="8px";u.style.marginRight=
mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),u.appendChild(f));d.appendChild(u);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(M){this.pickColor(B||"none",function(O){B=O;l()});mxEvent.consume(M)}));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||
F.push("edit="+encodeURIComponent(A)),B&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));l&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,l,u,A,B,F,M,O,H){O=this.createUrlParameters(d,f,l,u,A,B,O);d=this.getCurrentFile();f=!0;null!=F?l="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),M||null==d||d.constructor!=window.DriveFile?l="#R"+encodeURIComponent(l?
"/"+(0<O.length?"?"+O.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,f,l,u,A,B,F,M,O,H,ja,da){this.getBasenames();var ca={};""!=A&&A!=mxConstants.NONE&&(ca.highlight=A);"auto"!==u&&(ca.target=u);H||(ca.lightbox=!1);ca.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ca.zoom=l/100);l=[];F&&(l.push("pages"),ca.resize=!0,null!=this.pages&&null!=this.currentPage&&(ca.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ca.resize=!0);M&&l.push("layers");
var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var M=document.createElement("input");M.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";M.setAttribute("value","url");M.setAttribute("type","radio");M.setAttribute("name","type-embedhtmldialog");B=M.cloneNode(!0);B.setAttribute("value","copy");F.appendChild(B);var O=document.createElement("span");mxUtils.write(O,mxResources.get("includeCopyOfMyDiagram"));
F.appendChild(O);mxUtils.br(F);F.appendChild(M);O=document.createElement("span");mxUtils.write(O,mxResources.get("publicDiagramUrl"));F.appendChild(O);var H=this.getCurrentFile();null==l&&null!=H&&H.constructor==window.DriveFile&&(O=document.createElement("a"),O.style.paddingLeft="12px",O.style.color="gray",O.style.cursor="pointer",mxUtils.write(O,mxResources.get("share")),F.appendChild(O),mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));
B.setAttribute("checked","checked");null==l&&M.setAttribute("disabled","disabled");A.appendChild(F);var ja=this.addLinkSection(A),da=this.addCheckbox(A,mxResources.get("zoom"),!0,null,!0);mxUtils.write(A,":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value="100%";A.appendChild(ca);var ia=this.addCheckbox(A,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;
P.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,A,mxUtils.bind(this,function(){u(M.checked?l:null,da.checked,ca.value,ja.getTarget(),ja.getColor(),ia.checked,ma.checked,aa.checked,la.checked,X.checked,null!=P?P.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,l,u,A,B,F,M){var O=document.createElement("div");O.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,
U.checked,null!=ca?ca.value:null,null!=ia?ia.value:null,k.checked)}),null,mxResources.get("create"),F,M);this.showDialog(f.container,340,300+d,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,l,u,A){var B=document.createElement("div");B.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:"+(A?"10":"4")+"px";B.appendChild(F);if(A){mxUtils.write(B,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";B.appendChild(M);mxUtils.write(B,mxResources.get("borderWidth")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight=
d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ia=parseInt(O.value)||0;l(!H.checked,null!=ja?ja.checked:!1,null!=da?da.checked:!1,ca,ia)}),null,d,f);this.showDialog(d.container,300,(A?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,l,u,A,B,F,M,O){F=null!=F?F:Editor.defaultIncludeDiagram;var H=document.createElement("div");H.style.whiteSpace="nowrap";var ja=this.editor.graph,da="jpeg"==M?220:300,ca=document.createElement("h3");mxUtils.write(ca,
M),z=null;if(Editor.isDarkMode()||Editor.enableCssDarkMode)z=document.createElement("select"),z.style.maxWidth="260px",z.style.marginLeft="8px",z.style.marginTop="16px",B=document.createElement("option"),B.setAttribute("value","light"),mxUtils.write(B,mxResources.get("light")),z.appendChild(B),O=document.createElement("option"),O.setAttribute("value","dark"),mxUtils.write(O,mxResources.get("dark")),z.appendChild(O),Editor.enableCssDarkMode&&"svg"==M&&(d=document.createElement("option"),d.setAttribute("value",
"auto"),mxUtils.write(d,mxResources.get("automatic")),z.appendChild(d)),mxUtils.write(H,mxResources.get("appearance")+":"),H.appendChild(z),mxUtils.br(H),Editor.isDarkMode()||Editor.cssDarkMode?O.setAttribute("selected","selected"):B.setAttribute("selected","selected"),da+=26;var J=this.addCheckbox(H,mxResources.get("shadow"),ja.shadowVisible),W=null;if("png"==M||"jpeg"==M)W=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(H,
mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=M);T.style.marginBottom="16px";var Z=document.createElement("input");Z.style.marginBottom="16px";Z.style.marginRight="8px";Z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Z.setAttribute("disabled","disabled");var ba=document.createElement("select");ba.style.maxWidth="200px";ba.style.marginLeft="8px";ba.style.marginBottom="16px";F=document.createElement("option");F.setAttribute("value","none");mxUtils.write(F,
ha.appendChild(f);var qa=document.createElement("div");mxUtils.write(qa,mxResources.get("LinksLost"));qa.style.margin="7px";qa.style.display="none";"svg"==M&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(ha),H.appendChild(qa),mxUtils.br(H),mxUtils.br(H),da+=50);l=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=ma.value;this.lastExportZoom=ia.value;A(ia.value,k.checked,!aa.checked,J.checked,T.checked,Z.checked,ma.value,la.checked,!1,ha.value,null!=W?W.checked:
null,null!=z?z.value:null,X.value,"embedFonts"==ba.value,"lblToSvg"==ba.value)}),null,l,u);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,l,u,A){var B=document.createElement("div");B.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var M=document.createElement("h3");mxUtils.write(M,f);M.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(M)}var O=this.addCheckbox(B,mxResources.get("fit"),!0),H=this.addCheckbox(B,mxResources.get("shadow"),F.shadowVisible&&u,!u),ja=this.addCheckbox(B,l),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ca=this.addEditButton(B,da),ia=ca.getEditInput(),ma=1<F.model.getChildCount(F.model.getRoot()),aa=this.addCheckbox(B,mxResources.get("layers"),ma,!ma);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="12px";
A);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,l,u,A,B,F,M){function O(ia){var ma=" ",aa="";u&&(ma=" 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"+
ma,"png");O(ia)}),null,null,null,mxUtils.bind(this,function(ia){M({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=
ca.getStatus()?O("data:image/png;base64,"+ca.getText()):M({message:mxResources.get("unknownError")})}))}else M({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,l,u,A,B,F){var M=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l),O=M.getElementsByTagName("a");if(null!=O)for(var H=0;H<O.length;H++){var ja=O[H].getAttribute("href");null!=ja&&"#"==ja.charAt(0)&&"_blank"==O[H].getAttribute("target")&&O[H].removeAttribute("target")}u&&
M.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(M);if(l){var da=" ",ca="";u&&(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"+(A?"&edit=_blank":"")+(B?"&layers=1":
"")+"');}})(this);\"",ca+="cursor:pointer;");d&&(ca+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(ia){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ia))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",u&&(f=this.getSelectedPageIndex(),M.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:"")+(A?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),d&&(d=parseInt(M.getAttribute("width")),A=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+d+" "+A),ca+="max-width:100%;max-height:"+A+"px;",M.removeAttribute("height")),""!=ca&&M.setAttribute("style",ca),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),F(mxUtils.getXml(M))};EditorUi.prototype.timeSince=
EditorUi.prototype.getPngFileProperties=function(d){var f=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var u=parseFloat(d.getAttribute("scale"));!isNaN(u)&&0<u&&(f=u)}d.hasAttribute("border")&&(u=parseInt(d.getAttribute("border")),!isNaN(u)&&0<u&&(l=u))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,f,l,u,A){try{var B=this.editor.graph,F=null!=B.themes&&"darkTheme"==B.defaultThemeName,M=null;if(null!=l&&0<l.length)B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet()),
document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0),B),M=l;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet());var O=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&B.setBackgroundImage(H.viewState.backgroundImage);
B.getGlobalVariable=function(ja){return"page"==ja?H.getName():"pagenumber"==ja?1:O.apply(this,arguments)};document.body.appendChild(B.container);B.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ja){try{null==M&&(M=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ja.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(M));d(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ca){null!=
f&&f(ca)}}),null,null,null,mxUtils.bind(this,function(ja){null!=f&&f(ja)}),null,null,u,null,B.shadowVisible,null,B,A,null,null,null,"diagram",null)}catch(ja){null!=f&&f(ja)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){M=null!=M?M:!0;ja=null!=ja?ja:0;F=null!=O?O:f.background;F==mxConstants.NONE&&(F=null);B=f.getSvg(F,H,ja,null,null,B,null,null,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ja);null!=d&&B.setAttribute("content",
d);null!=l&&B.setAttribute("resource",l);var ia=mxUtils.bind(this,function(ma){ma=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=A&&A(ma);return ma});f.mathEnabled&&this.editor.addMathCss(B);if(null!=A)this.embedFonts(B,mxUtils.bind(this,function(ma){M?this.editor.convertImages(ma,mxUtils.bind(this,function(aa){ia(aa)})):ia(ma)}));else return ia(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),f(d)}catch(u){f(d)}}))}catch(l){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){O=null!=O?O:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ia=this.editor.graph.isSelectionEmpty();l=null!=l?l:ia;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
function(ma){this.spinner.stop();try{this.saveCanvas(ma,A?this.getFileData(!0,null,null,null,l,M):null,O,null==this.pages||0==this.pages.length,ja)}catch(aa){this.handleError(aa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ma){this.spinner.stop();this.handleError(ma)}),null,l,d||1,f,u,null,null,B,F,H,da,ca)}catch(ma){this.spinner.stop(),this.handleError(ma)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=
function(d,f,l,u,A,B,F){f=null!=f?f:0;l=null!=l?l:0;var M=[];try{var O=this.editor.graph;if(null!=d&&0<d.length){O.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var ja=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=ja&&"mxfile"==ja.nodeName&&null!=this.pages){var da=ja.getElementsByTagName("diagram");if(1==da.length&&!B){if(ja=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=
null==aa.getName()&&aa.setName(mxResources.get("pageWithNumber",[la+1]));O.model.execute(new ChangePage(this,aa,aa,la,!0));B.push(aa)}this.updatePageLinks(d,B)}}if(null!=ja&&"mxGraphModel"===ja.nodeName){M=O.importGraphModel(ja,f,l,u);if(null!=M)for(ia=0;ia<M.length;ia++)this.updatePageLinksForCell(d,M[ia]);var X=O.parseBackgroundImage(ja.getAttribute("backgroundImage"));if(null!=X&&null!=X.originalSrc){this.updateBackgroundPageLink(d,X);var P=new ChangePageSetup(this,null,X);P.ignoreColor=!0;O.model.execute(P)}}F&&
this.insertHandler(M,null,null,O.defaultVertexStyle,O.defaultEdgeStyle,!1,!0)}finally{O.model.endUpdate()}}}catch(U){if(A)throw U;this.handleError(U)}return M};EditorUi.prototype.updatePageLinks=function(d,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(d,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(d,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+
1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var l=document.createElement("div"),u=this.editor.graph,A=u.getLinkForCell(f);null!=A&&u.setLinkForCell(f,this.updatePageLink(d,A));if(u.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(u.getLabel(f));for(var B=l.getElementsByTagName("a"),F=!1,M=0;M<B.length;M++)A=B[M].getAttribute("href"),null!=A&&(B[M].setAttribute("href",this.updatePageLink(d,A)),F=!0);F&&u.labelChanged(f,l.innerHTML)}for(M=
0;M<u.model.getChildCount(f);M++)this.updatePageLinksForCell(d,u.model.getChildAt(f,M))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var l=d[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var A=0;A<u.actions.length;A++){var B=u.actions[A];if(null!=B.open&&Graph.isPageLink(B.open)){var F=B.open.substring(B.open.indexOf(",")+1);l=d[F];null!=l?B.open=
"data:page/id,"+l:null==this.getPageById(F)&&delete B.open}}f="data:action/json,"+JSON.stringify(u)}}catch(M){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,l,u,A){var B=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){u=null!=u?u:d.name;var M=mxUtils.bind(this,function(H){F.clear()&&
B(H)}),O=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(u);try{var ja="UNKNOWN-VISIO",da=u.lastIndexOf(".");if(0<=da&&da<u.length)ja=u.substring(da+1).toUpperCase();else{var ca=u.lastIndexOf("/");0<=ca&&ca<u.length&&(u=u.substring(ca+1))}EditorUi.logEvent({category:ja+"-MS-IMPORT-FILE",action:"filename_"+u,label:H?"remote":"local"})}catch(ma){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):
function(la){try{f(la.target.result)}catch(X){M({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ma)}else this.doImportVisio(ma,f,M,u)}catch(la){M(la)}else try{""==ia.responseType||"text"==ia.responseType?M({message:ia.responseText}):(aa=new FileReader,aa.onload=function(){try{M({message:JSON.parse(aa.result).Message})}catch(la){M(la)}},aa.readAsText(ia.response))}catch(la){M({})}});ia.send(H)}else if(F.clear())try{this.doImportVisio(d,f,M,u)}catch(ma){M(ma)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?O():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",O,null,null,null,M))}),B)};EditorUi.prototype.importGraphML=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(M){A.clear()&&u(M)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,
f,u)}catch(M){B(M)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",F,null,null,null,B))}),u)};EditorUi.prototype.exportVisio=function(d){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 u=mxUtils.bind(this,
null,u))}),f)}};EditorUi.prototype.convertLucidChart=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(M){A.clear()&&u(M)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if("undefined"!==typeof window.LucidImporter)try{var M=JSON.parse(d);f(LucidImporter.importState(M));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var O=[(new Date).toISOString(),"convertLucidChart",M];null!=M.state&&O.push(JSON.parse(M.state));if(null!=M.svgThumbs)for(var H=0;H<M.svgThumbs.length;H++)O.push(Editor.createSvgDataUri(M.svgThumbs[H]));null!=M.thumb&&O.push(M.thumb);console.log.apply(console,O)}}catch(ja){}}catch(ja){null!=window.console&&console.error(ja),B(ja)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(B){EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"generateOpenAiMermaidDiagram",label:d});var F=new mxXmlRequest("https://www.draw.io/generate/v1",d,"POST"),M=mxUtils.bind(this,function(O){B.clear()&&(this.spinner.stop(),l(O))});F.send(mxUtils.bind(this,function(O){if(B.isAlive())if(200<=O.getStatus()&&299>=O.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ja=mxUtils.trim(O.getText()),da=this.extractMermaidDeclaration(ja);
this.generateMermaidImage(da,null,mxUtils.bind(this,function(ca,ia,ma){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresponse:",ja,"\nresult:",da),this.spinner.stop(),f(da,ca,ia,ma))}),M)}),M,mxUtils.bind(this,function(ca){3>u++?B.clear()&&(this.spinner.stop(),A()):M(ca)}))}),M);else{var H={message:mxResources.get("error")+" "+O.getStatus()};try{H=JSON.parse(O.getText()),H=H.error}catch(ja){}M(H)}}),M)}),l)});A()};
0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,u)&&(f="classDiagram\n"+f);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",l,"\ntype:",u,"\nvalue:",d,"\ntext:",f);return f};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var f=[],l=0;l<d.length;l++)"%%"!=d[l].substring(0,2)&&f.push(d[l]);return f.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,f,l,u,A){d=this.removeMermaidComments(d);var B=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=
u?u(M):this.handleError(M)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;Editor.isDarkMode()&&(f.theme="dark");var M=mxUtils.bind(this,function(O){try{if(mxClient.IS_IE||mxClient.IS_IE11)O=O.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var H=mxUtils.parseXml(O).getElementsByTagName("svg");if(0<H.length&&
(new Date).getTime(),d).then(function(O){M(O.svg)}).catch(function(O){null!=A?A(O):u(O)})}catch(O){u(O)}});"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(M){this.importXml(M,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,B)):mxscript("js/extensions.min.js",F,null,null,null,B))};
EditorUi.prototype.generatePlantUmlImage=function(d,f,l,u){function A(M,O,H){c1=M>>2;c2=(M&3)<<4|O>>4;c3=(O&15)<<2|H>>6;c4=H&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(M){if(10>M)return String.fromCharCode(48+M);M-=10;if(26>M)return String.fromCharCode(65+M);M-=26;if(26>M)return String.fromCharCode(97+M);M-=26;return 0==M?"-":1==M?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(M){r="";
for(i=0;i<M.length;i+=3)r=i+2==M.length?r+A(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+A(M.charCodeAt(i),0,0):r+A(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var O=new FileReader;O.readAsDataURL(this.response);O.onloadend=function(H){var ja=new Image;ja.onload=function(){try{var da=ja.width,ca=
ja.height;if(0==da&&0==ca){var ia=O.result,ma=ia.indexOf(","),aa=decodeURIComponent(escape(atob(ia.substring(ma+1)))),la=mxUtils.parseXml(aa).getElementsByTagName("svg");0<la.length&&(da=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(O.result,da,ca)}catch(X){u(X)}};ja.src=O.result};O.onerror=function(H){u(H)}}else u(M)};F.onerror=function(M){u(M)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,l){var u=this.editor.graph,A=null;u.getModel().beginUpdate();
try{A=u.insertVertex(null,null,"<pre>"+d+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(A,!0)}finally{u.getModel().endUpdate()}return A};EditorUi.prototype.insertTextAt=function(d,f,l,u,A,B,F,M){B=null!=B?B:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==
ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(A||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var O=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,l,B,!0,M)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),null!=H&&0<H.length))return this.importXml(H,
f,l,B,!0,M);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var ja=this.importXml(H,f,l,B,!0,M);if(0<ja.length)return ja}catch(ca){}this.loadImage(d,mxUtils.bind(this,function(ca){if("data:"==d.substring(0,5))this.resizeImage(ca,d,mxUtils.bind(this,function(aa,la,X){O.setSelectionCell(O.insertVertex(null,
d+";"))}}),mxUtils.bind(this,function(){var ca=null;O.getModel().beginUpdate();try{ca=O.insertVertex(O.getDefaultParent(),null,d,O.snap(f),O.snap(l),1,1,"text;"+(u?"html=1;":"")),O.updateCellSize(ca),O.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{O.getModel().endUpdate()}O.setSelectionCell(ca)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,l,B,null,M);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,B,null,M))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{O=this.editor.graph;A=null;O.getModel().beginUpdate();try{A=O.insertVertex(O.getDefaultParent(),null,"",O.snap(f),O.snap(l),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));O.fireEvent(new mxEventObject("textInserted","cells",[A]));u&&(d=O.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");A.value=d;O.updateCellSize(A);if(0<
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,M){StorageFile.listFiles(this,"F",F,M)});window.openBrowserFile=
mxUtils.bind(this,function(F,M,O){StorageFile.getFileContent(this,F,M,O)});window.deleteBrowserFile=mxUtils.bind(this,function(F,M,O){StorageFile.deleteFile(this,F,M,O)});if(!f){var u=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,M){null!=M&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(M)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,
mxUtils.bind(this,function(O){this.importXml(O,0,0,!0)}),null,M)):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 A=this.dialog,B=A.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=u;B.apply(A,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
function(d,f,l){var u=this,A=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))l();else{var F=0,M,O=!1;B.forEach(function(H,ja){H=ja.name.toLowerCase();"diagram/diagram.xml"==H?(O=!0,ja.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):l()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>F&&(F=H,M=ja))});0<F?M.async("string").then(function(H){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(H,
d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):u.parseFileData(H,mxUtils.bind(this,function(ja){4==ja.readyState&&(200<=ja.status&&299>=ja.status?f(ja.responseText):l())}),d.name):l()}):O||l()}},function(B){l(B)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A,null,null,null,l))};EditorUi.prototype.importFile=function(d,f,l,u,A,B,F,M,O,H,ja,da){H=null!=
H?H:!0;var ca=!1,ia=null,ma=mxUtils.bind(this,function(aa){var la=null;null!=aa&&"<mxlibrary"==aa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,aa,F)):la=this.importXml(aa,l,u,H,null,null!=da?mxEvent.isControlDown(da):null);null!=M&&M(la)});"image"==f.substring(0,5)?(O=!1,"image/png"==f.substring(0,9)&&(f=ja?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ia=this.importXml(f,l,u,H,null,null!=da?mxEvent.isControlDown(da):null),O=!0)),O||(f=this.editor.graph,O=d.indexOf(";"),0<
F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,A=mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?ma(aa.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,A,F):this.parseFile(O,A,F)):0==d.indexOf("PK")&&null!=O?(ca=!0,this.importZipFile(O,ma,mxUtils.bind(this,function(){ia=this.insertTextAt(this.validateFileData(d),
l,u,!0,null,H);M(ia)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(ia=this.insertTextAt(this.validateFileData(d),l,u,!0,null,H,null,null!=da?mxEvent.isControlDown(da):null));ca||null==M||M(ia);return ia};EditorUi.prototype.importFiles=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){u=null!=u?u:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var ia=null!=f&&null!=l,ma=!0;f=null!=f?f:0;l=null!=l?l:0;var aa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var la=ja||this.resampleThreshold,X=0;X<
!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,ba,Ca,!0)),null):this.importFile(ba,ha,qa,ra,pa,xa,Ca,Ba,za,ia,da,ca)}catch(Ma){return this.handleError(Ma),null}});B=null!=B?B:mxUtils.bind(this,function(ba){U.setSelectionCells(ba)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,J=z,W=[],T=mxUtils.bind(this,function(ba,ha){W[ba]=ha;if(0==--J){this.spinner.stop();if(null!=M)M(W);else{var qa=[];U.getModel().beginUpdate();try{for(ba=0;ba<W.length;ba++){var ra=
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var M=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H=
Math.max(M/A,O/A);if(1<H){var ja=Math.round(M/H),da=Math.round(O/H),ca=document.createElement("canvas");ca.width=ja;ca.height=da;ca.getContext("2d").drawImage(d,0,0,ja,da);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");ma.width=ja;ma.height=da;var aa=ma.toDataURL();ia!==aa&&(f=ia,M=ja,O=da)}}}catch(la){}l(f,M,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,l){try{var u=
this.editor.getEditBlankUrl=function(P){P=null!=P?P:"";"1"==urlParams.dev&&(P+=(0<P.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var M=f.addClickHandler;f.addClickHandler=function(P,U,k){var z=U;U=function(J,W){if(null==W){var T=mxEvent.getSource(J);"a"==T.nodeName.toLowerCase()&&(W=T.getAttribute("href"))}null!=W&&f.isCustomLink(W)&&(mxEvent.isTouchEvent(J)||!mxEvent.isPopupTrigger(J))&&f.customLinkClicked(W)&&mxEvent.consume(J);null!=z&&z(J,W)};M.call(this,P,U,k)};q.apply(this,arguments);
"row-resize";this.diagramContainer.parentNode.appendChild(A);this.bottomResizer=A;var B=null,F=null,M=null,O=null;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){O=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));A=A.cloneNode(!1);A.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(A);this.rightResizer=A;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){M=parseInt(this.diagramContainer.style.width);
B=mxEvent.getClientX(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(H){var ja=!1;null!=B&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(H)-B)+"px",ja=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,O+mxEvent.getClientY(H)-F)+"px",ja=!0);ja&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
0,0,this.maxImageSize,function(O,H,ja,da,ca,ia){d.insertImage(O,ca,ia)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var H=0;H<O.length;H++)O[H]()});else{var M=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],M.x,M.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(O){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",
mxEvent.addListener(l,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=B.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!0,!0)),!mxEvent.isConsumed(B)){var F=f.container.scrollLeft,M=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=M,Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!1,!0)}catch(O){this.handleError(O)}}),
0)}}catch(O){this.handleError(O)}}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==l?!0:A.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,l){function u(O){return"simple"==
O||0==f&&"sketch"==O}f=null!=f?f:150;var A=Editor.currentTheme,B=u(A)&&this.isDefaultTheme(d)||this.isDefaultTheme(A)&&u(d),F=B&&"sketch"!=d&&"sketch"!=A;if(B&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var M=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms ease-in-out");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
"flex");this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(M);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&u(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:
!0);null!=l&&l()}),f)}),f)}),f)}),0)}return F};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,
function(){if("sketch"==Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var A=this.getCurrentFile();A=null!=A?A.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(A)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(A))+'..."src="'+
Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=
function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
"right 0px top 8px",B.style.backgroundRepeat="no-repeat",B.style.backgroundSize="13px",B.style.paddingRight="16px",B.style.marginRight="-4px");f.appendChild(B);if("simple"==d){var F=this.createMenu("pages",Editor.thinNoteImage);F.style.backgroundSize="24px";F.style.display="inline-block";F.style.width="24px";F.style.height="30px";F.style.opacity="0.7";f.appendChild(F);var M=this.createMenuItem("undo",Editor.thinUndoImage);M.style.marginLeft="auto";M.style.flexShrink="0";M.style.opacity="0.7";f.appendChild(M);
M=this.createMenuItem("redo",Editor.thinRedoImage);M.style.marginLeft="0px";M.style.flexShrink="0";M.style.opacity="0.7";f.appendChild(M);M=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.style.display=480>H?"none":"";B.style.display=750>H?"none":"inline-flex"});mxEvent.addListener(window,"resize",M);M()}mxUtils.bind(this,function(H){mxEvent.addListener(H,"click",mxUtils.bind(this,function(da){mxEvent.isAltDown(da)?(this.hideCurrentMenu(),
mxUtils.bind(this,function(da,ca){ja(da,ca,ca.getProperty("factor"))}))})(B);"simple"!=d&&f.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var O=this.createMenuItem("fullscreen",Editor.fullscreenImage);f.appendChild(O);M=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",
mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",M);f.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==d?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText=
"simple"==d?"inline-block":"block";F.style.flexShrink="0";F.style.width="30px";F.style.height="30px";F.style.padding="simple"==d?"0px":"4px 4px 0px 4px";F.style.opacity="0.7";var M=this.createMenu("table",Editor.thinTableImage);M.style.backgroundSize="24px";M.style.padding="simple"==d?"0px":"4px 4px 0px 4px";M.style.display="inline-block";M.style.width="30px";M.style.height="30px";M.style.opacity="0.7";var O=F.cloneNode(!0);O.style.backgroundImage="url("+("simple"==d?Editor.thinShapesImage:Editor.shapesImage)+
this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=d,null,28,28,"simple"==d?Editor.thinRectangleImage:null);"simple"==d?(600<=ma&&(la.className="geToolbarButton",la.style.opacity="0.7",ia(la,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=ma&&this.sketchPickerMenuElt.appendChild(O),440<=ma&&ia(B,mxResources.get("freehand")+" (X)",null,"X"),500<=ma&&this.sketchPickerMenuElt.appendChild(M)):
f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,f=mxUtils.getOffset(this.diagramContainer),l=this.diagramContainer.scrollLeft-f.x;f=this.diagramContainer.scrollTop-f.y;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,
f-=this.embedViewport.y):(l+=this.embedViewport.x,f+=this.embedViewport.y));return{x:l,y:f,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate,u=mxUtils.getOffset(this.diagramContainer);this.diagramContainer.scrollLeft=d.x+u.x+(l.x-d.tx)*f;this.diagramContainer.scrollTop=d.y+u.y+(l.y-d.ty)*f};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",
JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,u=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==
this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var A=this.diagramContainer.getAttribute("data-bounds");
if(null!=A){this.diagramContainer.removeAttribute("data-bounds");u.getGraphBounds();var B=A.split(" ");u=mxUtils.getDocumentSize();this.diagramContainer.style.top=B[0];this.diagramContainer.style.left=B[1];A=parseInt(B[2]);B=parseInt(B[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,u.width-80);B=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,B):B,u.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=B+"px";this.diagramContainer.style.bottom=
"";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-
d.offsetWidth+"px";d.style.top=f.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+
(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);
d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme?(d.defaultEdgeStyle.edgeStyle=
"none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l=
d.indexOf(",");0<l&&(f=this.getPageById(d.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=
mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,
mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(u,A){try{this.spinner.stop();var B=this.createImageDataUri(u,f,"png"),F=parseInt(A.getAttribute("width")),M=parseInt(A.getAttribute("height"));this.writeImageToClipboard(B,F,M,mxUtils.bind(this,function(O){this.handleError(O)}))}catch(O){this.handleError(O)}}),null,null,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==
mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(u){this.handleError(u)}};EditorUi.prototype.writeImageToClipboard=function(d,f,l,u){var A=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](u)};EditorUi.prototype.copyCells=function(d,f){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText=
"";else{var u=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),A=mxUtils.getXml(l.encodeCells(u));mxUtils.setTextContent(d,encodeURIComponent(A));f?(l.removeCells(u,!1),l.lastPasteXml=null):(l.lastPasteXml=A,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,l,u,A){A=null!=A?A:!0;var B=this.editor.graph,F=null;B.lastPasteXml==d?B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var M=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d))F=this.importXml(d,M,M),B.setSelectionCells(F);else if(f&&1==B.getSelectionCount()){A=B.getStartEditingCell(B.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,
d,[A]);else{B.model.beginUpdate();try{B.labelChanged(A,d),Graph.isLink(d)&&B.setLinkForCell(A,d)}finally{B.model.endUpdate()}}B.setSelectionCell(A)}else F=B.getInsertPoint(),B.isMouseInsertPoint()&&(M=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),F=this.insertTextAt(d,F.x+M,F.y+M,A),B.setSelectionCells(F);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return F};EditorUi.prototype.pasteCells=
function(d,f,l,u){if(!mxEvent.isConsumed(d)){var A=f,B=!1;if(l&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),M=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var O=decodeURIComponent(F);this.isCompatibleString(O)&&(M=!0,F=O)}catch(ma){}M=M?null:d.clipboardData.getData("text/html");null!=M&&0<M.length?(A=this.parseHtmlData(M),B="text/plain"!=A.getAttribute("data-type")):null!=F&&0<F.length&&(A=document.createElement("div"),mxUtils.setTextContent(A,
M))}F=A.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(ma){var aa=this.editor.graph;aa.lastPasteXml==ma?aa.pasteCounter++:(aa.lastPasteXml=ma,aa.pasteCounter=0);var la=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ma,la,la));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,
f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var B=mxUtils.bind(this,function(M){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==M.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,M,f))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(M,f,u)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(l,mxUtils.bind(this,function(M){this.spinner.stop();B(M)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(M){this.spinner.stop();B(M)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(M){4==M.readyState&&(this.spinner.stop(),
200<=M.status&&299>=M.status?B(M.responseText):this.handleError({message:mxResources.get(413==M.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(M){this.spinner.stop();this.openLocalFile(M,f,u)}),mxUtils.bind(this,function(M){this.spinner.stop();this.handleError(M)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,d,l.name))}catch(M){this.handleError(M,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(M){this.spinner.stop();B(M)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,u)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
this.handleError(B);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?A.readAsText(u):A.readAsDataURL(u)})(d[l])};EditorUi.prototype.openLocalFile=function(d,f,l,u,A){var B=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var M=mxUtils.parseXml(d);null!=M&&(this.editor.setGraphXml(M.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
function(d,f){function l(F){if(null!=F){var M=F.lastIndexOf(".");0<M&&(F=F.substring(M+1,F.length));null==f[F]&&(f[F]=!0)}}var u=this.editor.graph,A=u.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(A[mxConstants.STYLE_SHAPE]));u.model.isEdge(d)&&(l(mxMarker.getPackageForType(A[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(A[mxConstants.STYLE_ENDARROW])));A=u.model.getChildCount(d);for(var B=0;B<A;B++)this.addBasenamesForCell(u.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
if(A)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var F=B.model.cells,M;for(M in F){var O=F[M];null!=O&&null!=O.style&&(O.style+=";sketch=1;"+(-1==O.style.indexOf("fontFamily=")||-1<O.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=da(H),Pa(H,O)):this.loadDescriptor(H,mxUtils.bind(this,function(ta){Pa(Qa(),O)}),mxUtils.bind(this,function(ta){this.handleError(ta,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(B,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(O,H,ja){M.apply(this,
l,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",l,null,null,null,u))}),onerror)};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var l=d.split("\n"),u=[],A=[],B=[],F={};if(0<l.length){var M={},O=this.editor.graph,H=null,ja=null,da=null,ca=null,ia=null,ma=null,aa=null,la="whiteSpace=wrap;html=1;",X=null,
"levelspacing"==Aa?ha=parseFloat(ya):"layout"==Aa&&(za=ya)}}}if(null==l[ta])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[ta].replace(/\r$/,""));Da=d=null;Aa=[];for(ya=0;ya<Ra.length;ya++)X==Ra[ya]&&(d=ya),P==Ra[ya]&&(Da=ya),Aa.push(mxUtils.trim(Ra[ya]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Aa[0]+"%");if(null!=Ma)for(var Wa=0;Wa<Ma.length;Wa++)null==M[Ma[Wa].to]&&(M[Ma[Wa].to]={});X=[];for(ya=ta+1;ya<l.length;ya++){var La=
[v])):(O.model.setStyle(Ea,v.style),0>mxUtils.indexOf(B,Ea)&&B.push(Ea),O.fireEvent(new mxEventObject("cellsInserted","cells",[Ea])));l=null!=Ea;Ea=v;if(!l)for(Wa=0;Wa<Ma.length;Wa++)M[Ma[Wa].to][Ea.getAttribute(Ma[Wa].to)]=Ea;null!=Qa&&"link"!=Qa&&(O.setLinkForCell(Ea,Ea.getAttribute(Qa)),O.setAttributeForCell(Ea,Qa,null));var ea=this.editor.graph.getPreferredSizeForCell(Ea);P=null!=Da?O.model.getCell(U+La[Da]):null;if(Ea.vertex){ab=null!=P?0:xa;ta=null!=P?0:Ca;null!=W&&null!=Ea.getAttribute(W)&&
function(jb,ib,mb){var wb=ib.getAttribute(mb.from);if(null!=wb&&""!=wb){wb=wb.split(",");for(var xb=0;xb<wb.length;xb++){var rb=M[mb.to][wb[xb]];if(null==rb&&null!=ma){rb=new mxCell(wb[xb],new mxGeometry(xa,Ca,0,0),ma);rb.style=O.replacePlaceholders(ib,rb.style,H);var nb=this.editor.graph.getPreferredSizeForCell(rb);rb.geometry.width=nb.width+qa;rb.geometry.height=nb.height+qa;M[mb.to][wb[xb]]=rb;rb.vertex=!0;rb.id=wb[xb];B.push(O.addCell(rb))}if(null!=rb){nb=mb.label;null!=mb.fromlabel&&(nb=(ib.getAttribute(mb.fromlabel)||
this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var L=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
function(d){var f=L.apply(this,arguments),l=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});Editor.enableCssDarkMode||this.addListener("darkModeChanged",l);this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return f};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var f=0;f<d.length;f++)this.libraryLoaded(d[f].file,d[f].images,d[f].title,null!=d[f].div?"none"!=d[f].div.style.display:
this.exportDialog=null);V.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,l,u,A,B,F,M){var O=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(O.getSvg(u,A,B)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),ja=O.getGraphBounds(),da=Math.floor(ja.width*
A/O.view.scale),ca=Math.floor(ja.height*A/O.view.scale);if(H.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.isExportToCanvas()){var ia={globalVars:O.getExportVariables()};M&&(ia.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});d.saveRequest(f,l,function(ma,aa){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(aa||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(ia))+(0<F?
"&dpi="+F:"")+"&bg="+(null!=u?u:"none")+"&w="+da+"&h="+ca+"&border="+B+"&xml="+encodeURIComponent(H))})}else"png"==l?d.exportImage(A,null==u||"none"==u,!0,!1,!1,B,!0,!1,null,M,F):d.exportImage(A,!1,!0,!1,!1,B,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var u=d;this.currentPage!=this.pages[l]&&(u=this.createTemporaryGraph(d.getStylesheet()),
document.createElement("div");A.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";A.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var M=F[d];if("R"==M.substring(0,1)){var O=JSON.parse(decodeURIComponent(M.substring(1)));B[O[0]]={id:O[0],title:O[1],downloadUrl:O[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){A.innerText="";
function(d){var f=d.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,l,u,A){var B=!0,F=window.setTimeout(mxUtils.bind(this,function(){B=!1;A({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(F);
B&&u.apply(this,arguments)}),O=mxUtils.bind(this,function(){window.clearTimeout(F);B&&A.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:O});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var l=mxUtils.bind(this,function(H,ja){var da={event:"remoteInvokeResponse",
msgMarkers:d.msgMarkers};null!=ja?da.error={errResp:ja}:null!=H&&(da.resp=H);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var u=d.funtionName,A=this.remoteInvokableFns[u];if(null!=A&&"function"===typeof this[u]){if(A.allowedDomains){for(var B=!1,F=0;F<A.allowedDomains.length;F++)if(f=="https://"+A.allowedDomains[F]){B=!0;break}if(!B){l(null,"Invalid Call: "+u+" is not allowed.");return}}var M=d.functionArgs;Array.isArray(M)||(M=[]);if(A.isAsync)M.push(function(){l(Array.prototype.slice.apply(arguments))}),
M.push(function(H){l(null,H||"Unkown Error")}),this[u].apply(this,M);else{var O=this[u].apply(this,M);l([O])}}else l(null,"Invalid Call: "+u+" is not found.")}catch(H){l(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var u=l.open("database",2);u.onupgradeneeded=function(A){try{var B=u.result;1>A.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});
function(F){if(!F||"1"==urlParams.forceMigration){var M=document.createElement("iframe");M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var O=!0,H=!1,ja,da=0,ca=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ia=mxUtils.bind(this,function(){da++;ma()}),ma=mxUtils.bind(this,
function(){try{if(da>=ja.length)ca();else{var la=ja[da];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(X){null==X||".scratchpad"==la&&X==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):ia()}),ia)}}catch(X){console.log(X)}}),aa=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,
data:la.data}],ia,ia,["filesInfo","files"])}catch(X){console.log(X)}});F=mxUtils.bind(this,function(la){try{if(la.source==M.contentWindow){var X={};try{X=JSON.parse(la.data)}catch(P){}"init"==X.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=X.event||H||(O?null!=X.resp&&0<X.resp.length&&null!=X.resp[0]?(ja=X.resp[0],O=!1,ma()):
function(B){try{A=A||"objects";Array.isArray(A)||(A=[A],d=[d],f=[f]);var F=B.transaction(A,"readwrite");F.oncomplete=l;F.onerror=u;for(B=0;B<A.length;B++)F.objectStore(A[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(M){null!=u&&u(M)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,f,l,u){this.openDatabase(mxUtils.bind(this,function(A){u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);A=A.transaction(u,"readwrite");A.oncomplete=f;A.onerror=l;for(var B=0;B<u.length;B++)A.objectStore(u[B]).delete(d[B])}),
function(d,f,l,u,A,B,F,M){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,l,u,A,B,F,M)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia,ma,aa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia,ma,aa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
mxUtils.write(ia,mxResources.get("timeAgo",[ma],"{1} ago"));ia.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function G(ca){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ia);ca.busyImg=ia}function L(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function V(ca,ia,ma,aa,la){function X(Z,ba,ha){var qa=document.createElement("li");
ca.addReply(Ba,function(Ma){Ba.id=Ma;ca.replies.push(Ba);R(za);ha&&ha()},function(Ma){xa();L(za);b.handleError(Ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function xa(){K(Ba,za,function(Ma){pa()},!0)}var Ca=P().pdiv,Ba=b.newComment(Z,b.getCurrentUser());Ba.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var za=V(Ba,ca.replies,Ca,aa+1);ba?xa():pa()}if(la||!ca.isResolved){F.style.display="none";var k=document.createElement("div");k.className="geCommentContainer";
!f||X(mxResources.get("reply"),function(){U("",!0)},ca.isResolved);J=b.getCurrentUser();null==J||J.id!=ca.user.id||d||ca.isLocked||(X(mxResources.get("edit"),function(){function Z(){K(ca,k,function(){G(k);ca.editComment(ca.content,function(){R(k)},function(ba){L(k);Z();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Z()},ca.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(k);ca.deleteComment(function(Z){if(!0===
Z){Z=k.querySelector(".geCommentTxt");Z.innerText="";mxUtils.write(Z,mxResources.get("msgDeleted"));var ba=k.querySelectorAll(".geCommentAction");for(Z=0;Z<ba.length;Z++)ba[Z].parentNode.removeChild(ba[Z]);R(k);k.style.opacity="0.5"}else{ba=P(ca).replies;for(Z=0;Z<ba.length;Z++)B.removeChild(ba[Z]);for(Z=0;Z<ia.length;Z++)if(ia[Z]==ca){ia.splice(Z,1);break}F.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(Z){L(k);b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
Editor.darkColor:"whiteSmoke";B.style.bottom=parseInt(A)+7+"px";u.appendChild(B);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=A;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A=document.createElement("a");A.className="geButton";if(!d){var O=A.cloneNode();O.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
O.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(O,"click",function(ca){function ia(){K(ma,aa,function(la){G(aa);b.addComment(la,function(X){la.id=X;ja.push(la);R(aa)},function(X){L(aa);ia();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),aa=V(ma,ja,null,0);ia();ca.preventDefault();mxEvent.consume(ca)});M.appendChild(O)}O=A.cloneNode();O.innerHTML='<img class="geAdaptiveAsset" src="'+
IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';O.setAttribute("title",mxResources.get("showResolved"));O.className="geButton";var H=!1;mxEvent.addListener(O,"click",function(ca){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";da();ca.preventDefault();mxEvent.consume(ca)});M.appendChild(O);b.commentsRefreshNeeded()&&(O=A.cloneNode(),O.innerHTML='<img class="geAdaptiveAsset" src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',O.setAttribute("title",mxResources.get("refresh")),
O.className="geButton",mxEvent.addListener(O,"click",function(ca){da();ca.preventDefault();mxEvent.consume(ca)}),M.appendChild(O));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,"click",function(ca){q();ca.preventDefault();mxEvent.consume(ca)}),M.appendChild(A));u.appendChild(M);var ja=[],da=mxUtils.bind(this,function(){this.hasError=
mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});da();this.refreshComments=da;M=mxUtils.bind(this,function(){function ca(X){var P=ma[X.id];if(null!=P)for(S(X,P),P=0;null!=X.replies&&P<X.replies.length;P++)ca(X.replies[P])}if(this.window.isVisible()){for(var ia=B.querySelectorAll(".geCommentDate"),ma={},aa=0;aa<ia.length;aa++){var la=ia[aa];ma[la.getAttribute("data-commentId")]=la}for(aa=
0;aa<ja.length;aa++)ca(ja[aa])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),u,e,g,n,y,!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,n,y,
q,E,K,S,G,L){var R=document.createElement("div");R.style.textAlign="center";L=null!=L?L:44;var V=document.createElement("div");V.style.padding="6px";V.style.overflow="auto";V.style.maxHeight=L+"px";V.style.lineHeight="1.2em";mxUtils.write(V,e);R.appendChild(V);null!=G&&(V=document.createElement("div"),V.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),V.appendChild(e),R.appendChild(V));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";E!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){E=K.getProperty("edit").changes;for(K=0;K<E.length;K++)if(E[K]instanceof RenamePage||E[K]instanceof MovePage||E[K]instanceof mxRootChange){this.updateTabContainer();
function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var L=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(L,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(n,E,null,K);mxEvent.addGestureListeners(e,E,null,K)};
return null==Z||ba});var J=aa.geometry.width+40,W=aa.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?J=0:la==mxConstants.DIRECTION_NORTH?(J=0,W=-W):la==mxConstants.DIRECTION_WEST?(J=-J,W=0):la==mxConstants.DIRECTION_EAST&&(W=0);f.moveCells(z,J,W);return f.addCells(P,U)}finally{f.model.endUpdate()}}function L(aa,la){f.model.beginUpdate();try{var X=f.model.getParent(aa),P=f.getIncomingTreeEdges(aa),U=K(aa);0==P.length&&(P=[f.createEdge(X,null,"",null,null,f.createCurrentEdgeStyle())],U=la);var k=
f.model.getTerminal(ba[0],!0);P=this.cloneCell(ba[0]);this.addEdge(P,f.getDefaultParent(),T,J[Z])}}finally{this.model.endUpdate()}return J};if(null!=d.sidebar){var M=d.sidebar.dropAndConnect;d.sidebar.dropAndConnect=function(aa,la,X,P){var U=f.model,k=null;U.beginUpdate();try{if(k=M.apply(this,arguments),n(aa))for(var z=0;z<k.length;z++)if(U.isEdge(k[z])&&null==U.getTerminal(k[z],!0)){U.setTerminal(k[z],aa,!0);var J=f.getCellGeometry(k[z]);J.points=null;null!=J.getTerminalPoint(!0)&&J.setTerminalPoint(null,
G(la):L(la):13==aa.which&&(X=S(la,!mxEvent.isShiftDown(aa)))),null!=X&&0<X.length?(1==X.length&&f.model.isEdge(X[0])?f.setSelectionCell(f.model.getTerminal(X[0],!1)):f.setSelectionCell(X[X.length-1]),null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(la)),f.startEditingAtCell(la),mxEvent.consume(aa)):37==aa.keyCode?(V(la,mxConstants.DIRECTION_WEST),mxEvent.consume(aa)):38==aa.keyCode?(V(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(aa)):39==aa.keyCode?(V(la,mxConstants.DIRECTION_EAST),mxEvent.consume(aa)):
40==aa.keyCode&&(V(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(aa)))}}catch(P){d.handleError(P)}mxEvent.isConsumed(aa)||H.apply(this,arguments)};var ja=f.connectVertex;f.connectVertex=function(aa,la,X,P,U,k,z){var J=f.getIncomingTreeEdges(aa);if(n(aa)){var W=K(aa),T=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST,Z=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;return W==la||0==J.length?L(aa,la):T==Z?G(aa):S(aa,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ja.apply(this,
G.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),S.style);L.geometry.relative=!0;L.edge=!0;E.insertEdge(L,!0);G.insertEdge(L,!1);var R=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 f=new mxCell("",new mxGeometry(0,0,0,0),S.style);f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);q.insert(S);q.insert(L);q.insert(V);q.insert(f);q.insert(E);q.insert(K);q.insert(G);q.insert(R);q.insert(d);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var q=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;');
S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);K.insertEdge(S,!1);var G=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");L.geometry.relative=
!0;L.edge=!0;E.insertEdge(L,!0);G.insertEdge(L,!1);q.insert(S);q.insert(L);q.insert(E);q.insert(K);q.insert(G);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree root",function(){var q=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"};');y.setAttributeForCell(q,"treeRoot","1");q.vertex=!0;return sb.createVertexTemplateFromCells([q],
f.parentNode&&f.parentNode.removeChild(f)}))};var L=!1;EditorUi.prototype.initFormatWindow=function(){if(!L&&null!=this.formatWindow){L=!0;var V=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){V.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+d-140+"px"):(this.div.style.width=d+"px",this.table.style.width=this.div.style.width,
M.insertBefore(Ba,B.statusContainer):M.appendChild(Ba);null!=Ca?(Ba.style.backgroundImage="url("+Ca+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,ha);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(za){za.preventDefault()}));mxEvent.addListener(Ba,"click",function(za){"disabled"!=Ba.getAttribute("disabled")&&qa(za);mxEvent.consume(za)});
"0 4px 0 4px";ra.style.height="30px";ra.style.position="relative";ra.style.top="0px";for(var pa=0;pa<ha.length;pa++)null!=ha[pa]&&(ha[pa].style.margin="0px",ha[pa].style.boxShadow="none",ra.appendChild(ha[pa]));null!=qa&&mxUtils.setOpacity(ra,qa);null!=B.statusContainer?M.insertBefore(ra,B.statusContainer):M.appendChild(ra);return ra}function l(){for(var ha=M.firstChild;null!=ha;){var qa=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=qa}O=M.firstChild;
this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var B=this,F=B.editor.graph;B.toolbar=this.createToolbar(B.createDiv("geToolbar"));B.defaultLibraryName=mxResources.get("untitledLibrary");var M=document.createElement("div");M.className="geMenubarContainer";var O=null,H=new Menubar(B,M);B.statusContainer=B.createStatusContainer();B.statusContainer.style.position="relative";B.statusContainer.style.maxWidth="";B.statusContainer.style.color=
"gray";B.statusContainer.style.cursor="default";var ja=B.hideCurrentMenu;B.hideCurrentMenu=function(){ja.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var da=B.descriptorChanged;B.descriptorChanged=function(){da.apply(this,arguments);var ha=B.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var qa=ha.getMode();"google"==qa?qa="googleDrive":"github"==qa?qa="gitHub":"gitlab"==qa?qa="gitLab":"onedrive"==qa&&(qa="oneDrive");qa=mxResources.get(qa);M.setAttribute("title",ha.getTitle()+
(null!=qa?" ("+qa+")":""))}else M.removeAttribute("title")};B.setStatusText(B.editor.getStatus());M.appendChild(B.statusContainer);B.buttonContainer=document.createElement("div");B.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;";M.appendChild(B.buttonContainer);B.menubarContainer=B.buttonContainer;B.tabContainer=document.createElement("div");B.tabContainer.className=
B.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=B.actions.get("zoomIn"),P=B.actions.get("zoomOut"),U=B.actions.get("resetView"),k=B.actions.get("undo"),z=B.actions.get("redo"),J=d("",k.funct,null,mxResources.get("undo")+" ("+k.shortcut+")",k,Editor.undoImage),W=d("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),T=d("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage);M.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
B.editor.addListener("resetGraphView",qa);B.editor.addListener("pageSelected",qa);B.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(ra,pa){qa(ra,pa,pa.getProperty("factor"))}))})(Z);var ba=B.setGraphEnabled;B.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(Z.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(M);
function(l){return K.getImageUrl(l)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<S.length){if(null!=this.pageId)for(var G=0;G<S.length;G++)if(this.pageId==S[G].getAttribute("id")){this.currentPage=G;break}var L=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(l){var u=S[K.currentPage];return"page"==l?u.getAttribute("name")||"Page-"+(K.currentPage+
1):"pagenumber"==l?K.currentPage+1:"pagecount"==l?S.length:L.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(l){this.handlingResize||(this.currentPage=mxUtils.mod(l,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(l){l=this.getIndexById(l);var u=0<=l;u&&this.selectPage(l);return u};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=
E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(da,ca){},mouseUp:function(da,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-ca.getGraphX())<K&&Math.abs(this.startY-ca.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?y():q(30))}})}for(var S=this.toolbarItems,G=0,L=mxUtils.bind(this,function(da,ca,ia,ma){da=this.createToolbarButton(da,ca,ia,ma);e.appendChild(da);
G++;return da}),R=null,V=null,d=null,f=null,l=0;l<S.length;l++){var u=S[l];if("pages"==u){f=b.ownerDocument.createElement("div");f.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;color:#000;";mxUtils.setOpacity(f,70);var A=L(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";
A.style.paddingLeft="0px";A.style.paddingRight="0px";e.appendChild(f);var B=L(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";u=mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,this.currentPage+1+" / "+this.diagrams.length);f.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=f.style.display;B.style.display=f.style.display});this.addListener("graphChanged",
u);u()}else if("zoom"==u)this.zoomEnabled&&(L(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),L(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),L(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"==u){if(this.layersEnabled){var F=this.graph.getModel(),M=L(mxUtils.bind(this,function(da){if(null!=R)R.parentNode.removeChild(R),R=null;else{R=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ia=this.graph.getGraphBounds(),ma=this.graph.view;0>ia.x||0>ia.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale}):null!=this.graph.originalViewState&&
0<ia.x/ma.scale+this.graph.originalViewState.translate.x-ma.translate.x&&0<ia.y/ma.scale+this.graph.originalViewState.translate.y-ma.translate.y&&(ma.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale})}}));mxEvent.addListener(R,"mouseleave",function(){R.parentNode.removeChild(R);R=null});da=M.getBoundingClientRect();R.style.width="140px";R.style.padding=
document.body.appendChild(R)}}),Editor.layersImage,mxResources.get("layers")||"Layers");F.addListener(mxEvent.CHANGE,function(){M.style.display=1<F.getChildCount(F.root)?"inline-block":"none"});M.style.display=1<F.getChildCount(F.root)?"inline-block":"none"}}else if("tags"==u){if(this.tagsEnabled){var O=L(mxUtils.bind(this,function(da){null==V&&(V=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),V.div.getElementsByTagName("div")[0].style.position="",V.div.style.maxHeight="160px",
"inline-block":"none"}}else"lightbox"==u?this.lightboxEnabled&&L(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(u=this.graphConfig["toolbar-buttons"][u],null!=u&&(u.elem=L(null==u.enabled||u.enabled?u.handler:function(){},u.image,u.title,u.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),
document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=E,GraphViewer.resizeSensorEnabled=!0,K.apply(this,arguments))};var S=y.editor.graph,G=S.container;G.style.overflow="hidden";this.lightboxChrome&&null==b?(G.style.border="1px solid #c0c0c0",G.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",q)):(e.style.display="none",g.style.display="none");var L=this;S.getImageFromBundles=function(V){return L.getImageUrl(V)};var R=y.createTemporaryGraph;
y.createTemporaryGraph=function(){var V=R.apply(this,arguments);V.getImageFromBundles=function(d){return L.getImageUrl(d)};return V};this.graphConfig.move&&(S.isMoveCellsEvent=function(V){return!0});mxUtils.setPrefixedStyle(G.style,"border-radius","4px");G.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(S,y);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){y.destroy()}),G.style.outline=
d.appendChild(d.resizeSensor);"static"==q(d,"position")&&(d.style.position="relative");var l=d.resizeSensor.childNodes[0],u=l.childNodes[0],A=d.resizeSensor.childNodes[1],B=function(){u.style.width="100000px";u.style.height="100000px";l.scrollLeft=1E5;l.scrollTop=1E5;A.scrollLeft=1E5;A.scrollTop=1E5};B();var F=!1,M=function(){d.resizedAttached&&(F&&(d.resizedAttached.call(),F=!1),b(M))};b(M);var O,H,ja,da;f=function(){if((ja=d.offsetWidth)!=O||(da=d.offsetHeight)!=H)F=!0,O=ja,H=da;B()};var ca=function(ia,
ma,aa){ia.attachEvent?ia.attachEvent("on"+ma,aa):ia.addEventListener(ma,aa)};ca(l,"scroll",f);ca(A,"scroll",f)}var K=function(){GraphViewer.resizeSensorEnabled&&n()};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;K();S=null;G=!1},200))})).observe(g)}else{var L=Object.prototype.toString.call(g),R="[object Array]"===L||"[object NodeList]"===L||"[object HTMLCollection]"===
L||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){L=0;for(var V=g.length;L<V;L++)E(g[L],K)}else E(g,K);this.detach=function(){if(R)for(var d=0,f=g.length;d<f;d++)e.detach(g[d]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
/*! @license DOMPurify 3.0.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.0.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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.3",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmod)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.2",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=
new mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled()&&(this.delayedSelection?this.cell=a:this.start(a,b.getX(),b.getY()),
this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)))};mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
function Dialog(b,e,g,n,y,q,E,K,S,G,L){this.editorUi=b;var R=S?57:0,V=g,d=n,f=S?0:64,l=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(l.height=window.innerHeight);var u=l.height;l=Math.max(1,Math.round((l.width-g-f)/2));var A=Math.max(1,Math.round((u-n-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-f):g;n=Math.min(n,u-f);0<b.dialogs.length&&
q.className="geDialogClose",q.style.top=A+14+"px",q.style.left=l+g+38-R+"px",q.style.zIndex=this.zIndex,mxEvent.addListener(q,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(q),this.dialogImg=q,!L)){var M=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(O){M=!0}),null,mxUtils.bind(this,function(O){M&&(b.hideDialog(!0),M=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var O=G();null!=O&&(V=g=O.w,d=n=O.h)}O=Editor.inlineFullscreen||
var ErrorDialog=function(b,e,g,n,y,q,E,K,S,G,L){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var V=document.createElement("div");V.style.padding="0px";V.style.margin="0px";V.style.fontSize="18px";V.style.paddingBottom="16px";V.style.marginBottom="10px";V.style.borderBottom="1px solid #c0c0c0";V.style.color="gray";V.style.whiteSpace="nowrap";V.style.textOverflow="ellipsis";V.style.overflow="hidden";mxUtils.write(V,e);V.setAttribute("title",e);R.appendChild(V)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=g;R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=L&&L()}),G.className="geBtn",g.appendChild(G));var d=mxUtils.button(n,
PrintDialog.prototype.create=function(b){function e(d){var f=E.checked||G.checked,l=parseInt(R.value)/100;isNaN(l)&&(l=1,R.value="100%");mxClient.IS_SF&&(l*=.75);var u=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,A=1/g.pageScale;if(f){var B=E.checked?1:parseInt(L.value);isNaN(B)||(A=mxUtils.getScaleForPageCount(B,g,u))}var F=B=0;u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*l);u.height=Math.ceil(u.height*l);A*=l;!f&&g.pageVisible?(l=g.getPageLayout(),B-=l.x*u.width,F-=l.y*u.height):
"click",function(d){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(d)});q.appendChild(K);var L=document.createElement("input");L.setAttribute("value","1");L.setAttribute("type","number");L.setAttribute("min","1");L.setAttribute("size","4");L.setAttribute("disabled","disabled");L.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(L);mxUtils.write(K," "+mxResources.get("pages")+" (max)");q.appendChild(K);y.appendChild(q);mxEvent.addListener(G,"change",
function(){G.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");E.checked=!G.checked});q=q.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");q.appendChild(K);K=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";K.appendChild(R);q.appendChild(K);y.appendChild(q);q=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
var PageSetupDialog=function(b){function e(){var l=R;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(L.style.backgroundImage="url("+l.src+")",L.style.display="inline-block"):(L.style.backgroundImage="",L.style.display="none");L.style.backgroundColor="";null!=V&&V!=mxConstants.NONE&&(L.style.backgroundColor=V,L.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var y=document.createElement("tbody");
q.appendChild(E);E=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var L=document.createElement("div");L.style.display="inline-block";L.style.verticalAlign="middle";L.style.backgroundPosition="center center";L.style.backgroundRepeat="no-repeat";L.style.backgroundSize="contain";L.style.border="1px solid lightGray";L.style.borderRadius="4px";L.style.marginRight="14px";L.style.height="32px";
L.style.width="64px";L.style.cursor="pointer";L.style.padding="4px";var R=g.backgroundImage,V=g.background,d=g.shadowVisible,f=function(l){b.showBackgroundImageDialog(function(u,A,B,F){A||(null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src}),R=u,d=F);V=B;e()},R,V,!0);mxEvent.consume(l)};mxEvent.addListener(G,"click",f);mxEvent.addListener(L,"click",f);e();E.appendChild(L);E.appendChild(G);q.appendChild(E);y.appendChild(q);q=document.createElement("tr");E=document.createElement("td");
ja.format.width&&g.height==ja.format.height?(K.value=ja.key,q.setAttribute("checked","checked"),q.defaultChecked=!0,q.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,O=!0):g.width==ja.format.height&&g.height==ja.format.width&&(K.value=ja.key,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,O=E.checked=!0));O?(S.style.display="",L.style.display="none"):(R.value=g.width/100,V.value=g.height/100,q.setAttribute("checked",
"checked"),K.value="custom",S.style.display="none",L.style.display="")}}e="format-"+e;var q=document.createElement("input");q.setAttribute("name",e);q.setAttribute("type","radio");q.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.width=
"206px";var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";q.style.marginRight="6px";S.appendChild(q);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));S.appendChild(G);var L=document.createElement("div");
L.style.marginLeft="4px";L.style.width="210px";L.style.height="24px";var R=document.createElement("input");R.setAttribute("size","7");R.style.textAlign="right";L.appendChild(R);mxUtils.write(L," in x ");var V=document.createElement("input");V.setAttribute("size","7");V.style.textAlign="right";L.appendChild(V);mxUtils.write(L," in");S.style.display="none";L.style.display="none";for(var d={},f=PageSetupDialog.getFormats(),l=0;l<f.length;l++){var u=f[l];d[u.key]=u;var A=document.createElement("option");
A.setAttribute("value",u.key);mxUtils.write(A,u.title);K.appendChild(A)}var B=!1;y();b.appendChild(K);mxUtils.br(b);b.appendChild(S);b.appendChild(L);var F=g,M=function(O,H){O=d[K.value];null!=O.format?(R.value=O.format.width/100,V.value=O.format.height/100,L.style.display="none",S.style.display=""):(S.style.display="none",L.style.display="");O=parseFloat(R.value);if(isNaN(O)||0>=O)R.value=g.width/100;O=parseFloat(V.value);if(isNaN(O)||0>=O)V.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100*
parseFloat(R.value)),Math.floor(100*parseFloat(V.value)));"custom"!=K.value&&E.checked&&(O=new mxRectangle(0,0,O.height,O.width));H&&B||O.width==F.width&&O.height==F.height||(F=O,null!=n&&n(F))};mxEvent.addListener(e,"click",function(O){q.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(G,"click",function(O){E.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(R,"blur",M);mxEvent.addListener(R,"click",M);mxEvent.addListener(V,"blur",M);mxEvent.addListener(V,"click",M);mxEvent.addListener(E,
"change",M);mxEvent.addListener(q,"change",M);mxEvent.addListener(K,"change",function(O){B="custom"==K.value;M(O,!0)});M();return{set:function(O){g=O;y(null,null,!0)},get:function(){return F},widthInput:R,heightInput:V}};
var FilenameDialog=function(b,e,g,n,y,q,E,K,S,G,L,R,V){S=null!=S?S:!0;var d=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),u=document.createElement("td");d.style.margin="0 auto";u.style.textOverflow="ellipsis";u.style.whiteSpace="nowrap";u.style.textAlign="right";u.style.maxWidth=(V?V+15:100)+"px";u.style.fontSize="10pt";u.style.width=(V?V:84)+"px";mxUtils.write(u,(y||mxResources.get("filename"))+":");l.appendChild(u);var A=document.createElement("input");
A.setAttribute("value",e||"");A.style.marginLeft="4px";A.style.width=null!=R?R+"px":"180px";var B=mxUtils.button(g,function(){if(null==q||q(A.value))S&&b.hideDialog(),n(A.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=y||null==E)if(null!=L?Editor.selectFilename(A):(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var F=d.parentNode;if(null!=F){var M=null;mxEvent.addListener(F,"dragleave",
function(O){null!=M&&(M.style.backgroundColor="",M=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=A,M.style.backgroundColor="#ebf2f9");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(O.dataTransfer.getData("text/uri-list")),
B.click());O.stopPropagation();O.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(A);l.appendChild(u);if(null!=y||null==E)f.appendChild(l),null!=L&&(u.appendChild(FilenameDialog.createTypeHint(b,A,L)),null!=b.editor.diagramFileTypes&&(l=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+
2;u.style.paddingTop=null!=L?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});R.className="geBtn";null!=K&&(e=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),e.className="geBtn",u.appendChild(e));b.editor.cancelFirst&&u.appendChild(R);mxEvent.addListener(A,"keypress",function(F){13==F.keyCode&&B.click()});u.appendChild(B);b.editor.cancelFirst||u.appendChild(R);
mxGraphView.prototype.validateBackgroundStyles=function(E,K,S){var G=this.graph;E=null!=E?E:1;var L=null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background,R=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",V="none",d="";if(G.isGridEnabled()||G.gridVisible){d=10;mxClient.IS_SVG?(V=unescape(encodeURIComponent(this.createSvgGrid(R,E))),V=window.btoa?btoa(V):Base64.encode(V,!0),V="url(data:image/svg+xml;base64,"+V+")",d=G.gridSize*this.scale*this.gridSteps*
null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=d,G.view.backgroundPageShape.node.style.backgroundImage=V,G.view.backgroundPageShape.node.style.backgroundColor=L,G.view.backgroundPageShape.node.style.borderColor=G.defaultPageBorderColor,G.container.classList.add("geDiagramBackdrop"),E.style.backgroundImage="none",E.style.backgroundColor="",G.container.style.backgroundColor=R?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),
E.style.backgroundPosition=d,E.style.backgroundImage=V,!R||null!=G.background&&G.background!=mxConstants.NONE?E.style.backgroundColor=L:(E.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E,K){for(K=this.graph.gridSize*this.scale*(null!=K?K:1);K<this.minGridSize;)K*=2;for(var S=this.gridSteps*K,G=[],L=1;L<this.gridSteps;L++){var R=L*K;G.push("M 0 "+R+" L "+S+" "+R+" M "+R+" 0 L "+R+" "+S)}return'<svg width="'+S+'" height="'+
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+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+K,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.view.scale,L=this.view.translate,R=this.pageFormat,V=G*this.pageScale,d=this.view.getBackgroundPageBounds();K=d.width;S=d.height;var f=new mxRectangle(G*
L.x,G*L.y,R.width*V,R.height*V),l=(E=E&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,u=E?Math.ceil(K/f.width)-1:0,A=d.x+K,B=d.y+S;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(F){if(null!=F){for(var M=F==this.horizontalPageBreaks?l:u,O=0;O<=M;O++){var H=F==this.horizontalPageBreaks?[new mxPoint(Math.round(d.x),Math.round(d.y+(O+1)*f.height)),new mxPoint(Math.round(A),
Math.round(d.y+(O+1)*f.height))]:[new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(d.y)),new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(B))];null!=F[O]?(F[O].points=H,F[O].redraw()):(H=new mxPolyline(H,this.pageBreakColor),H.dialect=this.dialect,H.isDashed=this.pageBreakDashed,H.pointerEvents=!1,H.init(this.view.backgroundPane),H.redraw(),F[O]=H)}for(O=M;O<F.length;O++)null!=F[O]&&F[O].destroy();F.splice(M,F.length-M)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,S){for(var G=0;G<K.length;G++){if(this.graph.isTableCell(K[G])||this.graph.isTableRow(K[G]))return!1;if(this.graph.getModel().isVertex(K[G])){var L=this.graph.getCellGeometry(K[G]);if(null!=L&&L.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,S){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,L=this.graph.pageScale,R=G.width*L;G=G.height*L;L=Math.floor(Math.min(0,K)/R);var V=Math.floor(Math.min(0,
S)/G);return new mxRectangle(this.scale*(this.translate.x+L*R),this.scale*(this.translate.y+V*G),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/R)-L)*R,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/G)-V)*G)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,S,G,L,R){var V=y.apply(this,arguments);null==R||R||mxEvent.addListener(V,"mousedown",function(d){mxEvent.consume(d)});return V};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,K,S){var G=this.graph.model.getParent(E);if(K){var L=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);
L=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=L&&L.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(L=q.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))L=G,this.graph.isTable(L)||(L=this.graph.model.getParent(L)),L=!this.graph.selectionCellsHandler.isHandled(L)||this.graph.isCellSelected(L)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&
this.graph.isCellSelected(G);return L};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),S=K.getParent(E),G=this.graph.view.getState(S),L=this.graph.isCellSelected(E);null!=G&&(K.isVertex(S)||K.isEdge(S));){var R=this.graph.isCellSelected(S);L=L||R;if(R||!L&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=K.getParent(S)}return E}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this,y=this.editor.graph;y.lightbox=g;var q=y.getGraphBounds;y.getGraphBounds=function(){var P=q.apply(this,arguments),U=this.backgroundImage;if(null!=U&&null!=U.width&&null!=U.height){var k=this.view.translate,z=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((k.x+U.x)*z,(k.y+U.y)*z,U.width*z,U.height*z))}return P};y.useCssTransforms&&(this.lazyZoomDelay=
S="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),G=!1,L=!1;this.setDefaultStyle=function(P){try{y.getModel().isEdge(P)?L=!1:G=!1;var U=y.getCellStyle(P,!1),k=[],z=[],J;for(J in U)k.push(U[J]),z.push(J);y.getModel().isEdge(P)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",z,"values",k,"cells",[P],"force",!0));y.getModel().isEdge(P)?L=!0:G=!0}catch(W){this.handleError(W)}};
this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);G=L=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var R=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<R.length;e++)0>mxUtils.indexOf(E,R[e])&&E.push(R[e]);var V="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize",
var F=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(P){return F.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var M=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return n.isSpaceDown()||M.apply(this,arguments)};var O=!1,H=null,ja=null,da=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&O!=y.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,
window.setTimeout(function(){null!=n.hoverIcons&&n.hoverIcons.update(y.view.getState(k[k.length-1]))},0));f(k)});this.addListener("styleChanged",mxUtils.bind(this,function(P,U){P=U.getProperty("force");if(this.updateDefaultStyle||P){var k=U.getProperty("cells"),z=P=!1;if(0<k.length)for(var J=0;J<k.length&&(P=y.getModel().isVertex(k[J])||P,!(z=y.getModel().isEdge(k[J])||z)||!P);J++);else z=P=!0;P=P&&!G;z=z&&!L;k=U.getProperty("keys");U=U.getProperty("values");for(J=0;J<k.length;J++){var W=0<=mxUtils.indexOf(R,
EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,n=g.getParent(e[0]),y=g.getParent(n);if(null!=n&&null!=y){for(var q=n.getIndex(e[0]),E=y.getIndex(n),K=null,S=1,G=1,L=0,R=E<y.getChildCount()-1?g.getChildAt(g.getChildAt(y,E+1),q):null;L<e.length-1;){var V=e[++L];null==R||R!=V||null!=K&&S!=K||(K=S,S=0,G++,n=g.getParent(R),R=E+G<y.getChildCount()?g.getChildAt(g.getChildAt(y,E+G),q):null);var d=this.editor.graph.view.getState(V);
if(V==g.getChildAt(n,q+S)&&null!=d&&1==mxUtils.getValue(d.style,"colspan",1)&&1==mxUtils.getValue(d.style,"rowspan",1))S++;else break}L==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};
{willReadFrequently:!0});y.filter="invert(100%) hue-rotate(180deg) saturate(1.3)";g.model.beginUpdate();try{for(var q=0;q<b.length;q++)if(g.model.isEdge(b[q])||g.model.isVertex(b[q])){var E=g.getCurrentCellStyle(b[q]);if(null!=E)for(var K=0;K<e.length;K++)try{var S=E[e[K]];if(null!=S&&"#"==S.charAt(0)){var G=n[S];if(null==G){y.fillStyle=S;y.fillRect(0,0,1,1);var L=y.getImageData(0,0,1,1);G="#"+(16777216|L.data[2]|L.data[1]<<8|L.data[0]<<16).toString(16).substring(1);n[S]=G}g.setCellStyles(e[K],G,
function(){return n.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var y=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var L=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(L.x,L.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
g);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();q.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,L){var R=L.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?E.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(V,d,f){var l=b.getCompositeParent(S.cell);V=b.getCellGeometry(l);for(L.consume();null!=l&&b.model.isVertex(l)&&null!=V&&V.relative;)cell=
l,l=b.model.getParent(cell),V=b.getCellGeometry(l);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(L.getGraphX(),L.getGraphY(),l,mxUtils.bind(this,function(u){f(u);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(u))}),G)}),30)}),mxUtils.bind(this,function(V){this.graph.selectCellsForConnectVertex(V,R,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var L=
G.getProperty("arrow"),R=G.getProperty("direction"),V=G.getProperty("event");L=L.getBoundingClientRect();var d=mxUtils.getOffset(b.container),f=b.container.scrollLeft+L.x-d.x;d=b.container.scrollTop+L.y-d.y;var l=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),u=e.showShapePicker(f,d,l,mxUtils.bind(this,function(A){null!=A&&b.connectVertex(l,R,b.defaultEdgeLength,V,!0,!1,function(B,F,M){M(A);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(A))},
function(B){b.selectCellsForConnectVertex(B)},V,this.hoverIcons)}),R,!0);this.centerShapePicker(u,L,f,d,R);mxUtils.setOpacity(u,30);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K)}))}};
EditorUi.prototype.createShapePicker=function(b,e,g,n,y,q,E,K,S,G,L){L=null!=L?L:!0;var R=this.editor.graph,V=null;S=null!=S?S:function(l){l=l[0];var u=0,A=0,B=l.geometry;null!=B&&(R.model.isEdge(l)&&(l=B.getTerminalPoint(!1),B=new mxRectangle(0,0,l.x,l.y)),u=B.width/2,A=B.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-u),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-A))};if(null!=E&&0<E.length){var d=this;R=this.editor.graph;V=document.createElement("div");
0,A.x,A.y));null!=A&&u.appendChild(this.sidebar.createVertexTemplateFromCells([l],A.width,A.height,"",!0,!1,null,!1,mxUtils.bind(this,function(B){if(!mxEvent.isShiftDown(B)||null==g&&R.isSelectionEmpty()){var F=R.cloneCell(l);if(null!=n)n(F);else{var M=S([F]);R.model.isEdge(F)?F.geometry.translate(M.x,M.y):(F.geometry.x=M.x,F.geometry.y=M.y);R.model.beginUpdate();try{R.addCell(F),R.model.isVertex(F)&&R.isAutoSizeCell(F)&&R.updateCellSize(F)}finally{R.model.endUpdate()}R.setSelectionCell(F);R.scrollCellToVisible(F);
L&&R.startEditing(F);null!=d.hoverIcons&&d.hoverIcons.update(R.view.getState(F))}}else F=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(l,F);null!=q&&q(B);mxEvent.consume(B)}),25,25,null,null,g))});for(G=0;G<(K?Math.min(E.length,4):E.length);G++)y(E[G]);E=V.offsetTop+V.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<E&&(V.style.top=Math.max(R.container.scrollTop+22,e-E)+"px");E=V.offsetLeft+V.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<E&&(V.style.left=
EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var E=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||q.getSelectionCells();E=q.getExportableCells(q.model.getTopmostCells(E));for(var K={},S=q.createCellLookup(E),G=q.cloneCells(E,null,K),L=new mxGraphModel,R=L.getChildAt(L.getRoot(),
0),V=0;V<G.length;V++){L.add(R,G[V]);var d=q.view.getState(E[V]);if(null!=d){var f=q.getCellGeometry(G[V]);null!=f&&f.relative&&!L.isEdge(E[V])&&null==S[mxObjectIdentity.get(L.getParent(E[V]))]&&(f.offset=null,f.relative=!1,f.x=d.x/d.view.scale-d.view.translate.x,f.y=d.y/d.view.scale-d.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(K,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(q){var E=
"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var L=q(mxUtils.bind(this,function(z){this.actions.get("nextPage").funct();mxEvent.consume(z)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";L.style.paddingLeft="4px";L.style.paddingRight=
"0px";var V=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(L.style.display="",S.style.display="",G.style.display="inline-block"):(L.style.display="none",S.style.display="none",G.style.display="none");R()});this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",R)}q(mxUtils.bind(this,function(z){this.actions.get("zoomOut").funct();mxEvent.consume(z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(V=0;V<this.lightboxToolbarActions.length;V++){var F=this.lightboxToolbarActions[V];F.elem=q(F.fn,F.icon,F.tooltip)}if(null!=y.refreshBtn){var M=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);
q(mxUtils.bind(this,function(z){null!=M?window.location.href=M:window.location.reload();mxEvent.consume(z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(z){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&
e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==
e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("copyData").setEnabled(1==e.cells.length);this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("editStyle").setEnabled(1==e.cells.length);this.actions.get("editTooltip").setEnabled(1==
EditorUi.prototype.addSplitHandler=function(b,e,g,n){function y(R){if(null!=E){var V=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));n(Math.max(0,K+(e?V.x-E.x:E.y-V.y)-g));mxEvent.consume(R);K!=L()&&(S=!0,G=null)}}function q(R){y(R);E=K=null}var E=null,K=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var L=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){E=new mxPoint(mxEvent.getClientX(R),
mxEvent.getClientY(R));K=L();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var V=null!=G?G-g:0;G=L();n(V);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
EditorUi.prototype.showError=function(b,e,g,n,y,q,E,K,S,G,L,R,V){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),n,y,q,E,R,K,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,L||100+20*e,!0,!1,V);b.init()};EditorUi.prototype.showDialog=function(b,e,g,n,y,q,E,K,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,n,y,q,E,K,S,G);this.dialogs.push(this.dialog)};
0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(L){}try{var S=q.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(L){}}catch(L){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(y){b(null)})}))["catch"](function(n){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(n){n.text().then(function(y){b(y)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
f=0,37==R?f=-V:38==R?l=-V:39==R?f=V:40==R&&(l=V),B.currentDx+=f*A,B.currentDy+=l*A,B.checkPreview(),B.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=B.first){var F=B.roundLength(B.currentDx/A),M=B.roundLength(B.currentDy/A);B.moveCells(B.cells,F,M);B.reset()}},400))}}}}var g=this,n=this.editor.graph,y=new mxKeyHandler(n),q=y.isEventIgnored;y.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||
mxEvent.isShiftDown(R)?n.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?n.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(R,V,d,f){var l=this.actions.get(d);null!=l&&(d=function(){l.isEnabled()&&l.funct.apply(this,arguments)},V?f?y.bindControlShiftKey(R,d):y.bindControlKey(R,d):f?y.bindShiftKey(R,d):y.bindKey(R,d))});var G=this,L=y.escape;y.escape=function(R){L.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){n.exitGroup()});
!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,"paste"),y.bindAction(71,!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,
!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,!0,"subscript"),y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){n.isEnabled()&&
n.startEditingAtCell()});mxClient.IS_WIN?y.bindAction(89,!0,"redo"):y.bindAction(90,!0,"redo",!0);return y};
arguments[2])}var K=Number(y.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),g);for(var S=e(this)?Object(new this(K)):Array(K),G=0,L;G<K;)L=y[G],S[G]=q?"undefined"===typeof E?q(L,G):q.call(E,L,G):L,G+=1;S.length=K;return S}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
return null!=X?"1"==X.html||"wrap"==X[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var E=null,K=null,S=null,G=null,L=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(X,P){if("mouseDown"==P.getProperty("eventName")&&this.isEnabled()){X=P.getProperty("event");var U=X.getState();P=this.view.scale;if(!mxEvent.isAltDown(X.getEvent())&&null!=U&&(R=this.isCellSelected(U.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(X.getEvent()))){var k=this.selectionCellsHandler.getHandler(U.cell);
this.isEnabled()){X=P.getProperty("event");var U=X.getState();mxEvent.isAltDown(X.getEvent())||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P)||R||null==U||!this.model.isEdge(U.cell)||(E=new mxPoint(X.getGraphX(),X.getGraphY()),L=this.isCellSelected(U.cell),S=U,K=X,null!=U.text&&null!=U.text.boundingBox&&mxUtils.contains(U.text.boundingBox,X.getGraphX(),X.getGraphY())?G=mxEvent.LABEL_HANDLE:(P=this.selectionCellsHandler.getHandler(U.cell),null!=P&&null!=P.bends&&0<P.bends.length&&(G=P.getHandleForEvent(X))))}}));
if(null!=z&&null!=z.bends&&0<z.bends.length){z.redrawHandles();var J=null!=G?G:z.getHandleForEvent(K),W=this.view.getEdgeStyle(U),T=W==mxEdgeStyle.EntityRelation;k=U.absolutePoints;L||(J=G);J!=mxEvent.LABEL_HANDLE&&null!=k&&(J=G,null==J&&(X=new mxRectangle(E.x,E.y),X.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(X,k[0].x,k[0].y)?J=0:mxUtils.contains(X,k[k.length-1].x,k[k.length-1].y)?J=z.bends.length-1:null!=k&&(null==W&&null==J||W==mxEdgeStyle.SegmentConnector||W==mxEdgeStyle.OrthConnector)&&
this.isCellSelected(U.cell)||(this.selectionCellsHandler.handlers.put(U.cell,z),this.selectCellForEvent(U.cell,P.getEvent())):this.isCellSelected(U.cell)||z.destroy());L=!1;E=K=S=G=null}}else if(U=P.getState(),null!=U&&this.isCellEditable(U.cell)){z=null;if(this.model.isEdge(U.cell)&&!this.isCellSelected(U.cell)&&!mxEvent.isAltDown(P.getEvent())&&!mxEvent.isControlDown(P.getEvent())&&!mxEvent.isShiftDown(P.getEvent())){if(X=new mxRectangle(P.getGraphX(),P.getGraphY()),X.grow(mxEdgeHandler.prototype.handleImage.width/
this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(X){return mxEvent.isShiftDown(X.getEvent())&&mxEvent.isAltDown(X.getEvent())?!1:null!=this.currentState&&X.getState()==this.currentState&&2E3<A||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&F.apply(this,arguments)};var M=this.isToggleEvent;this.isToggleEvent=function(X){return M.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(X)};var O=
1;var E=q[0].getAttribute("width"),K=q[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var S=q[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(K)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/E,n=parseFloat(G[3])/K)}var L=q[0].getBBox();0<L.width&&0<L.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",L.x+" "+L.y+" "+L.width+" "+L.height),g.getElementsByTagName("svg")[0].setAttribute("width",
L.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",L.height/n))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(q[0]))}}}catch(R){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=g.view.graph.tolerance,q=!0,E=null,K=mxUtils.bind(this,function(L){q=!0;E=new mxPoint(mxEvent.getClientX(L),mxEvent.getClientY(L))}),S=mxUtils.bind(this,function(L){q=q&&null!=E&&Math.abs(E.x-mxEvent.getClientX(L))<y&&Math.abs(E.y-mxEvent.getClientY(L))<y}),G=mxUtils.bind(this,function(L){if(q)for(var R=mxEvent.getSource(L);null!=
R&&R!=n.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,L);break}R=R.parentNode}});mxEvent.addGestureListeners(n.node,K,S,G);mxEvent.addListener(n.node,"click",function(L){mxEvent.consume(L)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var n=mxEvent.getSource(g);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
E?E:!0;K=null!=K?K:!0;var S=this.model;return S.filterDescendants(function(G){return E&&S.isVertex(G)||K&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(E,K,S){E=this.getCellStyle(E).newEdgeStyle;if(null!=E){this.model.beginUpdate();try{var G=JSON.parse(E),L;for(L in G)this.setCellStyles(L,G[L],K),"edgeStyle"==L&&"elbowEdgeStyle"==G[L]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",K)}finally{this.model.endUpdate()}}};
Graph.prototype.getCommonStyle=function(E){for(var K={},S=0;S<E.length;S++){var G=this.view.getState(E[S]);null!=G&&this.mergeStyle(G.style,K,0==S)}return K};Graph.prototype.mergeStyle=function(E,K,S){if(null!=E){var G={},L;for(L in E){var R=E[L];null!=R&&(G[L]=!0,null==K[L]&&S?K[L]=R:K[L]!=R&&delete K[L])}for(L in K)G[L]||delete K[L]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||
function(E,K,S,G){null!=E&&(G||(S=null!=S?S:Graph.pasteStyles,Graph.removeKeys(E,function(L){return 0>mxUtils.indexOf(S,L)})),this.updateCellStyles(E,K))};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var S=0;S<K.length;S++)if(this.model.isVertex(K[S])||this.model.isEdge(K[S])){var G=this.getCellStyle(K[S],!1),L=G[mxConstants.STYLE_PERIMETER],R=!1;for(d in E){var V=E[d];if(G[d]!=V){if(d==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[d]&&"umlLifeline"!=V){R=!0;var d="participant"}this.setCellStyles(d,
V,[K[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,L,[K[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(E,K,S,G,L,R){this.useCssTransforms&&
(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,S,G,L,R){G=null!=G?G:!0;L=null!=L?L:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var V=this.model.getChildCount(S)-1;0<=V;V--){var d=this.model.getChildAt(S,V),f=this.getScaledCellAt(E,K,d,G,L,R);if(null!=f)return f;if(this.isCellVisible(d)&&(L&&this.model.isEdge(d)||
K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K=new mxDictionary,S=[],G=0;G<E.length;G++){var L=this.getCompositeParent(E[G]);this.isTableCell(L)&&(L=this.graph.model.getParent(L));this.isTableRow(L)&&(L=this.graph.model.getParent(L));null==L||K.get(L)||(K.put(L,!0),S.push(L))}return S};Graph.prototype.getReferenceTerminal=
this.graph.currentTranslate);y.apply(this,arguments);E&&(this.scale=K,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.useCssTransforms,L=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);G&&(this.view.scale=L,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),n=b.segments,y=b.length,q=g.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var S=[g[0]];K=E/K;e||(K=1-K);for(var G=y*K,L=1;L<q;L++)if(G<=n[L-1]){S.push(new mxPoint(g[L-1].x+(g[L].x-g[L-1].x)*G/n[L-1],g[L-1].y+(g[L].y-g[L-1].y)*G/n[L-1]));break}else G-=n[L-1],S.push(g[L]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var K=g?"getUTC":"get",S=b[K+"Date"](),G=b[K+"Day"](),L=b[K+"Month"](),R=b[K+"FullYear"](),V=b[K+"Hours"](),d=b[K+"Minutes"](),f=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var l=g?0:b.getTimezoneOffset(),u={d:S,dd:E(S),ddd:n.i18n.dayNames[G],dddd:n.i18n.dayNames[G+7],m:L+1,mm:E(L+1),mmm:n.i18n.monthNames[L],mmmm:n.i18n.monthNames[L+
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var n=this.getModel(),y=n.getChildCount(n.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function K(){n.isVisible(E)?(L.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(L.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[S]));var L=document.createElement("img");L.setAttribute("draggable","false");L.setAttribute("align","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.width="16px";L.style.padding="0px 6px 0 4px";e&&(L.style.filter="invert(100%)",L.style.top="-2px");G.appendChild(L);mxUtils.write(G,S);g.appendChild(G);
Graph.prototype.connectVertex=function(b,e,g,n,y,q,E,K){q=q?q:!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),L=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(L.x+=G.geometry.width/2,L.y-=g):e==
mxConstants.DIRECTION_SOUTH?(L.x+=G.geometry.width/2,L.y+=G.geometry.height+g):(L.x=e==mxConstants.DIRECTION_WEST?L.x-g:L.x+(G.geometry.width+g),L.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var V=this.view.translate;G=V.x*g;V=V.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,V=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(L.x+=b.parent.geometry.x,L.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(G+L.x*g,V+L.y*g)).grow(40*g);q=null!=q?
!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||y;A&&("1"!=urlParams.sketch||y)&&(e==mxConstants.DIRECTION_NORTH?L.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?L.y+=b.geometry.height/2:L.x=e==mxConstants.DIRECTION_WEST?L.x-b.geometry.width/2:L.x+b.geometry.width/2);var B=[],F=f;f=d;y=mxUtils.bind(this,function(M){if(null==E||null!=M||null==f&&S){this.model.beginUpdate();try{if(null==F&&A){var O=this.getAbsoluteParent(null!=M?M:b);O=S?b:this.getCompositeParent(O);F=null!=M?M:this.duplicateCells([O],
!1)[0];null!=M&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var H=this.getCellGeometry(F);null!=H&&(null!=M&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?L.y-=H.height/2:e==mxConstants.DIRECTION_SOUTH?L.y+=H.height/2:L.x=e==mxConstants.DIRECTION_WEST?L.x-H.width/2:L.x+H.width/2),H.x=L.x-H.width/2,H.y=L.y-H.height/2);null!=d?(this.addCells([F],d,null,null,null,!0),f=null):A&&!S&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var ja=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&A||null==f&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());null!=ja&&(B.push(ja),this.applyNewEdgeStyle(b,[ja],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ja,b));if(null==f&&null!=F&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var da=b.parent.getIndex(b);this.model.add(b.parent,F,da)}null==f&&null!=F&&B.push(F);null==F&&null!=ja&&ja.geometry.setTerminalPoint(L,!1);null!=ja&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[ja]))}finally{this.model.endUpdate()}}if(null!=K)K(B);else return B});if(null==E||null!=F||!A||null==f&&S)return y(F);E(G+L.x*g,V+L.y*g,y)};
Graph.prototype.foldCells=function(b,e,g,n,y){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<g.length;q++){var E=this.view.getState(g[q]),K=this.getCellGeometry(g[q]);if(null!=E&&null!=K){var S=0,G=0;if(K.alternateBounds)S=K.width-K.alternateBounds.width,G=K.height-K.alternateBounds.height;else{var L=this.useCssTransforms?1:this.view.scale;
S=Math.round(K.width-E.width/L);G=Math.round(K.height-E.height/L)}if(0!=G||0!=S){var R=this.model.getParent(g[q]),V=this.layoutManager.getLayout(R);null==V?null!=y&&this.isMoveCellsEvent(y,E)&&this.moveSiblings(E,R,S,G):null!=y&&mxEvent.isAltDown(y)||V.constructor!=mxStackLayout||V.resizeLast||this.resizeParentStacks(R,V,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,S,G){if(null!=g){var L=new mxRectangle(S,G,K.clientWidth,K.clientHeight);mxUtils.intersects(L,g)&&(K==this.arrowUp?G-=L.y+L.height-g.y:K==this.arrowRight?S+=g.x+g.width-L.x:K==this.arrowDown?G+=g.y+g.height-L.y:K==this.arrowLeft&&(S-=L.x+L.width-g.x))}K.style.left=S+"px";K.style.top=G+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
Graph.prototype.visitTableCells=function(b,e){var g=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<n.length;y++){for(var q=this.getActualStartSize(n[y],!0),E=this.model.getChildCells(n[y],!0),K=this.getCellStyle(n[y],!0),S=null,G=[],L=0;L<E.length;L++){var R=this.getCellGeometry(E[L]),V={cell:E[L],rospan:1,colspan:1,row:y,col:L,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;V.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+q.x),R.height+(null!=g&&null!=
g[0]?g[0].point.y:b.y+q.y));V.actual=V;null!=g&&null!=g[L]&&1<g[L].rowspan?(V.rowspan=g[L].rowspan-1,V.colspan=g[L].colspan,V.actual=g[L].actual):null!=S&&1<S.colspan?(V.rowspan=S.rowspan,V.colspan=S.colspan-1,V.actual=S.actual):(S=this.getCurrentCellStyle(E[L],!0),null!=S&&(V.rowspan=parseInt(S.rowspan||1),V.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(V,E.length,
Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var n=this.getModel();n.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=e;n.setGeometry(b,y);var q=n.getParent(b),E=n.getChildCells(q,!0);if(!g){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var S=E[K+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,n.setGeometry(S,G))}}var L=this.getCellGeometry(q);null!=L&&(g||(g=b==E[E.length-1]),g&&(L=L.clone(),L.height+=e,n.setGeometry(q,L)))}}finally{n.endUpdate()}};
Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var n=this.getModel(),y=n.getParent(b),q=n.getParent(y),E=n.getChildCells(y,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;n.beginUpdate();try{for(var S=n.getChildCells(q,!0),G=0;G<S.length;G++){y=S[G];E=n.getChildCells(y,!0);var L=E[b],R=this.getCellGeometry(L);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),n.setGeometry(L,R));b<E.length-1&&(L=E[b+1],R=this.getCellGeometry(L),null!=R&&(R=R.clone(),
R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),n.setGeometry(L,R)))}if(K||g){var V=this.getCellGeometry(q);null!=V&&(V=V.clone(),V.width+=e,n.setGeometry(q,V))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(n,"resizeLastRow","0"),q="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,L=E.getChildCells(b,!0),R=0;R<L.length;R++)E.setVisible(L[R],!0);var V=this.getSize(L,!1);if(0<S&&0<G&&0<
L.length&&0<V){if(y){var d=this.graph.getCellGeometry(L[L.length-1]);null!=d&&(d=d.clone(),d.height=S-V+d.height,E.setGeometry(L[L.length-1],d))}var f=q?null:this.getRowLayout(L[0],G),l=[],u=e.y;for(R=0;R<L.length;R++)d=this.graph.getCellGeometry(L[R]),null!=d&&(d=d.clone(),d.x=e.x,d.width=G,d.y=Math.round(u),u=y||n?u+d.height:u+d.height/V*S,d.height=Math.round(u)-d.y,E.setGeometry(L[R],d)),K=Math.max(K,this.layoutRow(L[R],f,d.height,G,l));n&&S<V&&(g=g.clone(),g.height=u+e.height,E.setGeometry(b,
g));q&&G<K+Graph.minTableColumnWidth&&(g=g.clone(),g.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(A){E.setVisible(A.cell,A.actual.cell==A.cell);if(A.actual.cell!=A.cell){if(A.actual.row==A.row){var B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo;A.actual.geo.width+=B.width}A.actual.col==A.col&&(B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo,A.actual.geo.height+=B.height)}}))}else for(R=0;R<L.length;R++)E.setVisible(L[R],
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(L,R){R=null!=R?R:!0;var V=this.getState(L);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&!V.invalid&&this.updateLineJumps(V)&&this.graph.cellRenderer.redraw(V,!1,this.isRendering());V=e.apply(this,
arguments);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(V);return V};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var L=this.node.getElementsByTagName("path");if(1<L.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&L[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var R=this.state.view.graph.getFlowAnimationStyle();null!=R&&L[1].setAttribute("class",R.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(L,R){return n.apply(this,arguments)||null!=L.routedPoints&&null!=R.routedPoints&&!mxUtils.equalPoints(R.routedPoints,L.routedPoints)};var y=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(L){y.apply(this,arguments);this.graph.model.isEdge(L.cell)&&1!=L.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(L)};mxGraphView.prototype.updateLineJumps=function(L){var R=L.absolutePoints;if(Graph.lineJumpsEnabled){var V=null!=L.routedPoints,d=null;if(null!=R&&null!=this.validEdges&&"none"!==mxUtils.getValue(L.style,"jumpStyle","none")){var f=function(ia,ma,aa){var la=new mxPoint(ma,aa);la.type=ia;d.push(la);la=null!=L.routedPoints?L.routedPoints[d.length-1]:null;return null==la||
la.type!=ia||la.x!=ma||la.y!=aa},l=.5*this.scale;V=!1;d=[];for(var u=0;u<R.length-1;u++){for(var A=R[u+1],B=R[u],F=[],M=R[u+2];u<R.length-2&&mxUtils.ptSegDistSq(B.x,B.y,M.x,M.y,A.x,A.y)<1*this.scale*this.scale;)A=M,u++,M=R[u+2];V=f(0,B.x,B.y)||V;for(var O=0;O<this.validEdges.length;O++){var H=this.validEdges[O],ja=H.absolutePoints;if(null!=ja&&mxUtils.intersects(L,H)&&"1"!=H.style.noJump)for(H=0;H<ja.length-1;H++){var da=ja[H+1],ca=ja[H];for(M=ja[H+2];H<ja.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,
M.x,M.y,da.x,da.y)<1*this.scale*this.scale;)da=M,H++,M=ja[H+2];M=mxUtils.intersection(B.x,B.y,A.x,A.y,ca.x,ca.y,da.x,da.y);if(null!=M&&(Math.abs(M.x-B.x)>l||Math.abs(M.y-B.y)>l)&&(Math.abs(M.x-A.x)>l||Math.abs(M.y-A.y)>l)){da=M.x-B.x;ca=M.y-B.y;M={distSq:da*da+ca*ca,x:M.x,y:M.y};for(da=0;da<F.length;da++)if(F[da].distSq>M.distSq){F.splice(da,0,M);M=null;break}null==M||0!=F.length&&F[F.length-1].x===M.x&&F[F.length-1].y===M.y||F.push(M)}}}for(H=0;H<F.length;H++)V=f(1,F[H].x,F[H].y)||V}M=R[R.length-
1];V=f(0,M.x,M.y)||V}L.routedPoints=d;return V}return!1};var q=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(L,R,V){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)q.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-
2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),u=!0,A=null,B=null,F=[],M=null;L.begin();for(var O=0;O<this.state.routedPoints.length;O++){var H=this.state.routedPoints[O],ja=new mxPoint(H.x/this.scale,H.y/this.scale);0==O?ja=R[0]:O==this.state.routedPoints.length-1&&(ja=R[R.length-1]);var da=!1;if(null!=A&&1==H.type){var ca=this.state.routedPoints[O+1];H=ca.x/this.scale-ja.x;ca=ca.y/this.scale-ja.y;H=H*H+ca*ca;null==M&&(M=new mxPoint(ja.x-A.x,ja.y-A.y),B=Math.sqrt(M.x*M.x+
M.y*M.y),0<B?(M.x=M.x*f/B,M.y=M.y*f/B):M=null);H>f*f&&0<B&&(H=A.x-ja.x,ca=A.y-ja.y,H=H*H+ca*ca,H>f*f&&(da=new mxPoint(ja.x-M.x,ja.y-M.y),H=new mxPoint(ja.x+M.x,ja.y+M.y),F.push(da),this.addPoints(L,F,V,d,!1,null,u),F=0>Math.round(M.x)||0==Math.round(M.x)&&0>=Math.round(M.y)?1:-1,u=!1,"sharp"==l?(L.lineTo(da.x-M.y*F,da.y+M.x*F),L.lineTo(H.x-M.y*F,H.y+M.x*F),L.lineTo(H.x,H.y)):"line"==l?(L.moveTo(da.x+M.y*F,da.y-M.x*F),L.lineTo(da.x-M.y*F,da.y+M.x*F),L.moveTo(H.x-M.y*F,H.y+M.x*F),L.lineTo(H.x+M.y*F,
H.y-M.x*F),L.moveTo(H.x,H.y)):"arc"==l?(F*=1.3,L.curveTo(da.x-M.y*F,da.y+M.x*F,H.x-M.y*F,H.y+M.x*F,H.x,H.y)):(L.moveTo(H.x,H.y),u=!0),F=[H],da=!0))}else M=null;da||(F.push(ja),A=ja)}this.addPoints(L,F,V,d,!1,null,u);L.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(L,R,V,d){return null!=R&&"centerPerimeter"==R.style[mxConstants.STYLE_PERIMETER]?new mxPoint(R.getCenterX(),R.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(L,R,V,d){if(null==R||null==L||"1"!=R.style.snapToPoint&&"1"!=L.style.snapToPoint)K.apply(this,arguments);else{R=this.getTerminalPort(L,R,d);var f=this.getNextPoint(L,V,d),l=this.graph.isOrthogonal(L),u=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),A=new mxPoint(R.getCenterX(),R.getCenterY());if(0!=u){var B=Math.cos(-u),F=Math.sin(-u);f=mxUtils.getRotatedPoint(f,B,F,A)}B=parseFloat(L.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);B+=parseFloat(L.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==u&&l,B);0!=u&&(B=Math.cos(u),F=Math.sin(u),f=mxUtils.getRotatedPoint(f,B,F,A));L.setAbsoluteTerminalPoint(this.snapToAnchorPoint(L,R,V,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(L,R,V,d,f){if(null!=R&&null!=L){L=this.graph.getAllConnectionConstraints(R);d=V=null;if(null!=L)for(var l=0;l<L.length;l++){var u=this.graph.getConnectionPoint(R,
L[l]);if(null!=u){var A=(u.x-f.x)*(u.x-f.x)+(u.y-f.y)*(u.y-f.y);if(null==d||A<d)V=u,d=A}}null!=V&&(f=V)}return f};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(L,R,V){var d=S.apply(this,arguments);"1"==L.getAttribute("placeholders")&&null!=V.state&&(d=V.state.view.graph.replacePlaceholders(V.state.cell,d));return d};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(L){if(null!=L.style&&"undefined"!==typeof pako){var R=
mxUtils.getValue(L.style,mxConstants.STYLE_SHAPE,null);if(null!=R&&"string"===typeof R&&"stencil("==R.substring(0,8))try{var V=R.substring(8,R.length-1),d=mxUtils.parseXml(Graph.decompress(V));return new mxShape(new mxStencil(d.documentElement))}catch(f){null!=window.console&&console.log("Error in shape: "+f)}}return G.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(v){return null!=v&&S.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellMovable(this.model.getParent(v)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(v){var N=this.model.getParent(v);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==N||!this.isTable(N))};var L=Graph.prototype.splitEdge;
Graph.prototype.splitEdge=function(v,N,Q,Y,ea,ka,oa,wa){null==wa&&(wa=this.model.getParent(v),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=L.apply(this,[v,N,Q,Y,ea,ka,oa,wa]);this.model.setValue(Q,"");var sa=this.getChildCells(Q,!0);for(N=0;N<sa.length;N++){var ua=this.getCellGeometry(sa[N]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(sa[N])}var Fa=this.getChildCells(v,!0);for(N=0;N<Fa.length;N++)ua=this.getCellGeometry(Fa[N]),
wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var M=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(v,N){if(null!=this.textarea)if(v=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=v){var Q=v.view.scale;this.bounds=mxRectangle.fromRectangle(v);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=
Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",M.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(v,N){if("0"==mxUtils.getValue(v.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var Q=this.graph.getEditingValue(v.cell,N);"1"==mxUtils.getValue(v.style,"nl2Br",
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function R(){mxShape.call(this)}
function V(){mxShape.call(this)}function d(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function f(){mxActor.call(this)}function l(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");
c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.close(),c.fill()),c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.end(),c.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(L,G);mxCellRenderer.registerShape("note2",L);L.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=
this.scale,0,0,0):null};L.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,m,x,p,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,t)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",M);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,
new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ma.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,m,x,p){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=t?M.prototype.fixedSize:M.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));t&&(C*=m.view.scale);var D=c.x,fa=c.y,I=c.width,va=c.height;m=null!=m?mxUtils.getValue(m.style,
"size",G.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[hb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,
!0,aa.prototype.fixedSize),hexagon:gb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:gb(H.prototype.size,!1),display:gb(Sa.prototype.size,!1),cube:ub(1,n.prototype.size,!1),card:ub(.5,A.prototype.size,!0),loopLimit:ub(.5,v.prototype.size,!0),trapezoid:tb(.5,O.prototype.size,O.prototype.fixedSize),parallelogram:tb(1,M.prototype.size,M.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=Ab;var Db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
.25),!1)];M.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;F.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),
Actions.prototype.init=function(){function b(G){q.escape();G=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),G);null!=G&&q.setSelectionCells(G)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),L=0;L<G.length;L++)q.cellLabelChanged(G[L],"")}finally{q.getModel().endUpdate()}}}function g(G,L,R,V,d){d.getModel().beginUpdate();try{var f=d.getCellGeometry(G);null!=f&&R&&V&&(R/=V,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,d.getModel().setGeometry(G,
f));d.setCellStyles(mxConstants.STYLE_CLIP_PATH,L,[G]);d.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{d.getModel().endUpdate()}}var n=this.editorUi,y=n.editor,q=y.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),
function(){q.popupMenuHandler.hideMenu();var G=q.view.scale,L=q.container.scrollLeft,R=q.container.scrollTop,V=q.view.translate.x,d=q.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(G-q.view.scale)&&5>Math.abs(L-q.container.scrollLeft)&&5>Math.abs(R-q.container.scrollTop)&&V==q.view.translate.x&&d==q.view.translate.y&&n.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){q.isEnabled()&&(q.isSelectionEmpty()?n.actions.get("smartFit").funct():
q.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,L){try{var R=mxUtils.parseXml(G);y.graph.setSelectionCells(y.graph.importGraphModel(R.documentElement))}catch(V){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+V.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null!=G&&q.removeCells(G,!1)}catch(L){}try{null==G&&mxClipboard.cut(q)}catch(L){n.handleError(L)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(G){}try{mxClipboard.copy(q)}catch(G){n.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(L){if(null!=L){q.getModel().beginUpdate();
try{n.pasteXml(L,!0)}finally{q.getModel().endUpdate()}}else mxClipboard.paste(q)}),G=!0)}catch(L){}G||mxClipboard.paste(q)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function L(V){if(null!=V){for(var d=!0,f=0;f<V.length&&d;f++)d=d&&q.model.isEdge(V[f]);var l=q.view.translate;f=q.view.scale;var u=l.x,A=l.y;l=null;if(1==V.length&&d){var B=q.getCellGeometry(V[0]);null!=B&&(l=B.getTerminalPoint(!0))}l=null!=l?l:q.getBoundingBoxFromGeometry(V,d);null!=l&&(d=Math.round(q.snap(q.popupMenuHandler.triggerX/
f-u)),f=Math.round(q.snap(q.popupMenuHandler.triggerY/f-A)),q.cellsMoved(V,d-l.x,f-l.y))}}function R(){q.getModel().beginUpdate();try{L(mxClipboard.paste(q))}finally{q.getModel().endUpdate()}}if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(V){if(null!=V){q.getModel().beginUpdate();try{L(n.pasteXml(V,!0))}finally{q.getModel().endUpdate()}}else R()}),G=!0)}catch(V){}G||R()}});this.addAction("swap",function(){var G=
q.getSelectionCells(),L=q.getModel();if(2==G.length&&L.isVertex(G[0])&&L.isVertex(G[1])&&2==q.getMovableCells(G).length){var R=q.getCellGeometry(G[0]),V=q.getCellGeometry(G[1]);if(null!=R&&null!=V){R=R.clone();V=V.clone();L.beginUpdate();try{L.setGeometry(G[0],V),L.setGeometry(G[1],R)}finally{L.endUpdate()}}}});this.addAction("copySize",function(){var G=q.getSelectionCell();q.isEnabled()&&null!=G&&q.getModel().isVertex(G)&&(G=q.getCellGeometry(G),null!=G&&(n.copiedSize=new mxRectangle(G.x,G.y,G.width,
G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedSize){q.getModel().beginUpdate();try{for(var G=q.getResizableCells(q.getSelectionCells()),L=0;L<G.length;L++)if(q.getModel().isVertex(G[L])){var R=q.getCellGeometry(G[L]);null!=R&&(R=R.clone(),R.width=n.copiedSize.width,R.height=n.copiedSize.height,q.getModel().setGeometry(G[L],R))}}finally{q.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",
function(){var G=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(n.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,L){function R(f,l){var u=V.getValue(f);l=f.cloneValue(l);l.removeAttribute("placeholders");null==u||isNaN(u.nodeType)||l.setAttribute("placeholders",u.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||l.setAttribute("label",q.convertValueToString(f));V.setValue(f,l)}G=null!=
L?L:G;var V=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedValue){V.beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());if(0==d.length)R(V.getRoot(),n.copiedValue);else for(L=0;L<d.length;L++)R(d[L],n.copiedValue)}finally{V.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,L){G=null!=L?L:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",
G.colspan,[G.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=n.getSelectionState();if(0<G.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,G.cells),q.setCellStyles("colspan",null,G.cells)}finally{q.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,L){G=null!=L?L:G;q.turnShapes(q.getResizableCells(q.getSelectionCells()),
!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){q.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),L=q.getCurrentCellStyle(q.getSelectionCell()),R=1==mxUtils.getValue(L,mxConstants.STYLE_EDITABLE,1)?0:1;q.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);q.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);q.setCellStyles(mxConstants.STYLE_ROTATABLE,R,
mxUtils.sortCells(q.getSelectionCells(),!0);1!=G.length||q.isTable(G[0])||q.isTableRow(G[0])?(G=q.getCellsForGroup(G),1<G.length&&q.setSelectionCell(q.groupCells(null,0,G))):q.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(q.isEnabled()){var G=q.getEditableCells(q.getSelectionCells());q.model.beginUpdate();try{var L=q.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)q.model.contains(G[R])&&(0==q.model.getChildCount(G[R])&&q.model.isVertex(G[R])&&
q.setCellStyles("container","0",[G[R]]),L.push(G[R]))}finally{q.model.endUpdate()}0<L.length&&q.setSelectionCells(L)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var G=q.getSelectionCells();if(null!=G){for(var L=[],R=0;R<G.length;R++)q.isTableRow(G[R])||q.isTableCell(G[R])||L.push(G[R]);q.removeCellsFromParent(L)}}});this.addAction("edit",function(){q.isEnabled()&&q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=
q.getSelectionCell()||q.getModel().getRoot();n.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var L="";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(L=R)}L=new TextareaDialog(n,
mxResources.get("editTooltip")+":",L,function(V){q.setTooltipForCell(G,V)});n.showDialog(L.container,320,200,!0,!0);L.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=q.getLinkForCell(q.getSelectionCell());null!=G&&q.openLink(G)});this.addAction("editLink...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var L=q.getLinkForCell(G)||"";n.showLinkDialog(L,mxResources.get("apply"),function(R,V,d){R=mxUtils.trim(R);q.setLinkForCell(G,
n.showLinkDialog("",mxResources.get("insert"),function(G,L,R){G=mxUtils.trim(G);if(0<G.length){var V=null,d=q.getLinkTitle(G);null!=L&&0<L.length&&(V=L[0].iconUrl,d=L[0].name||L[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));L=new mxCell(d,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=V?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+V:"spacing=10;"));L.vertex=!0;V=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([L],
!0));L.geometry.x=V.x;L.geometry.y=V.y;q.setAttributeForCell(L,"linkTarget",R);q.setLinkForCell(L,G);q.cellSizeUpdated(L,!0);q.getModel().beginUpdate();try{L=q.addCell(L),q.fireEvent(new mxEventObject("cellsInserted","cells",[L]))}finally{q.getModel().endUpdate()}q.setSelectionCell(L);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var G=q.getSelectedElement(),
L=q.getParentByName(G,"A",q.cellEditor.textarea),R="";if(null==L&&null!=G&&null!=G.getElementsByTagName)for(var V=G.getElementsByTagName("a"),d=0;d<V.length&&null==L;d++)V[d].textContent==G.textContent&&(L=V[d]);null!=L&&"A"==L.nodeName&&(R=L.getAttribute("href")||"",q.selectNode(L));var f=q.cellEditor.saveSelection();n.showLinkDialog(R,mxResources.get("apply"),mxUtils.bind(this,function(l){q.cellEditor.restoreSelection(f);null!=l&&q.insertLink(l)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():
this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=q.getSelectionCells();if(null!=G){q.getModel().beginUpdate();try{for(var L=0;L<G.length;L++){var R=G[L];q.getModel().isVertex(R)&&(0<q.getModel().getChildCount(R)?q.updateGroupBounds([R],0,!0):q.updateCellSize(R))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();
var G=q.getCommonStyle(q.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var L=q.getEditableCells(q.getSelectionCells()),R=0;R<L.length;R++)if(state=q.getView().getState(L[R]),null!=state){var V=mxUtils.getValue(state.style,"html","0");if("1"==V&&null==G)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",G,[L[R]]);else if("0"==V&&"1"==G){var d=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,
"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(d));q.setCellStyles("html",G,[L[R]])}}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",L))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=q.getView().getState(q.getSelectionCell()),L="wrap";q.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(L=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,L)});this.addAction("rotation",
function(){var G="0",L=q.getView().getState(q.getSelectionCell());null!=L&&(G=L.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(n,G,mxResources.get("apply"),function(R){null!=R&&0<R.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){q.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){q.isFastZoomEnabled()?
mxUtils.bind(this,function(L){L=parseInt(L);!isNaN(L)&&0<L&&q.zoomTo(L/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(L){L=parseInt(L);!isNaN(L)&&0<L&&(L=new ChangePageSetup(n,null,null,null,L/100),L.ignoreColor=!0,L.ignoreImage=!0,q.model.execute(L))}),
"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));K=mxUtils.bind(this,function(G,L,R,V){return this.addAction(G,function(){if(null!=R&&q.cellEditor.isContentEditing())R();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,L,d);(L&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?q.updateLabelElements(d,function(l){l.style.fontWeight=null;"B"==l.nodeName&&q.replaceElement(l)}):(L&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(d,function(l){l.style.fontStyle=null;"I"==l.nodeName&&q.replaceElement(l)}):(L&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(d,function(l){l.style.textDecoration=null;"U"==l.nodeName&&q.replaceElement(l)});for(var f=0;f<d.length;f++)0==q.model.getChildCount(d[f])&&q.autoSizeCell(d[f],
!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),L=0;L<G.length;L++)q.removeTextStyleForCell(G[L],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),L=q.getCurrentCellStyle(G[0]),R="1"==mxUtils.getValue(L,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,R);q.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
L="1";null!=G&&null!=q.getFoldingImage(G)&&(L="0");q.setCellStyles("collapsible",L);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[L],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var G=q.getEditableCells(q.getSelectionCells());if(null!=G&&0<G.length){var L=q.getModel();L=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",L.getStyle(G[0])||"",function(R){null!=R&&q.setCellStyle(mxUtils.trim(R),G)},null,null,
400,220);this.editorUi.showDialog(L.container,420,300,!0,!0);L.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&n.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=q.getSelectionCell();if(null!=G&&q.getModel().isEdge(G)){var L=y.graph.selectionCellsHandler.getHandler(G);
if(L instanceof mxEdgeHandler){var R=q.view.translate,V=q.view.scale,d=R.x;R=R.y;G=q.getModel().getParent(G);for(var f=q.getCellGeometry(G);q.getModel().isVertex(G)&&null!=f;)d+=f.x,R+=f.y,G=q.getModel().getParent(G),f=q.getCellGeometry(G);d=Math.round(q.snap(q.popupMenuHandler.triggerX/V-d));V=Math.round(q.snap(q.popupMenuHandler.triggerY/V-R));L.addPointAt(L.state,d,V)}}});this.addAction("removeWaypoint",function(){var G=n.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,
G.index)});this.addAction("clearWaypoints",function(G,L){G=null!=L?L:G;var R=q.getSelectionCells();if(null!=R){R=q.getEditableCells(q.addAllEdges(R));q.getModel().beginUpdate();try{for(var V=0;V<R.length;V++){var d=R[V];if(q.getModel().isEdge(d)){var f=q.getCellGeometry(d);null!=L&&mxEvent.isShiftDown(G)?(q.setCellStyles(mxConstants.STYLE_EXIT_X,null,[d]),q.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_Y,
mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",L=q.getView().getState(q.getSelectionCell()),R="",V=null;null!=L&&(R=L.style[mxConstants.STYLE_IMAGE]||R,V=L.style[mxConstants.STYLE_CLIP_PATH]||V);var d=
q.cellEditor.saveSelection();n.showImageDialog(G,R,function(f,l,u,A,B,F){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(d),q.insertImage(f,l,u);else{var M=q.getSelectionCells();if(null!=f&&(0<f.length||0<M.length)){var O=null;q.getModel().beginUpdate();try{if(0==M.length){M=[q.insertVertex(q.getDefaultParent(),null,"",0,0,l,u,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(M,!0));
M[0].geometry.x=H.x;M[0].geometry.y=H.y;null!=A&&g(M[0],A,B,F,q);O=M;q.fireEvent(new mxEventObject("cellsInserted","cells",O))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<f.length?f:null,M);var ja=q.getCurrentCellStyle(M[0]);"image"!=ja[mxConstants.STYLE_SHAPE]&&"label"!=ja[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",M):0==f.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,M);null==A&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,M);if(null!=l&&null!=u)for(f=0;f<
M.length;f++){var da=M[f];if("0"!=q.getCurrentCellStyle(da).expand){var ca=q.getModel().getGeometry(da);null!=ca&&(ca=ca.clone(),ca.width=l,ca.height=u,q.getModel().setGeometry(da,ca))}null!=A&&g(da,A,B,F,q)}}finally{q.getModel().endUpdate()}null!=O&&(q.setSelectionCells(O),q.scrollCellToVisible(O[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,V)}}).isEnabled=E;this.addAction("crop...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
null!=G){var L=q.getCurrentCellStyle(G),R=L[mxConstants.STYLE_IMAGE],V=L[mxConstants.STYLE_SHAPE];R&&"image"==V&&(L=new CropImageDialog(n,R,L[mxConstants.STYLE_CLIP_PATH],function(d,f,l){g(G,d,f,l,q)}),n.showDialog(L.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
null!=G){var L=new ConnectionPointsDialog(n,G);n.showDialog(L.container,350,450,!0,!1,function(){L.destroy()});L.init()}},null,null,"Alt+Shift+Q").isEnabled=E};Actions.prototype.addAction=function(b,e,g,n,y){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var q=mxResources.get(b)+"..."}else q=mxResources.get(b);return this.put(b,new Action(q,e,g,n,y))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
K[0]),L=this.ui.getHashValueForPages(G,n),R=this.ui.getHashValueForPages(q,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",E,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",L,"current",R,"valid",L==R,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=L&&L!=R){var V=this.compressReportData(this.getAnonymizedXmlForPages(q)),d=this.compressReportData(this.getAnonymizedXmlForPages(G)),f=this.ui.hashValue(b.getCurrentEtag()),
l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(g,K,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+L+"\nCurrent: "+R+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+f+"\nTo: "+l+"\n\nFile Data:\n"+V+"\nPatched Shadow:\n"+d,null,"mergeFile",L,R,b.getCurrentRevisionId())}else{if(null!=this.sync){var u=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null,null,y);null==u||mxUtils.isEmptyObject(u)||K.push(u)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:
null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(F);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var A=this.getCurrentUser(),B=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,F)}}catch(M){}}}else throw Error(mxResources.get("notADiagramFile"));
25E3);this.sendErrorReport("Checksum Error in "+y+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+u+(null!=l?"\n\nRemote:\n"+l:""),null,7E4)});null==n?G(null):this.getLatestVersion(mxUtils.bind(this,function(l){null!=l&&l.getCurrentEtag()==n?G(l):G(null)}),function(){})}else{var L=this.getCurrentUser(),R=null!=L?L.id:"unknown",V=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(e).length,f=null;if(null!=e&&this.constructor==DriveFile&&400>d){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
DrawioFile.prototype.sendErrorReport=function(b,e,g,n){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),L=G.lastIndexOf(".");E="xml";0<L&&(E=G.substring(L));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
DrawioFile.prototype.patch=function(b,e,g,n){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),E=y.indexOfNextAdd,K=this.ui.editor.graph;K.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=K.foldingEnabled,L=K.mathEnabled,R=K.cellRenderer.redraw;K.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());R.apply(this,arguments)};K.model.beginUpdate();
this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{K.container.style.visibility="";K.model.endUpdate();K.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(y.history=q,y.indexOfNextAdd=E,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=K.mathEnabled?(this.ui.editor.updateGraphComponents(),K.refresh()):(G!=K.foldingEnabled?K.view.revalidate():
this.inConflictState=!0;this.descriptorChanged();null!=n&&n(G);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,G);else{var K=this.getCurrentUser(),S=null!=K?K.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=n&&n(G)}};
LocalFile.prototype.saveFile=function(b,e,g,n,y){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var q=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),S=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var L=mxUtils.bind(this,
function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){try{var l=this.desc;this.savingFile=!1;this.desc=f;this.fileSaved(E,l,K,L);this.removeDraft()}catch(u){L(u)}}),L)}),L)}),L):(this.inConflictState=!0,L())}),mxUtils.bind(this,function(d){this.invalidFileHandle=!0;L(d)}))}),L)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,q?"image/png":"text/xml",q);else if(G.length<MAX_REQUEST_SIZE){var R=b.lastIndexOf(".");R=0<R?b.substring(R+1):"xml";
mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,z){var J=null;null!=k.editor.graph.getModel().getParent(z)?J=z.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 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 R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var z=this.editorUi,J=z.editor.graph;if(J.isEnabled()){var W=z.getCurrentFile();null!=W&&W.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
k&&null!=k.src){var J=Graph.getSvgFromDataUri(k.src);if(null!=J)try{var W=(new DOMParser).parseFromString(J,"text/xml"),T=W.getElementsByTagName("style");for(J=0;J<T.length;J++)if(T[J].innerHTML==Graph.svgDarkModeCss){T[J].parentNode.removeChild(T[J]);break}if("dark"==z||"auto"==z){var Z=Graph.createSvgDarkModeStyle(W,z);W.getElementsByTagName("defs")[0].appendChild(Z)}k=new mxImage(Editor.createSvgDataUri(mxUtils.getXml(W.documentElement)),k.width,k.height,k.x,k.y)}catch(ba){}}return k};var M=Graph.prototype.getSvg;
this.refresh());var Pa=null;Editor.enableCssDarkMode&&null!=this.backgroundImage&&(Pa=this.backgroundImage,this.backgroundImage=this.adaptBackgroundPage(Pa,xa));var ta=M.apply(this,arguments);if(Editor.enableCssDarkMode&&("dark"==xa||"auto"==xa)){var Da=Graph.createSvgDarkModeStyle(ta.ownerDocument,xa);ta.getElementsByTagName("defs")[0].appendChild(Da)}var Aa=this.getCustomFonts();if(pa&&0<Aa.length){var ya=ta.ownerDocument;Da=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,n){n.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.6.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
"")+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=A.stack?"&stack="+encodeURIComponent(A.stack):""))}catch(M){}try{F||null==window.console||console.error(B,d,f,l,u,A)}catch(M){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?
!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,f,l){var u=null==d||null==f;l=null!=l?l:24;var A=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=A.spin;A.spin=function(M,O){var H=
!1;this.active||(B.call(this,M),this.active=!0,null!=O&&(u&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,
d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),H.innerHTML=O,M.appendChild(H),A.status=H),this.pause=mxUtils.bind(this,function(){var ja=function(){};this.active&&(ja=mxUtils.bind(this,function(){this.spin(M,O)}));
[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=l)for(A=0;A<l.length;A++)f.model.execute(new ChangePage(this,l[A],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,l,u,A,B,F,M,O,H,ja){f=null!=f?f:this.editor.graph;A=null!=A?A:!1;O=null!=O?O:!0;ja=
f,u,null,M,O,da,null,null,l.scale,l.border);return ja};EditorUi.prototype.getXmlFileData=function(d,f,l,u){d=null!=d?d:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var A=this.editor.getGraphXml(d,u);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(O){var H=O.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&l?(H=mxUtils.trim(mxUtils.getTextContent(O)),O=O.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&O.appendChild(mxUtils.parseXml(H).documentElement))):
null==H||l?O=O.cloneNode(!0):(O=O.cloneNode(!1),mxUtils.setTextContent(O,Graph.compressNode(H)));A.appendChild(O)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(A)),A=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],F=B.node;if(B!=this.currentPage)if(B.needsUpdate){var M=new mxCodec(mxUtils.createXmlDocument());M=M.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
M,null,u);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(M));delete B.needsUpdate}else u&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
null!=B.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,M,null,u),F=F.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(M))));d(F)}return A};EditorUi.prototype.anonymizeString=function(d,f){for(var l=[],u=0;u<d.length;u++){var A=d.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(A)?l.push(A):isNaN(parseInt(A))?A.toLowerCase()!=A?l.push(String.fromCharCode(65+Math.round(25*
d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var u in d[EditorUi.DIFF_UPDATE]){var A=d[EditorUi.DIFF_UPDATE][u];null!=A.name&&(A.name=this.anonymizeString(A.name));null!=A.cells&&(f=mxUtils.bind(this,function(B){var F=A.cells[B];if(null!=F){for(var M in F)null!=F[M].value&&(F[M].value="["+F[M].value.length+"]"),null!=F[M].xmlValue&&(F[M].xmlValue="["+F[M].xmlValue.length+"]"),null!=F[M].style&&(F[M].style=
"["+F[M].style.length+"]"),mxUtils.isEmptyObject(F[M])&&delete F[M];mxUtils.isEmptyObject(F)&&delete A.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(A.cells)&&delete A.cells);mxUtils.isEmptyObject(A)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&
M,O,H,ja){A=null!=A?A:!0;B=null!=B?B:!1;H=null!=H?H:!Editor.defaultCompressed;var da=this.editor.graph;if(f||!d&&null!=O&&/(\.svg)$/i.test(O.getTitle())){var ca=null!=da.themes&&"darkTheme"==da.defaultThemeName;if(ca||null!=this.pages&&this.currentPage!=this.pages[0]){var ia=da.getGlobalVariable;da=this.createTemporaryGraph(ca?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var ma=null!=this.pages?
d,f,l,u,A,M,H);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,l,u,A,B){B=null!=B?B:!0;var F=null,M=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var O=f.view.scale;B=Math.floor(F.x/O-f.view.translate.x);O=Math.floor(F.y/O-f.view.translate.y);F=f.background;null==A&&(f=this.getBasenames().join(";"),0<f.length&&(M=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",
(null==A?'<script type="text/javascript" src="'+M+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+A+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,l,u,A){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=A&&(A=A.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
M=F.getChildren(F.root);for(A=0;A<M.length;A++){var O=M[A];F.setVisible(O,f[O.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,l,u,A,B,F,M,O,H,ja,da){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename("remoteSvg"==d?!1:!A),ia=ca+("xml"==d||"pdf"==d&&ja?".drawio":"")+"."+d;if("xml"==d){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,A,null,null,null,f);this.saveData(ia,d,ma,"text/xml")}else if("html"==d)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,
ca),this.saveData(ia,d,ma,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)ia=ca+".png";else if("jpeg"==d)ia=ca+".jpg";else if("remoteSvg"==d){ia=ca+".svg";d="svg";var aa=parseInt(O);"string"===typeof M&&0<M.indexOf("%")&&(M=parseInt(M)/100);if(0<aa){var la=this.editor.graph,X=la.getGraphBounds();var P=Math.ceil(X.width*M/la.view.scale+2*aa);var U=Math.ceil(X.height*M/la.view.scale+2*aa)}}this.saveRequest(ia,d,mxUtils.bind(this,
function(T,Z){try{var ba=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ha=this.createDownloadRequest(T,d,u,Z,F,A,M,O,H,ja,da,P,U);this.editor.graph.pageVisible=ba;return ha}catch(qa){this.handleError(qa)}}))}else{var k=null,z=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ia,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==
function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){d=this.downloadRequestBuilder(d,f,l,u,A,B,F,M,O,H,ja,da,ca);f="";for(var ia in d)l=d[ia],null!=l&&(f+=ia+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){var ia=this.editor.graph,ma=ia.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==B?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var aa=null,la=null,X=null;if(ma.width*ma.height>
steps:ia.view.gridSteps,color:ia.view.gridColor});Graph.translateDiagram&&(A.diagramLanguage=Graph.diagramLanguage);return{format:f,from:aa,to:la,allPages:X,bg:null!=B?B:mxConstants.NONE,base64:u,embedXml:H,xml:l,filename:null!=d?d:"",extras:JSON.stringify(A),scale:F,border:M,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null}};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=
this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){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==d||mxUtils.isEmptyObject(d)||(f=f+"#"+encodeURIComponent(JSON.stringify(d)))}catch(u){}window.location.hash=f}};EditorUi.prototype.loadDescriptor=function(d,f,l){var u=window.location.hash,A=mxUtils.bind(this,function(F){var M=null!=d.data?d.data:"";null!=F&&0<F.length&&
(0<M.length&&(M+="\n"),M+=F);F=new LocalFile(this,"csv"!=d.format&&0<M.length?M:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return u};this.fileLoaded(F);"csv"==d.format&&this.importCsv(M,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var O=null!=d.interval?parseInt(d.interval):6E4,H=null,ja=mxUtils.bind(this,function(){var ca=
d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var A=this.editor.graph,B=A.getModel();B.beginUpdate();var F=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var M=B.getCell(d.getAttribute("id"));if(null!=M){try{var O=d.getAttribute("value");if(null!=O){var H=mxUtils.parseXml(O).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))B.setValue(M,H);else for(var ja=H.attributes,da=0;da<ja.length;da++)A.setAttributeForCell(M,ja[da].nodeName,0<ja[da].nodeValue.length?
ja[da].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+M.id+": "+U)}try{var ca=d.getAttribute("style");null!=ca&&A.model.setStyle(M,ca)}catch(U){null!=window.console&&console.log("Error in style for "+M.id+": "+U)}try{var ia=d.getAttribute("icon");if(null!=ia){var ma=0<ia.length?JSON.parse(ia):null;null!=ma&&ma.append||A.removeCellOverlays(M);null!=ma&&A.addCellOverlay(M,f(ma))}}catch(U){null!=window.console&&console.log("Error in icon for "+M.id+": "+U)}try{var aa=
d.getAttribute("geometry");if(null!=aa){aa=JSON.parse(aa);var la=A.getCellGeometry(M);if(null!=la){la=la.clone();for(key in aa){var X=parseFloat(aa[key]);"dx"==key?la.x+=X:"dy"==key?la.y+=X:"dw"==key?la.width+=X:"dh"==key?la.height+=X:la[key]=parseFloat(aa[key])}A.model.setGeometry(M,la)}}}catch(U){null!=window.console&&console.log("Error in icon for "+M.id+": "+U)}}}else if("model"==d.nodeName){for(var P=d.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(new mxCodec(d.firstChild)).decode(P,
f){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var u=l.lastIndexOf(".");0<=u&&(d=l.substring(u),l=l.substring(0,u));if(f){f=l;var A=new Date;l=A.getFullYear();u=A.getMonth()+1;var B=A.getDate(),F=A.getHours(),M=A.getMinutes();A=A.getSeconds();l=f+(" "+(l+"-"+u+"-"+B+"-"+F+"-"+M+"-"+A))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.fileLoaded=function(d,f,l){var u=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);
d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+F})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!=
d)try{d.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+M.message,label:"stack_"+M.stack})}catch(O){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=u?this.fileLoaded(u)||B():B()});f?d():this.handleError(M,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else B();
return A};EditorUi.prototype.getHashValueForPages=function(d,f){var l=0,u=new mxGraphModel,A=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var F=d[B].node.cloneNode(!1);F.removeAttribute("name");u.root=d[B].root;var M=A.encode(u);this.editor.graph.saveViewState(d[B].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");F.appendChild(M);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,
d;B=this.sidebar.palettes[d.getHash()];B=null!=B?B[B.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var F=null,M=mxUtils.bind(this,function(P,U){0==P.length&&d.isEditable()?(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),U.appendChild(F)):this.addLibraryEntries(P,U)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
var O=this.sidebar.addPalette(d.getHash(),l,null!=u?u:!0,mxUtils.bind(this,function(P){M(f,P)}));null!=A&&(A.div=O);this.repositionLibrary(B);var H=O.parentNode.previousSibling;u=H.getAttribute("title");null!=u&&0<u.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+u);var ja=document.createElement("div");ja.style.position="absolute";ja.style.right="0px";ja.style.top="0px";ja.style.padding="8px";ja.style.backgroundColor="inherit";H.style.position="relative";
JSON.parse(mxUtils.getTextContent(pa.documentElement));M(Ca,O);f=f.concat(Ca);aa(P);this.spinner.stop();qa=!0}catch(Qa){}else if("mxfile"==pa.documentElement.nodeName)try{var Ba=pa.documentElement.getElementsByTagName("diagram");for(Ca=0;Ca<Ba.length;Ca++){var za=this.stringToCells(Editor.getDiagramNodeXml(Ba[Ca])),Ma=this.editor.graph.getBoundingBoxFromGeometry(za);la(za,new mxRectangle(0,0,Ma.width,Ma.height),P)}qa=!0}catch(Qa){null!=window.console&&console.log("error in drop handler:",Qa)}qa||
".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,l,u,A,B,F){d=new ImageDialog(this,d,f,l,u,A,B,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,f,l,u,A,B){var F=localStorage.getItem(f);d=new TextareaDialog(this,d,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(M){if(null!=M)try{if(null!=B&&
B(M),M==F)this.hideDialog();else{if(0<M.length){var O=JSON.parse(M);localStorage.setItem(f,JSON.stringify(O))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(H){this.handleError(H)}}),null,mxResources.get("close"),null,null,null,!0,null,null,A,l,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f,l,u){d=null!=d?d:mxUtils.bind(this,function(A,B,F,M){B||(A=new ChangePageSetup(this,
u?F:null,A),A.ignoreColor=!u,null!=M&&u&&(A.shadowVisible=M),this.editor.graph.model.execute(A))});d=new BackgroundImageDialog(this,d,f,l,u);this.showDialog(d.container,400,u?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,l,u,A){d=new LibraryDialog(this,d,f,l,u,A);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
function(d){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(d,f,l,u,A,B,F){var M=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+
(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(ia){}if(null!=O||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var H=mxResources.get("ok"),ja=null;f=null!=f?f:mxResources.get("error");if(null!=O){null!=O.retry&&(H=mxResources.get("cancel"),ja=function(){M();O.retry()});if(404==O.code||404==O.status||403==O.code){F=403==O.code?null!=O.message?mxUtils.htmlEntities(O.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
l&&l()};EditorUi.prototype.alert=function(d,f,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,l,u,A,B){d=null!=d?d:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=l&&l()},u,A,null,null,null,null,M);this.showDialog(d.container,
340,46+M,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,l,u,A,B,F,M,O){var H=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";M=null!=M?M:"translate(-50%,0%)";var ja=A?500:1E3;H=A?"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");
aa()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,function(){aa()}),ja)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(X){var P=mxEvent.getSource(X);P!=ia&&P!=ma?(null!=l&&l(),aa(),mxEvent.consume(X)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",M)}),ja/2);window.setTimeout(la,A?4E3:3E4);H=!0}return H};EditorUi.prototype.setCurrentFile=function(d){null!=
typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var M=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(M?parseInt(M[2],10):!1)?!1:B}if(B||this.isOffline()){F.href=URL.createObjectURL(u?this.base64ToBlob(d,l):new Blob([d],{type:l}));B?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(O){}}else this.createEchoRequest(d,f,l,u,A).simulate(document,
"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,l,u,A,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=l?"&mime="+l:"")+(null!=A?"&format="+A:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(u?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var l=d.length,u=Math.ceil(l/1024),A=Array(u),B=0;B<u;++B){for(var F=1024*B,M=Math.min(F+1024,l),O=Array(M-F),H=0;F<M;++H,++F)O[H]=d[F].charCodeAt(0);A[B]=
new Uint8Array(O)}return new Blob(A,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,l,u,A,B,F,M){B=null!=B?B:!1;F=null!=F?F:"vsdx"!=A&&(!mxClient.IS_IOS||!navigator.standalone);var O=mxUtils.bind(this,function(ja,da,ca,ia){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,u);else if(null!=l&&"text/html"==l.substring(0,9)){var ma=new EmbedDialog(this,d);this.showDialog(ma.container,450,240,!0,!0);ma.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,
!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(d,ja,l,u,null,M);else if(null!=ja&&0<ja.length){var la=mxUtils.bind(this,function(X){try{this.exportFile(d,ja,l,u,da,X)}catch(P){this.handleError(P)}});null!=ia?la(ia):this.pickFolder(da,la)}}catch(X){this.handleError(X)}});if("1"==urlParams["save-dialog"])A=[],B||A.push(App.MODE_BROWSER),F||A.push("_blank"),f=new SaveDialog(this,f,mxUtils.bind(this,
mxEvent.addListener(this.editor.graph.container,"click",A);this.editor.exportToCanvas(mxUtils.bind(this,function(M){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var O=this.createImageDataUri(M,null,"png");M=document.createElement("img");M.style.maxWidth="140px";M.style.maxHeight="140px";M.style.cursor="pointer";M.style.backgroundColor="white";M.setAttribute("title",mxResources.get("openInNewWindow"));M.setAttribute("border",
"0");M.setAttribute("src",O);this.exportDialog.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.openInNewWindow(O.substring(O.indexOf(",")+1),"image/png",!0);A.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(M){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(M)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(u)}),
Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,l,u,A){this.isLocalFileSave()?this.saveLocalFile(l,d,u,A,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,F){return this.createEchoRequest(l,B,u,A,f,F)}),l,A,u)};EditorUi.prototype.saveRequest=function(d,f,l,u,A,B,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var M=mxUtils.bind(this,function(ja,da,ca,ia){if("_blank"==da||null!=ja&&0<ja.length){var ma=l("_blank"==da?null:ja,da==App.MODE_DEVICE||"download"==
aa)}catch(la){this.handleError(la)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}))}),null!=ia?ca(ia):this.pickFolder(da,ca)))}});if("1"==urlParams["save-dialog"]){var O=[App.MODE_BROWSER];F||O.push("_blank");d=new SaveDialog(this,d,mxUtils.bind(this,function(ja,da,ca){M(ja.value,da,ja,ca);this.hideDialog()}),O,null,"application/pdf");this.showDialog(d.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}))}else{O=
this.getServiceCount(!1);isLocalStorage&&O++;var H=4>=O?2:6<O?4:3;d=new CreateDialog(this,d,M,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<O,H,u,B,A);F=this.isServices(O)?4<O?390:280:160;this.showDialog(d.container,420,F,!0,!0)}d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,l,u,A,B){};EditorUi.prototype.getServiceForName=
function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,f,l){f(null)};EditorUi.prototype.exportSvg=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia){if(this.spinner.spin(document.body,mxResources.get("export")))try{var ma=this.editor.graph.isSelectionEmpty();l=null!=l?l:ma;var aa=f?null:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);null==aa&&0==f&&(aa="dark"!=ja||Editor.enableSvgDarkMode?"#ffffff":Editor.darkColor);
var la=this.editor.graph.getSvg(aa,d,F,M,null,l,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!ca,ja,da);u&&this.editor.graph.addSvgShadow(la);var X=this.getBaseFilename()+(A?".drawio":"")+".svg";ia=null!=ia?ia:mxUtils.bind(this,function(k){this.isLocalFileSave()||k.length<=MAX_REQUEST_SIZE?this.saveData(X,"svg",k,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});var P=mxUtils.bind(this,
EditorUi.prototype.addRadiobox=function(d,f,l,u,A,B,F){return this.addCheckbox(d,l,u,A,B,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,l,u,A,B,F,M){B=null!=B?B:!0;var O=document.createElement("input");O.style.marginRight="8px";O.style.marginTop="16px";O.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();O.id=F;null!=M&&O.setAttribute("name",M);l&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);u&&O.setAttribute("disabled","disabled");B&&(d.appendChild(O),l=document.createElement("label"),
"geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));B.appendChild(u);u=document.createElement("option");u.setAttribute("value","custom");mxUtils.write(u,mxResources.get("custom")+"...");B.appendChild(u);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var F=new FilenameDialog(this,A,mxResources.get("ok"),function(M){null!=M?A=M:B.value="blank"},mxResources.get("url"),null,null,null,
null,function(){B.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===B.value?"_blank":A:null},getEditInput:function(){return l},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=function(d,f){function l(){var M=document.createElement("div");
M.style.width="100%";M.style.height="100%";M.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(M.style.border="1px solid black",M.style.backgroundColor=B):(M.style.backgroundPosition="center center",M.style.backgroundRepeat="no-repeat",M.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(M)}mxUtils.write(d,mxResources.get("links")+":");var u=document.createElement("select");u.style.width="100px";u.style.padding="0px";u.style.marginLeft="8px";u.style.marginRight=
mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),u.appendChild(f));d.appendChild(u);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(M){this.pickColor(B||"none",function(O){B=O;l()});mxEvent.consume(M)}));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||
F.push("edit="+encodeURIComponent(A)),B&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));l&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,l,u,A,B,F,M,O,H){O=this.createUrlParameters(d,f,l,u,A,B,O);d=this.getCurrentFile();f=!0;null!=F?l="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),M||null==d||d.constructor!=window.DriveFile?l="#R"+encodeURIComponent(l?
"/"+(0<O.length?"?"+O.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,f,l,u,A,B,F,M,O,H,ja,da){this.getBasenames();var ca={};""!=A&&A!=mxConstants.NONE&&(ca.highlight=A);"auto"!==u&&(ca.target=u);H||(ca.lightbox=!1);ca.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ca.zoom=l/100);l=[];F&&(l.push("pages"),ca.resize=!0,null!=this.pages&&null!=this.currentPage&&(ca.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ca.resize=!0);M&&l.push("layers");
var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var M=document.createElement("input");M.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";M.setAttribute("value","url");M.setAttribute("type","radio");M.setAttribute("name","type-embedhtmldialog");B=M.cloneNode(!0);B.setAttribute("value","copy");F.appendChild(B);var O=document.createElement("span");mxUtils.write(O,mxResources.get("includeCopyOfMyDiagram"));
F.appendChild(O);mxUtils.br(F);F.appendChild(M);O=document.createElement("span");mxUtils.write(O,mxResources.get("publicDiagramUrl"));F.appendChild(O);var H=this.getCurrentFile();null==l&&null!=H&&H.constructor==window.DriveFile&&(O=document.createElement("a"),O.style.paddingLeft="12px",O.style.color="gray",O.style.cursor="pointer",mxUtils.write(O,mxResources.get("share")),F.appendChild(O),mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));
B.setAttribute("checked","checked");null==l&&M.setAttribute("disabled","disabled");A.appendChild(F);var ja=this.addLinkSection(A),da=this.addCheckbox(A,mxResources.get("zoom"),!0,null,!0);mxUtils.write(A,":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value="100%";A.appendChild(ca);var ia=this.addCheckbox(A,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;
P.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,A,mxUtils.bind(this,function(){u(M.checked?l:null,da.checked,ca.value,ja.getTarget(),ja.getColor(),ia.checked,ma.checked,aa.checked,la.checked,X.checked,null!=P?P.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,l,u,A,B,F,M){var O=document.createElement("div");O.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,
U.checked,null!=ca?ca.value:null,null!=ia?ia.value:null,k.checked)}),null,mxResources.get("create"),F,M);this.showDialog(f.container,340,300+d,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,l,u,A){var B=document.createElement("div");B.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:"+(A?"10":"4")+"px";B.appendChild(F);if(A){mxUtils.write(B,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";B.appendChild(M);mxUtils.write(B,mxResources.get("borderWidth")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight=
d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ia=parseInt(O.value)||0;l(!H.checked,null!=ja?ja.checked:!1,null!=da?da.checked:!1,ca,ia)}),null,d,f);this.showDialog(d.container,300,(A?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,l,u,A,B,F,M,O){F=null!=F?F:Editor.defaultIncludeDiagram;var H=document.createElement("div");H.style.whiteSpace="nowrap";var ja=this.editor.graph,da="jpeg"==M?220:300,ca=document.createElement("h3");mxUtils.write(ca,
M),z=null;if(Editor.isDarkMode()||Editor.enableCssDarkMode)z=document.createElement("select"),z.style.maxWidth="260px",z.style.marginLeft="8px",z.style.marginTop="16px",B=document.createElement("option"),B.setAttribute("value","light"),mxUtils.write(B,mxResources.get("light")),z.appendChild(B),O=document.createElement("option"),O.setAttribute("value","dark"),mxUtils.write(O,mxResources.get("dark")),z.appendChild(O),Editor.enableCssDarkMode&&"svg"==M&&(d=document.createElement("option"),d.setAttribute("value",
"auto"),mxUtils.write(d,mxResources.get("automatic")),z.appendChild(d)),mxUtils.write(H,mxResources.get("appearance")+":"),H.appendChild(z),mxUtils.br(H),Editor.isDarkMode()||Editor.cssDarkMode?O.setAttribute("selected","selected"):B.setAttribute("selected","selected"),da+=26;var J=this.addCheckbox(H,mxResources.get("shadow"),ja.shadowVisible),W=null;if("png"==M||"jpeg"==M)W=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(H,
mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=M);T.style.marginBottom="16px";var Z=document.createElement("input");Z.style.marginBottom="16px";Z.style.marginRight="8px";Z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Z.setAttribute("disabled","disabled");var ba=document.createElement("select");ba.style.maxWidth="200px";ba.style.marginLeft="8px";ba.style.marginBottom="16px";F=document.createElement("option");F.setAttribute("value","none");mxUtils.write(F,
ha.appendChild(f);var qa=document.createElement("div");mxUtils.write(qa,mxResources.get("LinksLost"));qa.style.margin="7px";qa.style.display="none";"svg"==M&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(ha),H.appendChild(qa),mxUtils.br(H),mxUtils.br(H),da+=50);l=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=ma.value;this.lastExportZoom=ia.value;A(ia.value,k.checked,!aa.checked,J.checked,T.checked,Z.checked,ma.value,la.checked,!1,ha.value,null!=W?W.checked:
null,null!=z?z.value:null,X.value,"embedFonts"==ba.value,"lblToSvg"==ba.value)}),null,l,u);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,l,u,A){var B=document.createElement("div");B.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var M=document.createElement("h3");mxUtils.write(M,f);M.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(M)}var O=this.addCheckbox(B,mxResources.get("fit"),!0),H=this.addCheckbox(B,mxResources.get("shadow"),F.shadowVisible&&u,!u),ja=this.addCheckbox(B,l),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ca=this.addEditButton(B,da),ia=ca.getEditInput(),ma=1<F.model.getChildCount(F.model.getRoot()),aa=this.addCheckbox(B,mxResources.get("layers"),ma,!ma);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="12px";
A);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,l,u,A,B,F,M){function O(ia){var ma=" ",aa="";u&&(ma=" 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"+
ma,"png");O(ia)}),null,null,null,mxUtils.bind(this,function(ia){M({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=
ca.getStatus()?O("data:image/png;base64,"+ca.getText()):M({message:mxResources.get("unknownError")})}))}else M({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,l,u,A,B,F){var M=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l),O=M.getElementsByTagName("a");if(null!=O)for(var H=0;H<O.length;H++){var ja=O[H].getAttribute("href");null!=ja&&"#"==ja.charAt(0)&&"_blank"==O[H].getAttribute("target")&&O[H].removeAttribute("target")}u&&
M.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(M);if(l){var da=" ",ca="";u&&(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"+(A?"&edit=_blank":"")+(B?"&layers=1":
"")+"');}})(this);\"",ca+="cursor:pointer;");d&&(ca+="max-width:100%;");this.editor.convertImages(M,mxUtils.bind(this,function(ia){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ia))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",u&&(f=this.getSelectedPageIndex(),M.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:"")+(A?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),d&&(d=parseInt(M.getAttribute("width")),A=parseInt(M.getAttribute("height")),M.setAttribute("viewBox","-0.5 -0.5 "+d+" "+A),ca+="max-width:100%;max-height:"+A+"px;",M.removeAttribute("height")),""!=ca&&M.setAttribute("style",ca),this.editor.addFontCss(M),this.editor.graph.mathEnabled&&this.editor.addMathCss(M),F(mxUtils.getXml(M))};EditorUi.prototype.timeSince=
EditorUi.prototype.getPngFileProperties=function(d){var f=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var u=parseFloat(d.getAttribute("scale"));!isNaN(u)&&0<u&&(f=u)}d.hasAttribute("border")&&(u=parseInt(d.getAttribute("border")),!isNaN(u)&&0<u&&(l=u))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,f,l,u,A){try{var B=this.editor.graph,F=null!=B.themes&&"darkTheme"==B.defaultThemeName,M=null;if(null!=l&&0<l.length)B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet()),
document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0),B),M=l;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet());var O=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&B.setBackgroundImage(H.viewState.backgroundImage);
B.getGlobalVariable=function(ja){return"page"==ja?H.getName():"pagenumber"==ja?1:O.apply(this,arguments)};document.body.appendChild(B.container);B.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ja){try{null==M&&(M=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ja.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(M));d(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ca){null!=
f&&f(ca)}}),null,null,null,mxUtils.bind(this,function(ja){null!=f&&f(ja)}),null,null,u,null,B.shadowVisible,null,B,A,null,null,null,"diagram",null)}catch(ja){null!=f&&f(ja)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){M=null!=M?M:!0;ja=null!=ja?ja:0;F=null!=O?O:f.background;F==mxConstants.NONE&&(F=null);B=f.getSvg(F,H,ja,null,null,B,null,null,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ja);null!=d&&B.setAttribute("content",
d);null!=l&&B.setAttribute("resource",l);var ia=mxUtils.bind(this,function(ma){ma=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=A&&A(ma);return ma});f.mathEnabled&&this.editor.addMathCss(B);if(null!=A)this.embedFonts(B,mxUtils.bind(this,function(ma){M?this.editor.convertImages(ma,mxUtils.bind(this,function(aa){ia(aa)})):ia(ma)}));else return ia(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),f(d)}catch(u){f(d)}}))}catch(l){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){O=null!=O?O:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ia=this.editor.graph.isSelectionEmpty();l=null!=l?l:ia;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
function(ma){this.spinner.stop();try{this.saveCanvas(ma,A?this.getFileData(!0,null,null,null,l,M):null,O,null==this.pages||0==this.pages.length,ja)}catch(aa){this.handleError(aa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ma){this.spinner.stop();this.handleError(ma)}),null,l,d||1,f,u,null,null,B,F,H,da,ca)}catch(ma){this.spinner.stop(),this.handleError(ma)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=
function(d,f,l,u,A,B,F){f=null!=f?f:0;l=null!=l?l:0;var M=[];try{var O=this.editor.graph;if(null!=d&&0<d.length){O.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var ja=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=ja&&"mxfile"==ja.nodeName&&null!=this.pages){var da=ja.getElementsByTagName("diagram");if(1==da.length&&!B){if(ja=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=
null==aa.getName()&&aa.setName(mxResources.get("pageWithNumber",[la+1]));O.model.execute(new ChangePage(this,aa,aa,la,!0));B.push(aa)}this.updatePageLinks(d,B)}}if(null!=ja&&"mxGraphModel"===ja.nodeName){M=O.importGraphModel(ja,f,l,u);if(null!=M)for(ia=0;ia<M.length;ia++)this.updatePageLinksForCell(d,M[ia]);var X=O.parseBackgroundImage(ja.getAttribute("backgroundImage"));if(null!=X&&null!=X.originalSrc){this.updateBackgroundPageLink(d,X);var P=new ChangePageSetup(this,null,X);P.ignoreColor=!0;O.model.execute(P)}}F&&
this.insertHandler(M,null,null,O.defaultVertexStyle,O.defaultEdgeStyle,!1,!0)}finally{O.model.endUpdate()}}}catch(U){if(A)throw U;this.handleError(U)}return M};EditorUi.prototype.updatePageLinks=function(d,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(d,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(d,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+
1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var l=document.createElement("div"),u=this.editor.graph,A=u.getLinkForCell(f);null!=A&&u.setLinkForCell(f,this.updatePageLink(d,A));if(u.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(u.getLabel(f));for(var B=l.getElementsByTagName("a"),F=!1,M=0;M<B.length;M++)A=B[M].getAttribute("href"),null!=A&&(B[M].setAttribute("href",this.updatePageLink(d,A)),F=!0);F&&u.labelChanged(f,l.innerHTML)}for(M=
0;M<u.model.getChildCount(f);M++)this.updatePageLinksForCell(d,u.model.getChildAt(f,M))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var l=d[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var A=0;A<u.actions.length;A++){var B=u.actions[A];if(null!=B.open&&Graph.isPageLink(B.open)){var F=B.open.substring(B.open.indexOf(",")+1);l=d[F];null!=l?B.open=
"data:page/id,"+l:null==this.getPageById(F)&&delete B.open}}f="data:action/json,"+JSON.stringify(u)}}catch(M){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,l,u,A){var B=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){u=null!=u?u:d.name;var M=mxUtils.bind(this,function(H){F.clear()&&
B(H)}),O=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(u);try{var ja="UNKNOWN-VISIO",da=u.lastIndexOf(".");if(0<=da&&da<u.length)ja=u.substring(da+1).toUpperCase();else{var ca=u.lastIndexOf("/");0<=ca&&ca<u.length&&(u=u.substring(ca+1))}EditorUi.logEvent({category:ja+"-MS-IMPORT-FILE",action:"filename_"+u,label:H?"remote":"local"})}catch(ma){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())M({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):
function(la){try{f(la.target.result)}catch(X){M({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ma)}else this.doImportVisio(ma,f,M,u)}catch(la){M(la)}else try{""==ia.responseType||"text"==ia.responseType?M({message:ia.responseText}):(aa=new FileReader,aa.onload=function(){try{M({message:JSON.parse(aa.result).Message})}catch(la){M(la)}},aa.readAsText(ia.response))}catch(la){M({})}});ia.send(H)}else if(F.clear())try{this.doImportVisio(d,f,M,u)}catch(ma){M(ma)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?O():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",O,null,null,null,M))}),B)};EditorUi.prototype.importGraphML=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(M){A.clear()&&u(M)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,
f,u)}catch(M){B(M)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",F,null,null,null,B))}),u)};EditorUi.prototype.exportVisio=function(d){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 u=mxUtils.bind(this,
null,u))}),f)}};EditorUi.prototype.convertLucidChart=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(M){A.clear()&&u(M)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if("undefined"!==typeof window.LucidImporter)try{var M=JSON.parse(d);f(LucidImporter.importState(M));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var O=[(new Date).toISOString(),"convertLucidChart",M];null!=M.state&&O.push(JSON.parse(M.state));if(null!=M.svgThumbs)for(var H=0;H<M.svgThumbs.length;H++)O.push(Editor.createSvgDataUri(M.svgThumbs[H]));null!=M.thumb&&O.push(M.thumb);console.log.apply(console,O)}}catch(ja){}}catch(ja){null!=window.console&&console.error(ja),B(ja)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(B){EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"generateOpenAiMermaidDiagram",label:d});var F=new mxXmlRequest("https://www.draw.io/generate/v1",d,"POST"),M=mxUtils.bind(this,function(O){B.clear()&&(this.spinner.stop(),l(O))});F.send(mxUtils.bind(this,function(O){if(B.isAlive())if(200<=O.getStatus()&&299>=O.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ja=mxUtils.trim(O.getText()),da=this.extractMermaidDeclaration(ja);
this.generateMermaidImage(da,null,mxUtils.bind(this,function(ca,ia,ma){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresponse:",ja,"\nresult:",da),this.spinner.stop(),f(da,ca,ia,ma))}),M)}),M,mxUtils.bind(this,function(ca){3>u++?B.clear()&&(this.spinner.stop(),A()):M(ca)}))}),M);else{var H={message:mxResources.get("error")+" "+O.getStatus()};try{H=JSON.parse(O.getText()),H=H.error}catch(ja){}M(H)}}),M)}),l)});A()};
0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,u)&&(f="classDiagram\n"+f);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",l,"\ntype:",u,"\nvalue:",d,"\ntext:",f);return f};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var f=[],l=0;l<d.length;l++)"%%"!=d[l].substring(0,2)&&f.push(d[l]);return f.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,f,l,u,A){d=this.removeMermaidComments(d);var B=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=
u?u(M):this.handleError(M)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;Editor.isDarkMode()&&(f.theme="dark");var M=mxUtils.bind(this,function(O){try{if(mxClient.IS_IE||mxClient.IS_IE11)O=O.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var H=mxUtils.parseXml(O).getElementsByTagName("svg");if(0<H.length&&
(new Date).getTime(),d).then(function(O){M(O.svg)}).catch(function(O){null!=A?A(O):u(O)})}catch(O){u(O)}});"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(M){this.importXml(M,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,B)):mxscript("js/extensions.min.js",F,null,null,null,B))};
EditorUi.prototype.generatePlantUmlImage=function(d,f,l,u){function A(M,O,H){c1=M>>2;c2=(M&3)<<4|O>>4;c3=(O&15)<<2|H>>6;c4=H&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(M){if(10>M)return String.fromCharCode(48+M);M-=10;if(26>M)return String.fromCharCode(65+M);M-=26;if(26>M)return String.fromCharCode(97+M);M-=26;return 0==M?"-":1==M?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(M){r="";
for(i=0;i<M.length;i+=3)r=i+2==M.length?r+A(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+A(M.charCodeAt(i),0,0):r+A(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var O=new FileReader;O.readAsDataURL(this.response);O.onloadend=function(H){var ja=new Image;ja.onload=function(){try{var da=ja.width,ca=
ja.height;if(0==da&&0==ca){var ia=O.result,ma=ia.indexOf(","),aa=decodeURIComponent(escape(atob(ia.substring(ma+1)))),la=mxUtils.parseXml(aa).getElementsByTagName("svg");0<la.length&&(da=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(O.result,da,ca)}catch(X){u(X)}};ja.src=O.result};O.onerror=function(H){u(H)}}else u(M)};F.onerror=function(M){u(M)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,l){var u=this.editor.graph,A=null;u.getModel().beginUpdate();
try{A=u.insertVertex(null,null,"<pre>"+d+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(A,!0)}finally{u.getModel().endUpdate()}return A};EditorUi.prototype.insertTextAt=function(d,f,l,u,A,B,F,M){B=null!=B?B:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==
ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(A||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var O=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,l,B,!0,M)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),null!=H&&0<H.length))return this.importXml(H,
f,l,B,!0,M);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var ja=this.importXml(H,f,l,B,!0,M);if(0<ja.length)return ja}catch(ca){}this.loadImage(d,mxUtils.bind(this,function(ca){if("data:"==d.substring(0,5))this.resizeImage(ca,d,mxUtils.bind(this,function(aa,la,X){O.setSelectionCell(O.insertVertex(null,
d+";"))}}),mxUtils.bind(this,function(){var ca=null;O.getModel().beginUpdate();try{ca=O.insertVertex(O.getDefaultParent(),null,d,O.snap(f),O.snap(l),1,1,"text;"+(u?"html=1;":"")),O.updateCellSize(ca),O.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{O.getModel().endUpdate()}O.setSelectionCell(ca)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,l,B,null,M);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,B,null,M))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{O=this.editor.graph;A=null;O.getModel().beginUpdate();try{A=O.insertVertex(O.getDefaultParent(),null,"",O.snap(f),O.snap(l),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));O.fireEvent(new mxEventObject("textInserted","cells",[A]));u&&(d=O.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");A.value=d;O.updateCellSize(A);if(0<
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,M){StorageFile.listFiles(this,"F",F,M)});window.openBrowserFile=
mxUtils.bind(this,function(F,M,O){StorageFile.getFileContent(this,F,M,O)});window.deleteBrowserFile=mxUtils.bind(this,function(F,M,O){StorageFile.deleteFile(this,F,M,O)});if(!f){var u=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,M){null!=M&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(M)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,
mxUtils.bind(this,function(O){this.importXml(O,0,0,!0)}),null,M)):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 A=this.dialog,B=A.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=u;B.apply(A,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
function(d,f,l){var u=this,A=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))l();else{var F=0,M,O=!1;B.forEach(function(H,ja){H=ja.name.toLowerCase();"diagram/diagram.xml"==H?(O=!0,ja.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):l()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>F&&(F=H,M=ja))});0<F?M.async("string").then(function(H){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(H,
d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):u.parseFileData(H,mxUtils.bind(this,function(ja){4==ja.readyState&&(200<=ja.status&&299>=ja.status?f(ja.responseText):l())}),d.name):l()}):O||l()}},function(B){l(B)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A,null,null,null,l))};EditorUi.prototype.importFile=function(d,f,l,u,A,B,F,M,O,H,ja,da){H=null!=
H?H:!0;var ca=!1,ia=null,ma=mxUtils.bind(this,function(aa){var la=null;null!=aa&&"<mxlibrary"==aa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,aa,F)):la=this.importXml(aa,l,u,H,null,null!=da?mxEvent.isControlDown(da):null);null!=M&&M(la)});"image"==f.substring(0,5)?(O=!1,"image/png"==f.substring(0,9)&&(f=ja?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ia=this.importXml(f,l,u,H,null,null!=da?mxEvent.isControlDown(da):null),O=!0)),O||(f=this.editor.graph,O=d.indexOf(";"),0<
F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,A=mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?ma(aa.responseText):null!=M&&(M(null),this.showError(mxResources.get("error"),413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,A,F):this.parseFile(O,A,F)):0==d.indexOf("PK")&&null!=O?(ca=!0,this.importZipFile(O,ma,mxUtils.bind(this,function(){ia=this.insertTextAt(this.validateFileData(d),
l,u,!0,null,H);M(ia)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(ia=this.insertTextAt(this.validateFileData(d),l,u,!0,null,H,null,null!=da?mxEvent.isControlDown(da):null));ca||null==M||M(ia);return ia};EditorUi.prototype.importFiles=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){u=null!=u?u:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var ia=null!=f&&null!=l,ma=!0;f=null!=f?f:0;l=null!=l?l:0;var aa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var la=ja||this.resampleThreshold,X=0;X<
!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,ba,Ca,!0)),null):this.importFile(ba,ha,qa,ra,pa,xa,Ca,Ba,za,ia,da,ca)}catch(Ma){return this.handleError(Ma),null}});B=null!=B?B:mxUtils.bind(this,function(ba){U.setSelectionCells(ba)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,J=z,W=[],T=mxUtils.bind(this,function(ba,ha){W[ba]=ha;if(0==--J){this.spinner.stop();if(null!=M)M(W);else{var qa=[];U.getModel().beginUpdate();try{for(ba=0;ba<W.length;ba++){var ra=
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var M=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H=
Math.max(M/A,O/A);if(1<H){var ja=Math.round(M/H),da=Math.round(O/H),ca=document.createElement("canvas");ca.width=ja;ca.height=da;ca.getContext("2d").drawImage(d,0,0,ja,da);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");ma.width=ja;ma.height=da;var aa=ma.toDataURL();ia!==aa&&(f=ia,M=ja,O=da)}}}catch(la){}l(f,M,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,l){try{var u=
this.editor.getEditBlankUrl=function(P){P=null!=P?P:"";"1"==urlParams.dev&&(P+=(0<P.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var M=f.addClickHandler;f.addClickHandler=function(P,U,k){var z=U;U=function(J,W){if(null==W){var T=mxEvent.getSource(J);"a"==T.nodeName.toLowerCase()&&(W=T.getAttribute("href"))}null!=W&&f.isCustomLink(W)&&(mxEvent.isTouchEvent(J)||!mxEvent.isPopupTrigger(J))&&f.customLinkClicked(W)&&mxEvent.consume(J);null!=z&&z(J,W)};M.call(this,P,U,k)};q.apply(this,arguments);
"row-resize";this.diagramContainer.parentNode.appendChild(A);this.bottomResizer=A;var B=null,F=null,M=null,O=null;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){O=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));A=A.cloneNode(!1);A.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(A);this.rightResizer=A;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){M=parseInt(this.diagramContainer.style.width);
B=mxEvent.getClientX(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(H){var ja=!1;null!=B&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(H)-B)+"px",ja=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,O+mxEvent.getClientY(H)-F)+"px",ja=!0);ja&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
0,0,this.maxImageSize,function(O,H,ja,da,ca,ia){d.insertImage(O,ca,ia)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var H=0;H<O.length;H++)O[H]()});else{var M=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],M.x,M.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(O){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",
mxEvent.addListener(l,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=B.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!0,!0)),!mxEvent.isConsumed(B)){var F=f.container.scrollLeft,M=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=M,Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!1,!0)}catch(O){this.handleError(O)}}),
0)}}catch(O){this.handleError(O)}}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==l?!0:A.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,l){function u(O){return"simple"==
O||0==f&&"sketch"==O}f=null!=f?f:150;var A=Editor.currentTheme,B=u(A)&&this.isDefaultTheme(d)||this.isDefaultTheme(A)&&u(d),F=B&&"sketch"!=d&&"sketch"!=A;if(B&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var M=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms ease-in-out");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
"flex");this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(M);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&u(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:
!0);null!=l&&l()}),f)}),f)}),f)}),0)}return F};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,
function(){if("sketch"==Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var A=this.getCurrentFile();A=null!=A?A.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(A)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(A))+'..."src="'+
Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=
function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
"right 0px top 8px",B.style.backgroundRepeat="no-repeat",B.style.backgroundSize="13px",B.style.paddingRight="16px",B.style.marginRight="-4px");f.appendChild(B);if("simple"==d){var F=this.createMenu("pages",Editor.thinNoteImage);F.style.backgroundSize="24px";F.style.display="inline-block";F.style.width="24px";F.style.height="30px";F.style.opacity="0.7";f.appendChild(F);var M=this.createMenuItem("undo",Editor.thinUndoImage);M.style.marginLeft="auto";M.style.flexShrink="0";M.style.opacity="0.7";f.appendChild(M);
M=this.createMenuItem("redo",Editor.thinRedoImage);M.style.marginLeft="0px";M.style.flexShrink="0";M.style.opacity="0.7";f.appendChild(M);M=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.style.display=480>H?"none":"";B.style.display=750>H?"none":"inline-flex"});mxEvent.addListener(window,"resize",M);M()}mxUtils.bind(this,function(H){mxEvent.addListener(H,"click",mxUtils.bind(this,function(da){mxEvent.isAltDown(da)?(this.hideCurrentMenu(),
mxUtils.bind(this,function(da,ca){ja(da,ca,ca.getProperty("factor"))}))})(B);"simple"!=d&&f.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var O=this.createMenuItem("fullscreen",Editor.fullscreenImage);f.appendChild(O);M=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",
mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",M);f.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==d?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText=
"simple"==d?"inline-block":"block";F.style.flexShrink="0";F.style.width="30px";F.style.height="30px";F.style.padding="simple"==d?"0px":"4px 4px 0px 4px";F.style.opacity="0.7";var M=this.createMenu("table",Editor.thinTableImage);M.style.backgroundSize="24px";M.style.padding="simple"==d?"0px":"4px 4px 0px 4px";M.style.display="inline-block";M.style.width="30px";M.style.height="30px";M.style.opacity="0.7";var O=F.cloneNode(!0);O.style.backgroundImage="url("+("simple"==d?Editor.thinShapesImage:Editor.shapesImage)+
this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=d,null,28,28,"simple"==d?Editor.thinRectangleImage:null);"simple"==d?(600<=ma&&(la.className="geToolbarButton",la.style.opacity="0.7",ia(la,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=ma&&this.sketchPickerMenuElt.appendChild(O),440<=ma&&ia(B,mxResources.get("freehand")+" (X)",null,"X"),500<=ma&&this.sketchPickerMenuElt.appendChild(M)):
f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,f=mxUtils.getOffset(this.diagramContainer),l=this.diagramContainer.scrollLeft-f.x;f=this.diagramContainer.scrollTop-f.y;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,
f-=this.embedViewport.y):(l+=this.embedViewport.x,f+=this.embedViewport.y));return{x:l,y:f,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate,u=mxUtils.getOffset(this.diagramContainer);this.diagramContainer.scrollLeft=d.x+u.x+(l.x-d.tx)*f;this.diagramContainer.scrollTop=d.y+u.y+(l.y-d.ty)*f};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",
JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,u=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==
this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var A=this.diagramContainer.getAttribute("data-bounds");
if(null!=A){this.diagramContainer.removeAttribute("data-bounds");u.getGraphBounds();var B=A.split(" ");u=mxUtils.getDocumentSize();this.diagramContainer.style.top=B[0];this.diagramContainer.style.left=B[1];A=parseInt(B[2]);B=parseInt(B[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,u.width-80);B=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,B):B,u.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=B+"px";this.diagramContainer.style.bottom=
"";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-
d.offsetWidth+"px";d.style.top=f.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+
(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);
d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme?(d.defaultEdgeStyle.edgeStyle=
"none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,
d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l=
d.indexOf(",");0<l&&(f=this.getPageById(d.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=
mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,
mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(u,A){try{this.spinner.stop();var B=this.createImageDataUri(u,f,"png"),F=parseInt(A.getAttribute("width")),M=parseInt(A.getAttribute("height"));this.writeImageToClipboard(B,F,M,mxUtils.bind(this,function(O){this.handleError(O)}))}catch(O){this.handleError(O)}}),null,null,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==
mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(u){this.handleError(u)}};EditorUi.prototype.writeImageToClipboard=function(d,f,l,u){var A=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](u)};EditorUi.prototype.copyCells=function(d,f){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText=
"";else{var u=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),A=mxUtils.getXml(l.encodeCells(u));mxUtils.setTextContent(d,encodeURIComponent(A));f?(l.removeCells(u,!1),l.lastPasteXml=null):(l.lastPasteXml=A,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,l,u,A){A=null!=A?A:!0;var B=this.editor.graph,F=null;B.lastPasteXml==d?B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var M=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d))F=this.importXml(d,M,M),B.setSelectionCells(F);else if(f&&1==B.getSelectionCount()){A=B.getStartEditingCell(B.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,
d,[A]);else{B.model.beginUpdate();try{B.labelChanged(A,d),Graph.isLink(d)&&B.setLinkForCell(A,d)}finally{B.model.endUpdate()}}B.setSelectionCell(A)}else F=B.getInsertPoint(),B.isMouseInsertPoint()&&(M=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),F=this.insertTextAt(d,F.x+M,F.y+M,A),B.setSelectionCells(F);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return F};EditorUi.prototype.pasteCells=
function(d,f,l,u){if(!mxEvent.isConsumed(d)){var A=f,B=!1;if(l&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),M=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var O=decodeURIComponent(F);this.isCompatibleString(O)&&(M=!0,F=O)}catch(ma){}M=M?null:d.clipboardData.getData("text/html");null!=M&&0<M.length?(A=this.parseHtmlData(M),B="text/plain"!=A.getAttribute("data-type")):null!=F&&0<F.length&&(A=document.createElement("div"),mxUtils.setTextContent(A,
M))}F=A.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(ma){var aa=this.editor.graph;aa.lastPasteXml==ma?aa.pasteCounter++:(aa.lastPasteXml=ma,aa.pasteCounter=0);var la=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ma,la,la));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,
f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var B=mxUtils.bind(this,function(M){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==M.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,M,f))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(M,f,u)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(l,mxUtils.bind(this,function(M){this.spinner.stop();B(M)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(M){this.spinner.stop();B(M)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(M){4==M.readyState&&(this.spinner.stop(),
200<=M.status&&299>=M.status?B(M.responseText):this.handleError({message:mxResources.get(413==M.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(M){this.spinner.stop();this.openLocalFile(M,f,u)}),mxUtils.bind(this,function(M){this.spinner.stop();this.handleError(M)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,d,l.name))}catch(M){this.handleError(M,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(M){this.spinner.stop();B(M)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,u)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
this.handleError(B);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?A.readAsText(u):A.readAsDataURL(u)})(d[l])};EditorUi.prototype.openLocalFile=function(d,f,l,u,A){var B=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var M=mxUtils.parseXml(d);null!=M&&(this.editor.setGraphXml(M.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
function(d,f){function l(F){if(null!=F){var M=F.lastIndexOf(".");0<M&&(F=F.substring(M+1,F.length));null==f[F]&&(f[F]=!0)}}var u=this.editor.graph,A=u.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(A[mxConstants.STYLE_SHAPE]));u.model.isEdge(d)&&(l(mxMarker.getPackageForType(A[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(A[mxConstants.STYLE_ENDARROW])));A=u.model.getChildCount(d);for(var B=0;B<A;B++)this.addBasenamesForCell(u.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
if(A)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var F=B.model.cells,M;for(M in F){var O=F[M];null!=O&&null!=O.style&&(O.style+=";sketch=1;"+(-1==O.style.indexOf("fontFamily=")||-1<O.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=da(H),Pa(H,O)):this.loadDescriptor(H,mxUtils.bind(this,function(ta){Pa(Qa(),O)}),mxUtils.bind(this,function(ta){this.handleError(ta,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(B,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(O,H,ja){M.apply(this,
l,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",l,null,null,null,u))}),onerror)};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var l=d.split("\n"),u=[],A=[],B=[],F={};if(0<l.length){var M={},O=this.editor.graph,H=null,ja=null,da=null,ca=null,ia=null,ma=null,aa=null,la="whiteSpace=wrap;html=1;",X=null,
"levelspacing"==Aa?ha=parseFloat(ya):"layout"==Aa&&(za=ya)}}}if(null==l[ta])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[ta].replace(/\r$/,""));Da=d=null;Aa=[];for(ya=0;ya<Ra.length;ya++)X==Ra[ya]&&(d=ya),P==Ra[ya]&&(Da=ya),Aa.push(mxUtils.trim(Ra[ya]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Aa[0]+"%");if(null!=Ma)for(var Wa=0;Wa<Ma.length;Wa++)null==M[Ma[Wa].to]&&(M[Ma[Wa].to]={});X=[];for(ya=ta+1;ya<l.length;ya++){var La=
[v])):(O.model.setStyle(Ea,v.style),0>mxUtils.indexOf(B,Ea)&&B.push(Ea),O.fireEvent(new mxEventObject("cellsInserted","cells",[Ea])));l=null!=Ea;Ea=v;if(!l)for(Wa=0;Wa<Ma.length;Wa++)M[Ma[Wa].to][Ea.getAttribute(Ma[Wa].to)]=Ea;null!=Qa&&"link"!=Qa&&(O.setLinkForCell(Ea,Ea.getAttribute(Qa)),O.setAttributeForCell(Ea,Qa,null));var ea=this.editor.graph.getPreferredSizeForCell(Ea);P=null!=Da?O.model.getCell(U+La[Da]):null;if(Ea.vertex){ab=null!=P?0:xa;ta=null!=P?0:Ca;null!=W&&null!=Ea.getAttribute(W)&&
function(jb,ib,mb){var wb=ib.getAttribute(mb.from);if(null!=wb&&""!=wb){wb=wb.split(",");for(var xb=0;xb<wb.length;xb++){var rb=M[mb.to][wb[xb]];if(null==rb&&null!=ma){rb=new mxCell(wb[xb],new mxGeometry(xa,Ca,0,0),ma);rb.style=O.replacePlaceholders(ib,rb.style,H);var nb=this.editor.graph.getPreferredSizeForCell(rb);rb.geometry.width=nb.width+qa;rb.geometry.height=nb.height+qa;M[mb.to][wb[xb]]=rb;rb.vertex=!0;rb.id=wb[xb];B.push(O.addCell(rb))}if(null!=rb){nb=mb.label;null!=mb.fromlabel&&(nb=(ib.getAttribute(mb.fromlabel)||
this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var L=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
function(d){var f=L.apply(this,arguments),l=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});Editor.enableCssDarkMode||this.addListener("darkModeChanged",l);this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return f};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var f=0;f<d.length;f++)this.libraryLoaded(d[f].file,d[f].images,d[f].title,null!=d[f].div?"none"!=d[f].div.style.display:
this.exportDialog=null);V.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,l,u,A,B,F,M){var O=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(O.getSvg(u,A,B)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),ja=O.getGraphBounds(),da=Math.floor(ja.width*
A/O.view.scale),ca=Math.floor(ja.height*A/O.view.scale);if(H.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.isExportToCanvas()){var ia={globalVars:O.getExportVariables()};M&&(ia.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});d.saveRequest(f,l,function(ma,aa){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(aa||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(ia))+(0<F?
"&dpi="+F:"")+"&bg="+(null!=u?u:"none")+"&w="+da+"&h="+ca+"&border="+B+"&xml="+encodeURIComponent(H))})}else"png"==l?d.exportImage(A,null==u||"none"==u,!0,!1,!1,B,!0,!1,null,M,F):d.exportImage(A,!1,!0,!1,!1,B,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var u=d;this.currentPage!=this.pages[l]&&(u=this.createTemporaryGraph(d.getStylesheet()),
document.createElement("div");A.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";A.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var M=F[d];if("R"==M.substring(0,1)){var O=JSON.parse(decodeURIComponent(M.substring(1)));B[O[0]]={id:O[0],title:O[1],downloadUrl:O[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){A.innerText="";
function(d){var f=d.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,l,u,A){var B=!0,F=window.setTimeout(mxUtils.bind(this,function(){B=!1;A({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(F);
B&&u.apply(this,arguments)}),O=mxUtils.bind(this,function(){window.clearTimeout(F);B&&A.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:M,error:O});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var l=mxUtils.bind(this,function(H,ja){var da={event:"remoteInvokeResponse",
msgMarkers:d.msgMarkers};null!=ja?da.error={errResp:ja}:null!=H&&(da.resp=H);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var u=d.funtionName,A=this.remoteInvokableFns[u];if(null!=A&&"function"===typeof this[u]){if(A.allowedDomains){for(var B=!1,F=0;F<A.allowedDomains.length;F++)if(f=="https://"+A.allowedDomains[F]){B=!0;break}if(!B){l(null,"Invalid Call: "+u+" is not allowed.");return}}var M=d.functionArgs;Array.isArray(M)||(M=[]);if(A.isAsync)M.push(function(){l(Array.prototype.slice.apply(arguments))}),
M.push(function(H){l(null,H||"Unkown Error")}),this[u].apply(this,M);else{var O=this[u].apply(this,M);l([O])}}else l(null,"Invalid Call: "+u+" is not found.")}catch(H){l(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var u=l.open("database",2);u.onupgradeneeded=function(A){try{var B=u.result;1>A.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});
function(F){if(!F||"1"==urlParams.forceMigration){var M=document.createElement("iframe");M.style.display="none";M.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(M);var O=!0,H=!1,ja,da=0,ca=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",!0);M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ia=mxUtils.bind(this,function(){da++;ma()}),ma=mxUtils.bind(this,
function(){try{if(da>=ja.length)ca();else{var la=ja[da];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(X){null==X||".scratchpad"==la&&X==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):ia()}),ia)}}catch(X){console.log(X)}}),aa=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,
data:la.data}],ia,ia,["filesInfo","files"])}catch(X){console.log(X)}});F=mxUtils.bind(this,function(la){try{if(la.source==M.contentWindow){var X={};try{X=JSON.parse(la.data)}catch(P){}"init"==X.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=X.event||H||(O?null!=X.resp&&0<X.resp.length&&null!=X.resp[0]?(ja=X.resp[0],O=!1,ma()):
function(B){try{A=A||"objects";Array.isArray(A)||(A=[A],d=[d],f=[f]);var F=B.transaction(A,"readwrite");F.oncomplete=l;F.onerror=u;for(B=0;B<A.length;B++)F.objectStore(A[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(M){null!=u&&u(M)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,f,l,u){this.openDatabase(mxUtils.bind(this,function(A){u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);A=A.transaction(u,"readwrite");A.oncomplete=f;A.onerror=l;for(var B=0;B<u.length;B++)A.objectStore(u[B]).delete(d[B])}),
function(d,f,l,u,A,B,F,M){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,l,u,A,B,F,M)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia,ma,aa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia,ma,aa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
mxUtils.write(ia,mxResources.get("timeAgo",[ma],"{1} ago"));ia.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function G(ca){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ia);ca.busyImg=ia}function L(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function V(ca,ia,ma,aa,la){function X(Z,ba,ha){var qa=document.createElement("li");
ca.addReply(Ba,function(Ma){Ba.id=Ma;ca.replies.push(Ba);R(za);ha&&ha()},function(Ma){xa();L(za);b.handleError(Ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function xa(){K(Ba,za,function(Ma){pa()},!0)}var Ca=P().pdiv,Ba=b.newComment(Z,b.getCurrentUser());Ba.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var za=V(Ba,ca.replies,Ca,aa+1);ba?xa():pa()}if(la||!ca.isResolved){F.style.display="none";var k=document.createElement("div");k.className="geCommentContainer";
!f||X(mxResources.get("reply"),function(){U("",!0)},ca.isResolved);J=b.getCurrentUser();null==J||J.id!=ca.user.id||d||ca.isLocked||(X(mxResources.get("edit"),function(){function Z(){K(ca,k,function(){G(k);ca.editComment(ca.content,function(){R(k)},function(ba){L(k);Z();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Z()},ca.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(k);ca.deleteComment(function(Z){if(!0===
Z){Z=k.querySelector(".geCommentTxt");Z.innerText="";mxUtils.write(Z,mxResources.get("msgDeleted"));var ba=k.querySelectorAll(".geCommentAction");for(Z=0;Z<ba.length;Z++)ba[Z].parentNode.removeChild(ba[Z]);R(k);k.style.opacity="0.5"}else{ba=P(ca).replies;for(Z=0;Z<ba.length;Z++)B.removeChild(ba[Z]);for(Z=0;Z<ia.length;Z++)if(ia[Z]==ca){ia.splice(Z,1);break}F.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(Z){L(k);b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
Editor.darkColor:"whiteSmoke";B.style.bottom=parseInt(A)+7+"px";u.appendChild(B);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=A;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A=document.createElement("a");A.className="geButton";if(!d){var O=A.cloneNode();O.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
O.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(O,"click",function(ca){function ia(){K(ma,aa,function(la){G(aa);b.addComment(la,function(X){la.id=X;ja.push(la);R(aa)},function(X){L(aa);ia();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),aa=V(ma,ja,null,0);ia();ca.preventDefault();mxEvent.consume(ca)});M.appendChild(O)}O=A.cloneNode();O.innerHTML='<img class="geAdaptiveAsset" src="'+
IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';O.setAttribute("title",mxResources.get("showResolved"));O.className="geButton";var H=!1;mxEvent.addListener(O,"click",function(ca){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";da();ca.preventDefault();mxEvent.consume(ca)});M.appendChild(O);b.commentsRefreshNeeded()&&(O=A.cloneNode(),O.innerHTML='<img class="geAdaptiveAsset" src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',O.setAttribute("title",mxResources.get("refresh")),
O.className="geButton",mxEvent.addListener(O,"click",function(ca){da();ca.preventDefault();mxEvent.consume(ca)}),M.appendChild(O));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,"click",function(ca){q();ca.preventDefault();mxEvent.consume(ca)}),M.appendChild(A));u.appendChild(M);var ja=[],da=mxUtils.bind(this,function(){this.hasError=
mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});da();this.refreshComments=da;M=mxUtils.bind(this,function(){function ca(X){var P=ma[X.id];if(null!=P)for(S(X,P),P=0;null!=X.replies&&P<X.replies.length;P++)ca(X.replies[P])}if(this.window.isVisible()){for(var ia=B.querySelectorAll(".geCommentDate"),ma={},aa=0;aa<ia.length;aa++){var la=ia[aa];ma[la.getAttribute("data-commentId")]=la}for(aa=
0;aa<ja.length;aa++)ca(ja[aa])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),u,e,g,n,y,!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,n,y,
q,E,K,S,G,L){var R=document.createElement("div");R.style.textAlign="center";L=null!=L?L:44;var V=document.createElement("div");V.style.padding="6px";V.style.overflow="auto";V.style.maxHeight=L+"px";V.style.lineHeight="1.2em";mxUtils.write(V,e);R.appendChild(V);null!=G&&(V=document.createElement("div"),V.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),V.appendChild(e),R.appendChild(V));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";E!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){E=K.getProperty("edit").changes;for(K=0;K<E.length;K++)if(E[K]instanceof RenamePage||E[K]instanceof MovePage||E[K]instanceof mxRootChange){this.updateTabContainer();
function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var L=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(L,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(n,E,null,K);mxEvent.addGestureListeners(e,E,null,K)};
return null==Z||ba});var J=aa.geometry.width+40,W=aa.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?J=0:la==mxConstants.DIRECTION_NORTH?(J=0,W=-W):la==mxConstants.DIRECTION_WEST?(J=-J,W=0):la==mxConstants.DIRECTION_EAST&&(W=0);f.moveCells(z,J,W);return f.addCells(P,U)}finally{f.model.endUpdate()}}function L(aa,la){f.model.beginUpdate();try{var X=f.model.getParent(aa),P=f.getIncomingTreeEdges(aa),U=K(aa);0==P.length&&(P=[f.createEdge(X,null,"",null,null,f.createCurrentEdgeStyle())],U=la);var k=
f.model.getTerminal(ba[0],!0);P=this.cloneCell(ba[0]);this.addEdge(P,f.getDefaultParent(),T,J[Z])}}finally{this.model.endUpdate()}return J};if(null!=d.sidebar){var M=d.sidebar.dropAndConnect;d.sidebar.dropAndConnect=function(aa,la,X,P){var U=f.model,k=null;U.beginUpdate();try{if(k=M.apply(this,arguments),n(aa))for(var z=0;z<k.length;z++)if(U.isEdge(k[z])&&null==U.getTerminal(k[z],!0)){U.setTerminal(k[z],aa,!0);var J=f.getCellGeometry(k[z]);J.points=null;null!=J.getTerminalPoint(!0)&&J.setTerminalPoint(null,
G(la):L(la):13==aa.which&&(X=S(la,!mxEvent.isShiftDown(aa)))),null!=X&&0<X.length?(1==X.length&&f.model.isEdge(X[0])?f.setSelectionCell(f.model.getTerminal(X[0],!1)):f.setSelectionCell(X[X.length-1]),null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(la)),f.startEditingAtCell(la),mxEvent.consume(aa)):37==aa.keyCode?(V(la,mxConstants.DIRECTION_WEST),mxEvent.consume(aa)):38==aa.keyCode?(V(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(aa)):39==aa.keyCode?(V(la,mxConstants.DIRECTION_EAST),mxEvent.consume(aa)):
40==aa.keyCode&&(V(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(aa)))}}catch(P){d.handleError(P)}mxEvent.isConsumed(aa)||H.apply(this,arguments)};var ja=f.connectVertex;f.connectVertex=function(aa,la,X,P,U,k,z){var J=f.getIncomingTreeEdges(aa);if(n(aa)){var W=K(aa),T=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST,Z=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;return W==la||0==J.length?L(aa,la):T==Z?G(aa):S(aa,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ja.apply(this,
G.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),S.style);L.geometry.relative=!0;L.edge=!0;E.insertEdge(L,!0);G.insertEdge(L,!1);var R=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 f=new mxCell("",new mxGeometry(0,0,0,0),S.style);f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);q.insert(S);q.insert(L);q.insert(V);q.insert(f);q.insert(E);q.insert(K);q.insert(G);q.insert(R);q.insert(d);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var q=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;');
S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);K.insertEdge(S,!1);var G=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");L.geometry.relative=
!0;L.edge=!0;E.insertEdge(L,!0);G.insertEdge(L,!1);q.insert(S);q.insert(L);q.insert(E);q.insert(K);q.insert(G);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree root",function(){var q=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"};');y.setAttributeForCell(q,"treeRoot","1");q.vertex=!0;return sb.createVertexTemplateFromCells([q],
f.parentNode&&f.parentNode.removeChild(f)}))};var L=!1;EditorUi.prototype.initFormatWindow=function(){if(!L&&null!=this.formatWindow){L=!0;var V=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){V.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+d-140+"px"):(this.div.style.width=d+"px",this.table.style.width=this.div.style.width,
M.insertBefore(Ba,B.statusContainer):M.appendChild(Ba);null!=Ca?(Ba.style.backgroundImage="url("+Ca+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,ha);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(za){za.preventDefault()}));mxEvent.addListener(Ba,"click",function(za){"disabled"!=Ba.getAttribute("disabled")&&qa(za);mxEvent.consume(za)});
"0 4px 0 4px";ra.style.height="30px";ra.style.position="relative";ra.style.top="0px";for(var pa=0;pa<ha.length;pa++)null!=ha[pa]&&(ha[pa].style.margin="0px",ha[pa].style.boxShadow="none",ra.appendChild(ha[pa]));null!=qa&&mxUtils.setOpacity(ra,qa);null!=B.statusContainer?M.insertBefore(ra,B.statusContainer):M.appendChild(ra);return ra}function l(){for(var ha=M.firstChild;null!=ha;){var qa=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=qa}O=M.firstChild;
this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var B=this,F=B.editor.graph;B.toolbar=this.createToolbar(B.createDiv("geToolbar"));B.defaultLibraryName=mxResources.get("untitledLibrary");var M=document.createElement("div");M.className="geMenubarContainer";var O=null,H=new Menubar(B,M);B.statusContainer=B.createStatusContainer();B.statusContainer.style.position="relative";B.statusContainer.style.maxWidth="";B.statusContainer.style.color=
"gray";B.statusContainer.style.cursor="default";var ja=B.hideCurrentMenu;B.hideCurrentMenu=function(){ja.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var da=B.descriptorChanged;B.descriptorChanged=function(){da.apply(this,arguments);var ha=B.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var qa=ha.getMode();"google"==qa?qa="googleDrive":"github"==qa?qa="gitHub":"gitlab"==qa?qa="gitLab":"onedrive"==qa&&(qa="oneDrive");qa=mxResources.get(qa);M.setAttribute("title",ha.getTitle()+
(null!=qa?" ("+qa+")":""))}else M.removeAttribute("title")};B.setStatusText(B.editor.getStatus());M.appendChild(B.statusContainer);B.buttonContainer=document.createElement("div");B.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;";M.appendChild(B.buttonContainer);B.menubarContainer=B.buttonContainer;B.tabContainer=document.createElement("div");B.tabContainer.className=
B.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=B.actions.get("zoomIn"),P=B.actions.get("zoomOut"),U=B.actions.get("resetView"),k=B.actions.get("undo"),z=B.actions.get("redo"),J=d("",k.funct,null,mxResources.get("undo")+" ("+k.shortcut+")",k,Editor.undoImage),W=d("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),T=d("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage);M.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
B.editor.addListener("resetGraphView",qa);B.editor.addListener("pageSelected",qa);B.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(ra,pa){qa(ra,pa,pa.getProperty("factor"))}))})(Z);var ba=B.setGraphEnabled;B.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(Z.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(M);
function(l){return K.getImageUrl(l)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<S.length){if(null!=this.pageId)for(var G=0;G<S.length;G++)if(this.pageId==S[G].getAttribute("id")){this.currentPage=G;break}var L=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(l){var u=S[K.currentPage];return"page"==l?u.getAttribute("name")||"Page-"+(K.currentPage+
1):"pagenumber"==l?K.currentPage+1:"pagecount"==l?S.length:L.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(l){this.handlingResize||(this.currentPage=mxUtils.mod(l,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(l){l=this.getIndexById(l);var u=0<=l;u&&this.selectPage(l);return u};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=
E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(da,ca){},mouseUp:function(da,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-ca.getGraphX())<K&&Math.abs(this.startY-ca.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?y():q(30))}})}for(var S=this.toolbarItems,G=0,L=mxUtils.bind(this,function(da,ca,ia,ma){da=this.createToolbarButton(da,ca,ia,ma);e.appendChild(da);
G++;return da}),R=null,V=null,d=null,f=null,l=0;l<S.length;l++){var u=S[l];if("pages"==u){f=b.ownerDocument.createElement("div");f.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;color:#000;";mxUtils.setOpacity(f,70);var A=L(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";
A.style.paddingLeft="0px";A.style.paddingRight="0px";e.appendChild(f);var B=L(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";u=mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,this.currentPage+1+" / "+this.diagrams.length);f.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=f.style.display;B.style.display=f.style.display});this.addListener("graphChanged",
u);u()}else if("zoom"==u)this.zoomEnabled&&(L(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),L(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),L(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"==u){if(this.layersEnabled){var F=this.graph.getModel(),M=L(mxUtils.bind(this,function(da){if(null!=R)R.parentNode.removeChild(R),R=null;else{R=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ia=this.graph.getGraphBounds(),ma=this.graph.view;0>ia.x||0>ia.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale}):null!=this.graph.originalViewState&&
0<ia.x/ma.scale+this.graph.originalViewState.translate.x-ma.translate.x&&0<ia.y/ma.scale+this.graph.originalViewState.translate.y-ma.translate.y&&(ma.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale})}}));mxEvent.addListener(R,"mouseleave",function(){R.parentNode.removeChild(R);R=null});da=M.getBoundingClientRect();R.style.width="140px";R.style.padding=
document.body.appendChild(R)}}),Editor.layersImage,mxResources.get("layers")||"Layers");F.addListener(mxEvent.CHANGE,function(){M.style.display=1<F.getChildCount(F.root)?"inline-block":"none"});M.style.display=1<F.getChildCount(F.root)?"inline-block":"none"}}else if("tags"==u){if(this.tagsEnabled){var O=L(mxUtils.bind(this,function(da){null==V&&(V=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),V.div.getElementsByTagName("div")[0].style.position="",V.div.style.maxHeight="160px",
"inline-block":"none"}}else"lightbox"==u?this.lightboxEnabled&&L(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(u=this.graphConfig["toolbar-buttons"][u],null!=u&&(u.elem=L(null==u.enabled||u.enabled?u.handler:function(){},u.image,u.title,u.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),
document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=E,GraphViewer.resizeSensorEnabled=!0,K.apply(this,arguments))};var S=y.editor.graph,G=S.container;G.style.overflow="hidden";this.lightboxChrome&&null==b?(G.style.border="1px solid #c0c0c0",G.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",q)):(e.style.display="none",g.style.display="none");var L=this;S.getImageFromBundles=function(V){return L.getImageUrl(V)};var R=y.createTemporaryGraph;
y.createTemporaryGraph=function(){var V=R.apply(this,arguments);V.getImageFromBundles=function(d){return L.getImageUrl(d)};return V};this.graphConfig.move&&(S.isMoveCellsEvent=function(V){return!0});mxUtils.setPrefixedStyle(G.style,"border-radius","4px");G.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(S,y);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){y.destroy()}),G.style.outline=
d.appendChild(d.resizeSensor);"static"==q(d,"position")&&(d.style.position="relative");var l=d.resizeSensor.childNodes[0],u=l.childNodes[0],A=d.resizeSensor.childNodes[1],B=function(){u.style.width="100000px";u.style.height="100000px";l.scrollLeft=1E5;l.scrollTop=1E5;A.scrollLeft=1E5;A.scrollTop=1E5};B();var F=!1,M=function(){d.resizedAttached&&(F&&(d.resizedAttached.call(),F=!1),b(M))};b(M);var O,H,ja,da;f=function(){if((ja=d.offsetWidth)!=O||(da=d.offsetHeight)!=H)F=!0,O=ja,H=da;B()};var ca=function(ia,
ma,aa){ia.attachEvent?ia.attachEvent("on"+ma,aa):ia.addEventListener(ma,aa)};ca(l,"scroll",f);ca(A,"scroll",f)}var K=function(){GraphViewer.resizeSensorEnabled&&n()};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;K();S=null;G=!1},200))})).observe(g)}else{var L=Object.prototype.toString.call(g),R="[object Array]"===L||"[object NodeList]"===L||"[object HTMLCollection]"===
L||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){L=0;for(var V=g.length;L<V;L++)E(g[L],K)}else E(g,K);this.detach=function(){if(R)for(var d=0,f=g.length;d<f;d++)e.detach(g[d]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
var mxClient={VERSION:"21.6.2",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=
new mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled()&&(this.delayedSelection?this.cell=a:this.start(a,b.getX(),b.getY()),
this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)))};mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
		div.innerHTML = html;
/**
 * Copyright (c) 2006-2015, JGraph Ltd
 * Copyright (c) 2006-2015, Gaudenz Alder
 */
/**
 * Voice plugin for draw.io
 * 
 * Documentation:
 * 
 * https://www.drawio.com/doc/faq/voice-plugin
 * 
 * TODO: Use grammer https://msdn.microsoft.com/en-us/library/ee800145.aspx
 */
Draw.loadPlugin(function(ui) {
	// Speech recognition never supported without synthesis 
	if (!('speechSynthesis' in window))
	{
		ui.showError('Error', 'Speech output not supported in this browser.', 'OK');
		
		return;
	}
	else
	{
		// Triggers loading of voices
		speechSynthesis.getVoices();
	}
	
	// Do no use in chromeless mode
	if (ui.editor.isChromelessView())
	{
		return;
	}

	// Mic PNG image
	var outputImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBNDU1RDkxODcxREIxMUU0OTU3Qjg3REYyOTYxQzc0QiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBNDU1RDkxOTcxREIxMUU0OTU3Qjg3REYyOTYxQzc0QiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE0NTVEOTE2NzFEQjExRTQ5NTdCODdERjI5NjFDNzRCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE0NTVEOTE3NzFEQjExRTQ5NTdCODdERjI5NjFDNzRCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+QsVUnQAAAX5JREFUeNqck00oRFEUx+eNyYSFUj7KgpfPBUlJWZgFw3IWihpRFpZia4e1hZSlNDsLopSNfBTFQqSwkKmZ5SA2ylfq+Z3pXL15ehlu/fqf9849555777mW4ziBfEZ9rd2InEEsmU4dmP/WHxKEkT1oglaSZOR/0DvRssIVUOQKjEASsxoGoQDmjT/oDUaOdRUzbkASrsMdzMIwSe2cBASXIjtQpyvHYQvzGeLQDkOwDG8w8p2A4GJEJre5Vk5DFBbZ7yG6D+PYL3oW0WwCgh/Re4i4t8PEE2QOxqikDN2AbuwQKr4WU4E4S3wOfw1CWtktFEI5ZDTu5y34DMvPIQl24dTHL9f2CRfQAB/wAFXwlE3gOO990Im95GmcLmQGEpyHTB6AI2xJKL4r7xYmYdX1betpT0kzoT1yhdhyY71aeW4rcyNySJswTVWXWkklcq5N1AETsCAuqkn9+hZ09RXoh1e4hm2CR//7mJqlB8xjCgXyHzXaDzETLONLgAEAxwd5e6Mz+S4AAAAASUVORK5CYII=';
	var micImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA5UlEQVR4Xr3SMYrCQBTGcSfIQiAgRIS9hOANBCurPUAuIAp7A7FVsFkIbLGYA9gKtoKNYG3jll5AFNKG518YMD6SISD4wY9J4MvkMYwRkZqOMSZkifGFe1b4pnvW3TqK8oMo14twxUgXPRSlDxU7TcUNPqATlG7wCi93cA2Iq2x7l7IJsgofB6UTiEjKklFqsabQSdFA5jqDAzrYQGeNNv5d9yDBEAME6NreFmP8Yuma4A8hFpiLSFNAYYYYn0jwCIUnxMcER4h1whS+7hseXKcu9ifGeQ+qeO8GjN7DPve+Q6+oewPhmE63Qfsb6AAAAABJRU5ErkJggg==';
	
	// True if we're on ChromOs
	var chromeOs = mxClient.IS_CHROMEOS;
	
	// Maximum length of message to speak
	var maxMessageLength = 1000;

	// Maximum length of the label before the cell
	// is called by its shapename
	var maxLabelLength = 15;

	// Maximum length of output queue.
	var maxQueueLength = 3;

	// Specifies if speech output is enabled.
	var speechOutputEnabled = true;

	// Specifies if speech output is enabled.
	var speechInputEnabled = true;
	
	// Last message is never repeated
	var lastMessage = null;
	
	// Timestamp of last message
	var lastMessageTimestamp = null;
	
	// Sets global recognition language
	var lang = 'en-US';
	
	// Caches action names
	var actions = null;
	var actionList = null;
	
	// Caches shape names
	var shapeList = null;
	
	// Last inserted cell
	var lastInserted = null;
	
	// Current voice
	var currentVoice = 10;
	
	// Current recognition thread
	var recognizing = null;

	// Adds menu
	mxResources.parse('voiceType=Voice Type');
	mxResources.parse('speechOutput=Speech Output');
	mxResources.parse('speechListen=Listen');
	mxResources.parse('speechInstalled=Start with draw.io');
	mxResources.parse('speechListenContinuous=Start/Stop Listen');
	mxResources.parse('speechHint=Hint');
	mxResources.parse('speechHelp=Help');
	mxResources.parse('speechQuit=Quit');
	
	// Installs footer click handler
	function getOrCreateVoiceButton(ui)
	{
		if (ui.voiceButton == null)
		{
			ui.voiceButton = document.createElement('div');
			ui.voiceButton.className = 'geBtn';
			ui.voiceButton.style.width = '140px';
			ui.voiceButton.style.minWidth = '140px';
			ui.voiceButton.style.textOverflow = 'ellipsis';
			ui.voiceButton.style.overflowX = 'hidden';
			ui.voiceButton.style.fontWeight = 'bold';
			ui.voiceButton.style.textAlign = 'center';
			ui.voiceButton.style.display = 'inline-block';
			ui.voiceButton.style.padding = '0 10px 0 10px';
			ui.voiceButton.style.marginTop = '-4px';
			ui.voiceButton.style.height = '28px';
			ui.voiceButton.style.lineHeight = '28px';
			ui.voiceButton.style.color = '#235695';
			
			if (ui.buttonContainer.firstChild != null)
			{
				ui.buttonContainer.insertBefore(ui.voiceButton, ui.buttonContainer.firstChild);
			}
			else
			{
				ui.buttonContainer.appendChild(ui.voiceButton);
			}
		}
		
		return ui.voiceButton;
	};
	
	var td = getOrCreateVoiceButton(ui);
	
	if (td != null)
	{
		mxEvent.addGestureListeners(td, function(evt)
		{
			ui.editor.graph.popupMenuHandler.hideMenu();
			
			if (ui.menubar == null && mxEvent.isPopupTrigger(evt))
			{
				ui.editor.graph.popupMenuHandler.hideMenu();
				var menu = new mxPopupMenu(ui.menus.get('voice').funct);
				menu.div.className += ' geMenubarMenu';
				menu.smartSeparators = true;
				menu.showDisabled = true;
				menu.autoExpand = true;
				
				// Disables autoexpand and destroys menu when hidden
				menu.hideMenu = mxUtils.bind(this, function()
				{
					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
					menu.destroy();
				});
		
				var offset = mxUtils.getOffset(td);
				menu.popup(offset.x, offset.y + td.offsetHeight, null, evt);
				
				// Allows hiding by clicking on document
				ui.setCurrentMenu(menu);
				mxEvent.consume(evt);
			}
		}, null, function(evt)
		{
			if (!mxEvent.isPopupTrigger(evt))
			{
				if (speechSynthesis.speaking)
				{
					speechSynthesis.cancel();
				}
				
				App.listen(true);
			}

			mxEvent.consume(evt);
		});
		
		mxEvent.disableContextMenu(td);
	}
	
	function setPluginInstalled(value)
	{
		if (mxSettings != null)
		{
	    	var plugins = mxSettings.getPlugins();
	    	var installed = mxUtils.indexOf(plugins, '/plugins/voice.js') >= 0;
	    	
	    	if (value != installed)
	    	{
		    	if (installed)
		    	{
		    		mxUtils.remove('/plugins/voice.js', plugins);
		    	}
		    	else
		    	{
		    		plugins.push('/plugins/voice.js');
		    	}
		    	
				mxSettings.setPlugins(plugins);
				mxSettings.save();
	    	}
		}
	};
	
	// Shows initial status message if only output is enable
	if (!('webkitSpeechRecognition' in window))
	{
		if (td != null)
		{
			td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + outputImage + '"/> Ready';
			td.style.color = '#235695';
		}
	}
	
	function updateStatusMessage()
	{
		if ('webkitSpeechRecognition' in window)
		{
			if (td != null)
			{
				if (recognizing != null)
				{
	    			td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + micImage + '"/> Listening...';
					td.setAttribute('title', 'Click to Stop (' + Editor.ctrlKey + '+O)');
	    			td.style.color = 'darkGray';
				}
				else
				{
					td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + micImage + '"/> Click to Speak';
					td.setAttribute('title', 'Click to Speak (' + Editor.ctrlKey + '+O)');
					td.style.color = '#235695';
				}
			}
		}
	};
	
	updateStatusMessage();
	
    var action = ui.actions.addAction('speechOutput', function()
    {
    	speechOutputEnabled = !speechOutputEnabled;
    }, null, null, 'Ctrl/AltGr+Shift+Esc');
	action.setToggleAction(true);
	action.setSelectedCallback(function() { return speechOutputEnabled; });
	
    var action = ui.actions.addAction('speechInstalled', function()
    {
    	setPluginInstalled();
    });
	action.setToggleAction(true);
	action.setSelectedCallback(function() { return mxUtils.indexOf(mxSettings.getPlugins(), '/plugins/voice.js') >= 0; });
	
    ui.actions.addAction('speechListen', function()
    {
    	App.listen();
    }, null, null, 'Ctrl/AltGr+Esc');
	
    ui.actions.addAction('speechListenContinuous', function()
    {
    	App.listen(true);
    }, null, null, Editor.ctrlKey + '+O');
	
    ui.actions.addAction('speechHint', function()
    {
    	App.sayHint();
    }, null, null, 'Shift+Esc');
	
    ui.actions.addAction('speechHelp', function()
    {
    	window.open('https://www.drawio.com/doc/faq/voice-plugin');
    });

    // Hijacks the settings for storing current voice
	if (mxSettings != null)
	{
	    var tmp = mxSettings.settings.voice;
	    
	    if (tmp != null)
	    {
	    	currentVoice = parseInt(tmp);
	    }
	}
    
	ui.menus.put('voiceType', new Menu(mxUtils.bind(this, function(menu, parent)
	{
		var voices = speechSynthesis.getVoices();
		
		if (voices.length == 0)
		{
			menu.addItem('Loading...', null, function() {}, parent, null, false);
		}
		else
		{
			for (var i = 0; i < voices.length; i++)
			{
				(function(index)
				{
					var item = menu.addItem(voices[index].name + ' (' + voices[i].lang + ')', null, function()
					{
						currentVoice = index;
						App.say('hello');
					    
						if (mxSettings != null)
						{
							mxSettings.settings.voice = currentVoice;
							mxSettings.save();
						}
					}, parent);
					
					if (index == currentVoice)
					{
						menu.addCheckmark(item, Editor.checkmarkImage);
					}
				})(i);
			}
			
			parent.div.style.overflowX = 'hidden';
			parent.div.style.overflowY = 'auto';
			parent.div.style.maxHeight = '100%';
			// Workaround for document scrollbars with 100% max height in Chrome
			parent.div.style.marginBottom = '-20px';
		}
	})));
	
    ui.actions.addAction('speechQuit', function()
    {
    	// Hides UI
    	speechOutputEnabled = false;
    	td.style.display = 'none';
    	
    	if (menu != null)
    	{
    		menu.style.display = 'none';
    	}
    });
    
	ui.menus.put('voice', new Menu(function(menu, parent)
	{
    	ui.menus.addSubmenu('voiceType', menu, parent);
		ui.menus.addMenuItems(menu, ['-', 'speechOutput', 'speechHint', '-', 'speechListen',
            'speechListenContinuous', '-', 'speechInstalled',
            'speechHelp', '-', 'speechQuit']);
	}));

    if (ui.menubar != null)
    {
		var menu = ui.menubar.addMenu('Voice', ui.menus.get('voice').funct);
		
		// Inserts voice menu before help menu
		menu.parentNode.insertBefore(menu, menu.previousSibling.previousSibling.previousSibling);
    }
		
	function insertShape(shape, done)
	{
		var searchTerm = mxUtils.trim(shape);
		
		ui.sidebar.searchEntries(searchTerm, 1, 0, function(results, len, more)
		{
			if (results.length > 0)
			{
				var elt = results[0]();
				
				// Click is blocked, must use mousedown/-up sequence
				// LATER: Use touchstart or pointerEvents depending on system
				dispatchEvent(elt, mouseEvent('mousedown', 1, 50, 1, 50));
				dispatchEvent(document.body, mouseEvent('mouseup', 1, 50, 1, 50));
			}
			else
			{
				App.say('{1} not found', [searchTerm]);
			}
			
			if (done != null)
			{
				done();
			}
		});
	};
	
	// http://stackoverflow.com/questions/11919065/sort-an-array-by-the-levenshtein-distance-with-best-performance-in-javascript
	//http://www.merriampark.com/ld.htm, http://www.mgilleland.com/ld/ldjavascript.htm, Damerau–Levenshtein distance (Wikipedia)
	var levenshteinDist = function(s, t) {
	    var d = []; //2d matrix

	    // Step 1
	    var n = s.length;
	    var m = t.length;

	    if (n == 0) return m;
	    if (m == 0) return n;

	    //Create an array of arrays in javascript (a descending loop is quicker)
	    for (var i = n; i >= 0; i--) d[i] = [];

	    // Step 2
	    for (var i = n; i >= 0; i--) d[i][0] = i;
	    for (var j = m; j >= 0; j--) d[0][j] = j;

	    // Step 3
	    for (var i = 1; i <= n; i++) {
	        var s_i = s.charAt(i - 1);

	        // Step 4
	        for (var j = 1; j <= m; j++) {

	            //Check the jagged ld total so far
	            if (i == j && d[i][j] > 4) return n;

	            var t_j = t.charAt(j - 1);
	            var cost = (s_i == t_j) ? 0 : 1; // Step 5

	            //Calculate the minimum
	            var mi = d[i - 1][j] + 1;
	            var b = d[i][j - 1] + 1;
	            var c = d[i - 1][j - 1] + cost;

	            if (b < mi) mi = b;
	            if (c < mi) mi = c;

	            d[i][j] = mi; // Step 6

	            //Damerau transposition
	            if (i > 1 && j > 1 && s_i == t.charAt(j - 2) && s.charAt(i - 2) == t_j) {
	                d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
	            }
	        }
	    }

	    // Step 7
	    return d[n][m];
	}
	
	function naiveHammingDistance(str1, str2) {
	    var dist = 0;

	    str1 = str1.toLowerCase();
	    str2 = str2.toLowerCase();

	     for(var i = 0; i < str1.length; i++)
	     {
	        if (str2[i] && str2[i] !== str1[i])
	        {
	            dist += Math.abs(str1.charCodeAt(i) - str2.charCodeAt(i)) + Math.abs(str2.indexOf( str1[i] )) * 2;
	        } 
	        else if (!str2[i])
	        {
	            //  If there's no letter in the comparing string
	            dist += dist;
	        }
	    }

	    return dist;
	};
	
	function getBestWord(str1, words, useLevenshteinDist)
	{
		if (words == null || words.length == 0)
		{
			return str1;
		}
		
		useLevenshteinDist = (useLevenshteinDist != null) ? useLevenshteinDist : true;
		
	    var bestWord = words[0];
	    var minDist = ((useLevenshteinDist) ? levenshteinDist(str1, bestWord) :
	    		naiveHammingDistance(str1, bestWord));
	    
	    for (var i = 1; i < words.length; i++)
	    {
		    	var tmp = ((useLevenshteinDist) ? levenshteinDist(str1, words[i]) :
		    		((str1 == words[i]) ? 0 : naiveHammingDistance(str1, words[i])));
		    	
		    	if (tmp < minDist || (tmp == minDist &&
		    		str1.length > bestWord.length &&
		    		bestWord.length < words[i].length))
		    	{
		    		bestWord = words[i];
		    		minDist = tmp;
		    	}
		    	
		    	if (bestWord == str1)
		    	{
		    		break;
		    	}
	    }
	    
	    return bestWord;
	}
	
	function mouseEvent(type, sx, sy, cx, cy, shift)
	{
	  var evt;
	  var e = {
	    bubbles: true,
	    cancelable: (type != "mousemove"),
	    view: window,
	    detail: 0,
	    screenX: sx, 
	    screenY: sy,
	    clientX: cx, 
	    clientY: cy,
	    ctrlKey: false,
	    altKey: false,
	    shiftKey: (shift != null) ? shift : false,
	    metaKey: false,
	    button: 0,
	    relatedTarget: undefined
	  };
	  
	  if (typeof( document.createEvent ) == "function")
	  {
	    evt = document.createEvent("MouseEvents");
	    evt.initMouseEvent(type, 
	      e.bubbles, e.cancelable, e.view, e.detail,
	      e.screenX, e.screenY, e.clientX, e.clientY,
	      e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
	      e.button, document.body.parentNode);
	  }
	  else if (document.createEventObject)
	  {
	    evt = document.createEventObject();
	    for (prop in e)
	    {
	    	evt[prop] = e[prop];
	    }
	  
	    evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;
	  }
	  
	  return evt;
	};
	
	function dispatchEvent (el, evt)
	{
	  if (el.dispatchEvent)
	  {
	    el.dispatchEvent(evt);
	  }
	  else if (el.fireEvent)
	  {
	    el.fireEvent('on' + type, evt);
	  }
	  
	  return evt;
	};
	
	var keyHandlerEscape = ui.keyHandler.escape;
	ui.keyHandler.escape = function(evt)
	{
		if ((!mxClient.IS_MAC && mxEvent.isAltDown(evt)) ||
			((mxClient.IS_MAC || chromeOs) && mxEvent.isControlDown(evt)))
		{
			if (speechOutputEnabled)
			{
				App.say('Speech output disabled');
			}
			
			speechOutputEnabled = !speechOutputEnabled;
			
			if (speechOutputEnabled)
			{
				App.say('Speech output enabled');
			}
			
			mxEvent.consume(evt);
		}
		else if (mxEvent.isShiftDown(evt))
		{
			App.sayHint();
			mxEvent.consume(evt);
		}
		else
		{
			keyHandlerEscape.apply(this, arguments);
		}
	};

	ui.keyHandler.bindAction(32, true, 'speechListen'); // Ctrl+SPACE
	ui.keyHandler.bindAction(79, true, 'speechListenContinuous'); // Ctrl+O
	
	/**
	 * Plays a beep.
	 */
	var beep = new Audio('data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANmRwlVJ3/6jYDAmxaiDG3/6xjQQCCKkRb/6kg/wW+kSJ5//rLobkLSiKmqP/0ikJuDaSaSf/6JiLYLEYnW/+kXg1WRVJL/9EmQ1YZIsv/6Qzwy5qk7/+tEU0nkls3/zIUMPKNX/6yZLf+kFgAfgGyLFAUwY//uQZAUABcd5UiNPVXAAAApAAAAAE0VZQKw9ISAAACgAAAAAVQIygIElVrFkBS+Jhi+EAuu+lKAkYUEIsmEAEoMeDmCETMvfSHTGkF5RWH7kz/ESHWPAq/kcCRhqBtMdokPdM7vil7RG98A2sc7zO6ZvTdM7pmOUAZTnJW+NXxqmd41dqJ6mLTXxrPpnV8avaIf5SvL7pndPvPpndJR9Kuu8fePvuiuhorgWjp7Mf/PRjxcFCPDkW31srioCExivv9lcwKEaHsf/7ow2Fl1T/9RkXgEhYElAoCLFtMArxwivDJJ+bR1HTKJdlEoTELCIqgEwVGSQ+hIm0NbK8WXcTEI0UPoa2NbG4y2K00JEWbZavJXkYaqo9CRHS55FcZTjKEk3NKoCYUnSQ0rWxrZbFKbKIhOKPZe1cJKzZSaQrIyULHDZmV5K4xySsDRKWOruanGtjLJXFEmwaIbDLX0hIPBUQPVFVkQkDoUNfSoDgQGKPekoxeGzA4DUvnn4bxzcZrtJyipKfPNy5w+9lnXwgqsiyHNeSVpemw4bWb9psYeq//uQZBoABQt4yMVxYAIAAAkQoAAAHvYpL5m6AAgAACXDAAAAD59jblTirQe9upFsmZbpMudy7Lz1X1DYsxOOSWpfPqNX2WqktK0DMvuGwlbNj44TleLPQ+Gsfb+GOWOKJoIrWb3cIMeeON6lz2umTqMXV8Mj30yWPpjoSa9ujK8SyeJP5y5mOW1D6hvLepeveEAEDo0mgCRClOEgANv3B9a6fikgUSu/DmAMATrGx7nng5p5iimPNZsfQLYB2sDLIkzRKZOHGAaUyDcpFBSLG9MCQALgAIgQs2YunOszLSAyQYPVC2YdGGeHD2dTdJk1pAHGAWDjnkcLKFymS3RQZTInzySoBwMG0QueC3gMsCEYxUqlrcxK6k1LQQcsmyYeQPdC2YfuGPASCBkcVMQQqpVJshui1tkXQJQV0OXGAZMXSOEEBRirXbVRQW7ugq7IM7rPWSZyDlM3IuNEkxzCOJ0ny2ThNkyRai1b6ev//3dzNGzNb//4uAvHT5sURcZCFcuKLhOFs8mLAAEAt4UWAAIABAAAAAB4qbHo0tIjVkUU//uQZAwABfSFz3ZqQAAAAAngwAAAE1HjMp2qAAAAACZDgAAAD5UkTE1UgZEUExqYynN1qZvqIOREEFmBcJQkwdxiFtw0qEOkGYfRDifBui9MQg4QAHAqWtAWHoCxu1Yf4VfWLPIM2mHDFsbQEVGwyqQoQcwnfHeIkNt9YnkiaS1oizycqJrx4KOQjahZxWbcZgztj2c49nKmkId44S71j0c8eV9yDK6uPRzx5X18eDvjvQ6yKo9ZSS6l//8elePK/Lf//IInrOF/FvDoADYAGBMGb7FtErm5MXMlmPAJQVgWta7Zx2go+8xJ0UiCb8LHHdftWyLJE0QIAIsI+UbXu67dZMjmgDGCGl1H+vpF4NSDckSIkk7Vd+sxEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=');
	var beep2 = new Audio('data:audio/wav;base64,UklGRg8VAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YesUAAAAAAAAAAAAAAAAAAAAAAAAAAA1/0/+xP05/Vr8jfoy9uT0gvWY96/4xfnc+vP7jv0w/yoBnQSUBiII4wlrEPsT8BVkF3kTTxAhDvQLxgigBegCLwCQ+8z2QvRZ8+vwMO0D6/LpMOuG77Pxy/QZ+HX6+fyvAEIFbwevCrUObRNbFkIZABvTGAgWIRMOEFcL7AcUBVwC2/zR+Or1A/NQ7jTqTedm5ILlaehQ6zfuh/J99zX6E/0fAaAGhwluDCsQ+RUjGQoc1R16GUAWexJyDYsKowftA/L9r/rg98L09O5T62zoheUP5ErlMegY637w5vTI94H6dv9BBCgHPAqADh0TBBbrGCkbRRxeGXcWoRLTDMIJ2wZpA5z9J/pA9zv0J++L623ozOSA5BLmculA737yLvUs+Cj+IgL9BLUH3Qz/EOYTzRboG2QefRuWGN8TyA7hC/oIvQRt/4b8wfkQ9p/wqu3D6mDnTOLz49rm+uls7xDz9/Xe+In+qwKSBXkIdA3HEa4UlRd6G5wdtRocFRoRgA6ZC2QGywHj/s37C/dK8r/v4ex06GXjq+K85MXoie4T8djzcfcR/UwAMwNvBg8MqA+PEnYVOxuAHdQc7RmMFEsQuA3QCtMFAgEc/jX7nPZ68fDuGezk547iSOOH52vsUu+L8cD1B/vu/dQA9wSiCokNcBAvFP0ZJh25HZcbyRU9EnsP4AxAB2EDegCU/UP4BvQf8TjuIelq5IPh8+IY5zPsGu8B8jr2lPuq/p0BiAVWC1IOyhDAE44Z7hwqHEMXXBR1EdkNxQjABdkCZf+X+SX2PvMt8F/qieai47vg2uUV6vzs4+8T9Z75WPw//+wDzAizC0cOghLoF88ath1EHXsXlBStEQwOPgggBToC1f4H+V31uPKL8M7qwOaq5GTl9ufd6v/tcPMS9/n54PyNAq0GlAl7DHkRyRWwGJcbgBuaGbMWzBN9D3UKYAdvBFEApPrs9xT1dPED7N/o+OXU4wHmvuil65buB/S994H6aP0GA3UHXApDDRASkRZ5GWAcuBvRGOoV1xCcDLUJzgbPAQH9Gvoz987y5e3+6hfohOW445/mhukf7TPyO/U9+NL7oAEXBeoHygqYEHMUWhdBGtQb8BoJGCIVPxDUC+4INQZ+AXn8kvmB9jbyHe026h3lDeKA42jmkOsI8TbzBPZV+tL/uAKfBYwJWg+fEaoUxRiTHg8dKBoCFzQR9g2MC6UI0AKY/rr7AfnE8zvvVOxt6YzkYuFJ5DDnrev+8OXzzPbS+lkAQAMJBoMJ9A4cEgMVVRgjHkcdQBl5E5EQqg0HCjkE9QAP/tD6AvXk8XPvjOwT5p/iKuIR5XDqs+5G8S30KPn7/eEA9QOECIQNDhDlEhgXmRwNHn4crxjhEskP4gx/Cd8DbQCH/YL64vRQ8avuxOs55h7jZOMy6cDsg+8c8ur33fvE/qoBIgd4C1MO3RDaFZQaex2AHe0ZzxToEVEPNAuzBcwC5v/9+y/2MfOA8EXtd+cV5NXi9ePD6YntUvDc8k/4ZfxM/zICTQfAC6cOjhFrFlwbQx6AGu4WBxQgETsM0gfrBAQCO/02+E/1aPIy7hrpM+ZM43Djg+hq61HuwvHW9gb67fwnAPUFoQmIDG8PLRU9GSQcCx+aGiYWPhNXEKMLGQdgBHsBBf3u9wf1IPLy7VLoa+WA5GTlS+gy67LvAPXn96n6vf6bBIIHaQrtDQITHxYGGYAbgBu1GF0VbxJbDagJwQbaA2j+Dfom9z/0L+9x6orno+Rj5CzmE+n660LwxPV9+Ff7O/8IBd4HsgofDpAT5xZ1GkoeYxt8GKoU3A7HC/oIsgXl/0b8RflE9i/xkO2p6sLnMeQO5PXm3Om97irzEfb4+L39xQKsBZMIxQzhEcgUrxeWGn0dmxq0FzAUvw5/C4EIJwWI/+P7/PgV9rbwx+xA6XLjHOPW5Pnnx+1K8fLz2faA/IwAVgNrBmsLcg+pEZAUbxkQHZ0b0xhXFCMP9gw2CkUG6gAy/lv7tfcV8o3v/+yw6eHjKeSe5onp+u6Z8iP1rfcQ/VcBEATJBoML6Q9zEnsXQBsCHdUalRVPEcUOOgyfBxcDXgCm/Vv5bPSF8eruP+tQ5mnjf+RM6Bruh/Ab82z2r/vs/qMBdgS5CS4NuA9DEsIXRBsQHCkZlBSkEHQOjQslB4sC0/8b/Rv5L/Sl8fDss+iG5hDlneda7PvvDvJu9Ub6//yW/+8C1AdzCv0M/A+0FOkX1BkeGgoVehHODqEM5AdSBMgBPv/O+hL34PRW8pTupuq/5yvo2Oro7nLxtPPV9lD7q/0GAPgCgQdDCrsNyhH4EyUWZxaAE1IRJQ9wDBUInQVwAwEBefzL+bz3jvX38TTvB+3Z6vHsV+8w8V3z0vY3+mX8kv7iAaIFoQfGCW0MoQ/OEfsTnhS3EXwPTw3bCgwHrAStApwAoPzx+Zj3VPQL8g7wZu6s7SvvWPGJ8yr3iPlC+0H9rABmAzcFBwfrCcoM9w7JEIARABHTDvUMdQpYB7YF8wOGAeb9A/xO+lf4E/UB84TxgPCA8MHxdfPo9A74afoL/K39wQBwAxIFtAZNCQUM1Q2mD+sPuA7oDEAK2gc4BpYEBgJT/7H9OPwI+lH33fUk9FTyg/CV8R7zMfUY+MD5SvsS/SYADQKAA/QEdQdbCc4KQgwDDlYO4gxvCxgJyAZUBeEDtQE7/8f9VPxo+u33efZK9IDygPKA85L1LvhE+aT6m/xL/70AEwKwAzoGeQe/CFkK4wyADfIMfQvzCDQH7wWqBEsCSQDc/pf9Qfsd+Qf4lfZ69JXy8vI69C/2nfji+Sf75/yg//UAOgLJA4EG5AeeCRcMig2ADTgMrgknCOYGiAXPAj0B+f+m/u77Kvrl+KD3ifW986nywPP09e33BflK+l38lP7Z/x0BBQNnBawGzwdtCfcLbg0dDWkL3wiSB2UGAQV2AtYAkv9N/s/7A/p6+PD1mvSD86/yOfUC90r4Mvmi+3b9xP42AIoCigTNBeMG0wjrCl8MKQ3yC1QJPQgnB44FOAPzAa4AIP/E/GD7G/q3+Ir26fTe84HzCfat98T42vkx/Af+I/9nAJkCoQS4BQoIpQnQCkMMlguACmEJ7gf4BRYE0QK4Ac//g/09/Pj6Ovnx9tr1xPRU9Gv1gfax9yT5gPsA/Ub+k//uAZQD2QQeBgoIkAm0CicMZAvxCX4IlgfEBa4DaQJNAZb/W/0W/Cb6TPgH9+/1EPW/9Nb1O/fw+N76I/xH/cr+JQF2ArsDJgUlB7EI+wkGC2ILwAqpCZMITQalBIcDQgIeAEz+M/3u+w/6Mfgb97D1MvWq9cH22PdK+Ub7i/yy/R3/eAG1AlgEXQZFB5UITQp6DGsLVQryCJYGUQU6BAMDpwA3/yH+Cv26+jj5Rvgw9zH1f/SV9az2pfiZ+rD7x/yU/rMAygHgAm4EjQakB7sICArYCwAL6gmfCEQG5gTPA7IChAAM/6v9fftI+kn5NvgI9jr1avWA9n/47vkE+xv8I/7I/94A9QHXA6IFuQaiB0wJFAtxC5UK/gjoBtEFuwRJAxsB+P/h/pX9Z/sd+gf53/ey9QD1VfVs9oT4Gfow+0b8Of7z/xMBQAO2BM0F5AahCBEK8gqVCtUIJgc9BlUFoAPFAd0Azf8s/iX8Pfsy+rb4ifbK9bn1dfZ0+Ib5hPq1++L9J/8eADQBVgPGBLgFzwZ/CPwJ8wo5Cr8IKAcSBicFigOWAa4Aov8V/vT73vpL+bD3mvaD9Sn2JPgM+fT5S/tG/Vz+Vf+GAIQCtgO1BLsFiwfQCOcJ/grWCI0HvQanBcgDUAJjAUwAjv7w/Aj88/pu+cX3r/bm9X/2j/hJ+UT6pfuk/Zz+nv/fAN4C+wNcBUwHNAg8CeQJhwmACIIHZQY4BAkDDgLyACP/6v31/N77IfrJ+Nr3xPYO99n3wfjY+WP7+vzi/cr+OgAaAgIDDARlBTUHIwjvCFYJnQi8B9MG1wUGBNsC4wHNAAb/u/2c/J36gvmv+O/32PY/9zn48/iw+hr8KP0R/tb/YAFIAjADsgROBmUHJwiwCOQIKghNBwoGPQRUA2wCSAF5/3X+jP2I/Lj6lPm9+AP4pffy97b4nvlN+6/8l/1//g0AjwF3Aj4EhwVvBlgHAAmsCesI1QdeBvYEDgQmA7wBFQAu/0b++/w2+036ZflH+KX2Kvf99wn52fr1+938yv1s/5UAfQFlAvIDNgUeBgYHeggXCQAIdQcgBogEnwPfAp8B6P8A/5D9L/xH+4z6SPnY9x/3nPfW+JD6Sfsk/Ff9KP8bAOkA2AGoA5YEZAVXBvkHvgjICA4IfgZBBWEEpwMSAqAAu/8B/5H9AfwY+1r6QPnz95f3Mvhh+QL7u/uS/Kn9S/8hAE4B2gLDA4gElgU4ByMIgAghCIAGogXoBBoEeAJaAXIAi//x/dX8G/xi++n5rvgA+AD4IPl6+jT77fso/an+kf9UAG8BCQPxA7sEtgVYBygITgjBBx8GMAV2BLkDFwIJARMAcv6d/eP8Evyf+pP5vPgC+BX5D/rs+qb7//wZ/tj+wP8MAU8COAPzAxoFZgYgBwEI7AeuBsYF/gQJBJYCpQHXAPz/iP6F/bH87vt6+mT5mPgM+Cr5PfoX+6L7B/1e/kr/vAC4AXECKwNhBF8FGAbSBgAHuQYABkYFGATSAhgCXwFKAOz+Mv55/X38CvtL+pL5C/k5+d35lvpg+9P8xP19/jf/oACqAWMCHQNvBJEFSwYEBwAHhwbNBRQF9AOgAuYBmgB0/7r+AP7N/I370/oZ+kf5qfi/+Y/6fvvC/Hz9Nv4T/1cAIgHcAaYC6wPJBIMFPQb2Bs8GFQZbBSsEKANuArQBlwCC/8j+Dv4E/dv7Iftn+sL5TfkH+sH6pvvr/K79tf7i/5oAVAFJAogDQQT7BN0FIgcVB50GxwVTBHADyAI5AvQACABc/9H+of2i/O/7Y/tN+qP5APqL+on7ovwt/eD93f4TAMwAZQEwAnUDBgStBIUFygaLBgAGZgUhBD0DkwIHAs0A1/8E/779EP1w/K/7avqi+Wr59fkr+yX81/xi/X/+jP9DAM8AtQGlAjED5gPPBNMFXgYWBkQF/wN0A+gCLwLqAEYAvP8c/9f9Gv2P/AT88Pot+ur5o/qs+4H8Ef3L/cb+r/85AHUBUALbAmYDigR9BQIGMQaBBZUECgRTA2YCaAHcACwATf87/rD9Jf1l/CD7g/oo+jD6dftP/Pf8hP2b/ln/5P9vAHQBRQLQAlwDTwQyBb4FwAUWBR8ElAMJAzsCMgGnALj/0f5G/rr93vzk+1j7zfrU+ov7Fvyh/Fj9b/4D/47/MgBJAe8BewIKA/MDnQQ1Be8FLAV1BOoDXgNnAogB/ABxAKv/2/5Q/sX9Cv0u/KP7GPsY+wD8i/z6/IT9mv4R/8f/zgBaAcMBYQJ4AwcEdwTKBPgEiwQABG0DhALeAVIBxwDl/zH/pv4b/kT9hPz7+577gPuc+/n7gfw//Rj+o/4u/+D/xABPAbwBPwIoA7wDMASABIAEFQScAz4DVgKoAQUBHQCw/zz/pv69/Tz9zvxD/Ir7lfsV/HL8Rf0C/on+5v6m/24A+QBYAQYC2wJnA8wDUgT2BGsEAAR4A48C/gGMARcBLwCR/xr/t/7P/ST9pvxJ/ML7svsV/KH8dP03/sP+ff8YAJgA9ACjAS4CkQIcA8oDQARABOMDMQNqAg0CsAEnAXIA5/99//H+CP6n/Ur92vwg/AD8K/yS/Hr9Af5e/rv+m/80AJEA7gC7AWcCxAIhA9wDcgRDBOoDQwNxAhQCSgGaAD0A4f9I/6j+S/7u/WH9tPxX/GT8x/yA/d39Ov6u/mj/0f8tAJQATgHDASACfQI1A7cD9QPHA/wCVQL8Ac0BPAGhAEQA6P9W/6/+Uv71/W/9u/xe/ID8+fyz/Rb+pv5Q/63/CQCMAEMBoAH8AXMCLQOTA9gD5QMrA7gCSgK+ATMBxQBoAAsAh/8S/7X+Wf7Z/V/9Av3T/DH9y/36/U/+2P6F/7P/AgB+ADgBbAG1ASUC3wImA1QDcwO5Al8CBQJMAekApgBeAKb/Nv/t/rj+//2D/TP9Bf0r/XL9z/0s/qz+Jf+C/9//WQDMAPoAUgHGAUUCdALFAt0CgAJRAgYCngETAdgAkwAxAKf/X/8g/8P+Ov7l/a39UP2O/ev9S/7X/iH/Xv+7/0MAmgDRAC4BsAEUAkQCoQLAArICgwIqArQBOAEKAbcARwC//5H/RP/0/sX+bf4p/gD+AP4k/lL+gf4M/17/jP+6/zkAlgDFAPMAZgHQAf4BLQJAAjUCBwLYAX8B+wDNAH4AIQDF/5T/MP+3/on+Wv4Y/sP98v0g/mv+9v4s/1r/mP8jAGQAkwDFAFABngHNAfsBUwJnAjkCCgKUAS0B/gChAEUA9f/G/5j/Uv/7/sz+nv5w/kH+bv6d/tb+M/9o/63/BAAyAGEAnwD8ACwBWwGTAfABAALrAbkBXAEfAfEAwgBoACYA+P/K/3b/Lf/+/tD+gv5A/kD+a/6y/gj/Nv9l/6b/AQAvAF0AjAC6AOkAFwFGAXQBgAFuAUABEQHjALQAhgBXACkA/P/N/5//cP9C/xP/5f7A/sD+Dv9A/0T/c//C/wAAAAArAHQAwADAAOUAKAGAAYABgAFkAQcBAAHmALAAUwBAACwA/v+h/4D/dP9F/0D/QP9A/0D/ZP+A/4H/r//e/wAAAAAoAFYAgACAAKIA0AD/AAAB4wDAAMAAmABqAEAAQAAeAPH/w//A/6b/gP+A/1r/QP9E/3L/gP+P/73/7P8AAAgANgBlAIAAgQCwAN4AAAEAAQAB5wDAAMAAnABtAEAAQAAiAAAAAAAAAOn/wP/A/8D/wP/A/8D/wP/L//r/AAAAAAQAMwBAAEAAQABsAIAAgACAAIAAgACAAIAAXwBAAEAAQAAlAAAAAAAAAO3/wP/A/8D/wP/A/8D/2f8AAAAAAAASAEAAQABAADMABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACM');

	App.beep = function(wav)
	{
		wav = (wav != null) ? wav : beep;
		
    	wav.play();
	};
	
	// Thread to reset the label
	var resetStatus = null;

	/**
	 * 
	 * Static method for speech output.
	 */
	App.say = function(message, params)
	{
		if ('speechSynthesis' in window && message != null)
		{
			var text = mxResources.replacePlaceholders(message, params || []);
			lastMessageTimestamp = null;
			lastMessage = text;
			
			if (text != null && text.length > 0)
			{
				if (td != null)
				{
					var tmp = text;
					
		    		// Capitalize string
		    		if (tmp != null && tmp.length > 1)
		    		{
		    			tmp = tmp.charAt(0).toUpperCase() + tmp.slice(1);
		    		}
		    		
					td.innerHTML = ((speechOutputEnabled) ? '<img style="margin-right:4px;" align="absmiddle" border="0" src="' +
							outputImage + '"/>' : '') + ' ' + tmp;
		    		td.style.color = '#235695';
					
					if (resetStatus != null)
					{
						window.clearTimeout(resetStatus);
						resetStatus = null;
					}
	
					resetStatus = window.setTimeout(function()
					{
						updateStatusMessage();
					}, (recognizing != null) ? 1000 : 3000);
				}
				
				// Workaround for talking too much
				if (speechOutputEnabled && (!speechSynthesis.speaking || !speechSynthesis.pending))
				{
					if (text.length < maxMessageLength)
					{
						var msg = new SpeechSynthesisUtterance();
	
						// Picks random voice with same main locale
						var voices = speechSynthesis.getVoices();
	
						// Say "again" for same last message except more than 10 secs ago or shorter than again
						if (lastMessageTimestamp != null && text == lastMessage && text != null &&
							text.length > 5 && lastMessage != 'again')
						{
							if (lastMessageTimestamp != null && 
								new Date().getTime() - lastMessageTimestamp.getTime() < 10000)
							{
								text = 'repeat';
							}
						}
	
						msg.voice = voices[currentVoice];
						msg.voiceURI = 'native';
						//msg.lang = lang;
						msg.text = text;
	
						console.log('App.say speak:', msg.text);
						speechSynthesis.speak(msg);
						
						lastMessageTimestamp = new Date();
					}
					else
					{
						console.log('App.say ignored:', text);
					}
				}
				else
				{
					console.log('App.say skipped:', message);
				}
			}
		}
	};

	/**
	 * Static method for speech output.
	 */
	App.listen = function(continuous)
	{
		if ('webkitSpeechRecognition' in window && speechInputEnabled)
		{
			if (recognizing != null)
			{
				recognizing.stop();
			}
			else
			{
				var recognition = new webkitSpeechRecognition();
				recognition.interimResults = true;
				
				// TODO: Should use grammar instead of trying more alternatives
				recognition.maxAlternatives = 5;
				
				recognition.lang = lang;
				
				if (continuous != null)
				{
					recognition.continuous = continuous;
				}
				
				recognition.onstart = function(event)
				{
					updateStatusMessage();
					App.beep();
				};
		    		
				recognition.onresult = function(event)
				{
				    for (var i = event.resultIndex; i < event.results.length; ++i)
				    {
			    		if (td != null)
			    		{
			    			td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + micImage +
			    				'"/> ' + event.results[i][0].transcript;
			    			td.style.color = (event.results[i].isFinal) ? '#235695' : 'darkGray';
			    		}
			    		
				    	if (event.results[i].isFinal)
				    	{
				    		var ok = false;
				    		
				    		for (var j = 0; j < event.results[i].length; j++)
				    		{
				    			if (App.executeVoiceCommand(event.results[i][j].transcript, recognition))
				    			{
				    				ok = true;
				    				break;
				    			}
				    		}
				    		
				    		if (!ok)
				    		{
								App.say('{1} not found', [event.results[i][0].transcript]);
				    		}

							if (td != null)
							{
								if (resetStatus != null)
								{
									window.clearTimeout(resetStatus);
									resetStatus = null;
								}

								resetStatus = window.setTimeout(function()
								{
									updateStatusMessage();
								}, 1000);
							}
				    	}
				    }
				};
	
				recognition.onend = function(event)
				{
					// Overrides footer
					recognizing = null;
					updateStatusMessage();
					App.beep(beep2);
				};
				
				recognition.start();
				recognizing = recognition;
			}
		}
		else
		{
			speechOutputEnabled = !speechOutputEnabled;
			lastMessageTimestamp = null;			
			App.say(lastMessage || 'Ready');
			lastMessageTimestamp = null;
		}
	};
	
	/**
	 * Executes the given voice command.
	 */
	App.executeVoiceCommand = function(command, recognition)
	{
	    console.log('App.execute:', mxUtils.trim(command));
	    var tokens = mxUtils.trim(command).split(' ');
	    
	    if (tokens.length > 0 && graph.isEnabled())
	    {
		    // Ask for Mic permissions
		    // FIXME: Dialog seems to be hidden until tab is changed
		    function resolveStylename(token, styles)
		    {
				var tmp = token.toLowerCase().replace(/ /g, '');
		    	var style = null;
		    	
		    	for (var i = 0; i < styles.length; i++)
		    	{
		    		if (styles[i].toLowerCase() == tmp)
		    		{
		    			style = styles[i];
		    			break;
		    		}
		    	}
		    	
		    	return style;
		    };
		    
		    // Main command
		    tokens[0] = tokens[0].toLowerCase();

		    // TODO: Use hamming distance for best match command but include all possible actions
		    // which might be too slow
		    // console.log('connect', naiveHammingDistance(tokens[0], 'connect'), naiveHammingDistance('disable', 'connect'), naiveHammingDistance('change', 'connect'));
		    
		    if (graph.isEditing())
		    {
		    	if (tokens.length == 1 && tokens[0] == 'apply')
			    {
		    		graph.stopEditing();
			    }
		    	else if (tokens.length == 1 && tokens[0] == 'undo')
			    {
		    		document.execCommand('undo', false, null);
			    }
		    	else if (tokens.length == 1 && tokens[0] == 'redo')
			    {
		    		document.execCommand('redo', false, null);
			    }
		    	else
		    	{
		    		document.execCommand('insertHTML', false, command);
		    	}
		    	
		    	return true;
		    }
		    else if (tokens[0] == 'edit' && tokens[1] == 'text')
		    {
				var cells = graph.getSelectionCells();
		    	
		    	if (cells.length == 1)
		    	{
		    		graph.startEditingAtCell(cells[0]);
		    	}
		    	
		    	return true;
		    }
		    else if (tokens[0] == 'hello' || tokens[0] == 'hi')
			{
				App.say('Hello! Try "Help", "Help Topic" or "Quick Start".');
				
		    	return true;
			}
			else if (tokens[0] == 'help')
			{
				var wnd = ui.openLink('https://www.drawio.com/doc/faq/voice-plugin');
				
				if (wnd == null)
				{
					App.say('Popup blocked');
				}
				else if (tokens.length > 1)
				{
					// Just used to check if popup windows are allowed
					wnd.close();
					var searchTerm = mxUtils.trim(command.substring(tokens[0].length));
					
					if (searchTerm !=  null && searchTerm.length > 0)
					{
						ui.openLink('https://www.google.com/search?q=site%3Adiagrams.net+inurl%3A%2Fdoc%2Ffaq%2F+' +
							encodeURIComponent(searchTerm));
						App.say(command);
					}
				}
				else
				{
					App.say('help');
				}
				
		    	return true;
			}
			else if ((tokens[0] == 'info' && tokens.length == 1) || mxUtils.trim(command).toLowerCase() == 'what\'s this')
			{
				App.sayHint();
				
		    	return true;
			}
			else if (tokens[0] == 'install' && tokens.length == 1)
			{
				setPluginInstalled(true);
				App.say('Installed');
				
		    	return true;
			}
			else if (tokens[0] == 'uninstall' && tokens.length == 1)
			{
				setPluginInstalled(false);
				App.say('Uninstalled');
				
		    	return true;
			}
			else if (tokens[0] == 'quick' && tokens.length > 0 && tokens[1].toLowerCase() == 'start')
			{
				var wnd = window.open('https://youtu.be/8OaMWa4R1SE?t=1');
				
				if (wnd == null)
				{
					App.say('Popup blocked');
				}
				
		    	return true;
			}
			else if (tokens[0] == 'search' && tokens.length > 1)
			{
				var searchToken = tokens.slice(1, tokens.length).join(' ').toLowerCase();
				var wnd = window.open('https://www.google.ch/search?q=' + encodeURIComponent(searchToken) + '&tbm=isch', 'voicePluginSearchResult');

				if (wnd == null)
				{
					App.say('Popup blocked');
				}
				
		    	return true;
			}
			else if (tokens[0] == 'shrink')
			{
	    		var cell = graph.getSelectionCell();
	    		var geo = graph.getCellGeometry(cell);
	    		
		    	if (graph.getModel().isVertex(cell) && geo != null)
		    	{
		    		geo = geo.clone();
		    		
		    		if (tokens.length == 1 || tokens[1] == 'height')
		    		{
		    			geo.height = graph.snap(Math.round(geo.height * 0.5));
		    		}
		    		
		    		if (tokens.length == 1 || tokens[1] != 'height')
		    		{
		    			geo.width = graph.snap(Math.round(geo.width * 0.5));
		    		}
		    		
		    		if (geo.width > graph.tolerance && geo.height > graph.tolerance)
		    		{
		    			graph.getModel().setGeometry(cell, geo);
		    			App.say('Resized');
		    		}
		    		else
			    	{
			    		App.say('Too small');
			    	}
		    	}
		    	else
		    	{
		    		App.say('No cell to resize');
		    	}
		    	
		    	return true;
			}
			else if (tokens[0] == 'double')
			{
	    		var cell = graph.getSelectionCell();
	    		var geo = graph.getCellGeometry(cell);
	    		
		    	if (graph.getModel().isVertex(cell) && geo != null)
		    	{
		    		geo = geo.clone();
		    		
		    		if (tokens.length == 1 || tokens[1] == 'height')
		    		{
		    			geo.height *= 2;
		    		}
		    		
		    		if (tokens.length == 1 || tokens[1] != 'height')
		    		{
		    			geo.width *= 2;
		    		}
		    		
		    		if (geo.width > graph.tolerance && geo.height > graph.tolerance)
		    		{
		    			graph.getModel().setGeometry(cell, geo);
		    			App.say('Resized');
		    		}
		    		else
			    	{
			    		App.say('Too small');
			    	}
		    	}
		    	else
		    	{
		    		App.say('No cell to resize');
		    	}
		    	
		    	return true;
			}
			else if (tokens[0] == 'width' || tokens[0] == 'with' || tokens[0] == 'height')
		    {
				// Try numeric stylename if last token is numeric
				var lastToken = tokens[tokens.length - 1].toLowerCase();
				
				// Fixes some special cases for recoginition of short phrases
				// like "stroke width 2" where it tries to be clever
				if (lastToken == 'tool' || lastToken == 'tune' || lastToken == 'tomb' || lastToken == 'tube')
				{
					lastToken = '2';
				}
				else if (lastToken == 'd3')
				{
					lastToken = '3';
				}
				else if (lastToken == 'v')
				{
					lastToken = '5';
				}
				else
				{
					// Converts numeric words to numbers (system only seems to return written numbers for <= 4)
					var numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
					var tmpIndex = mxUtils.indexOf(numbers, lastToken);
					
					if (tmpIndex >= 0)
					{
						lastToken = tmpIndex;
					}
				}

				var lastValue = parseFloat(tokens[1].toLowerCase());
				
				if (tokens.length >= 2 && !isNaN(lastValue))
				{
		    		var cell = graph.getSelectionCell();
		    		var geo = graph.getCellGeometry(cell);
		    		
			    	if (graph.getModel().isVertex(cell) && geo != null)
			    	{
			    		geo = geo.clone();
			    		
			    		if (tokens[0] == 'height')
			    		{
			    			geo.height = lastValue;
			    		}
			    		else
			    		{
			    			geo.width = lastValue;
			    		}
			    		
			    		graph.getModel().setGeometry(cell, geo);
			    		App.say('Resized');
			    	}
			    	else
			    	{
			    		App.say('No cell to resize');
			    	}
				}
				
		    	return true;
		    }
			else if (tokens[0] == 'insert' && tokens.length > 1)
			{
				// Fixes some common mistakes
				if (tokens[1].toLowerCase() == 'edits')
				{
					tokens[1] = 'ellipse';
				}
				
				var searchTerm = mxUtils.trim(tokens.slice(1, tokens.length).join(' '));
				var current = graph.getSelectionCell();
				
				// Clears selection to disable built-in connecting
				graph.clearSelection();
				
				insertShape(searchTerm, function()
				{
					var cell = graph.getSelectionCell();
					
					// Connects dangling edge of previously selected edge and moves cell
					if (graph.model.isVertex(cell) && graph.model.isEdge(current) &&
						(graph.model.getTerminal(current, true) == null ||
						graph.model.getTerminal(current, false) == null))
					{
						var edgeState = graph.view.getState(current);
						var vertexState = graph.view.getState(cell);
						
						if (vertexState != null && edgeState != null && edgeState.absolutePoints != null &&
							edgeState.absolutePoints.length > 1)
						{
							var source = graph.model.getTerminal(current, true) == null;
							var pts = edgeState.absolutePoints;
							var pt = pts[(source) ? 0 : pts.length - 1];
							var loc = new mxPoint(vertexState.getCenterX(), vertexState.getCenterY());

							if (loc != null && edgeState != null)
							{
								var s = graph.view.scale;
								var dx = pt.x - loc.x;
								var dy = pt.y - loc.y;
								
								// TODO: Should add insert to transaction but need absolute position
								graph.model.beginUpdate();
								try
								{
									graph.moveCells(graph.getSelectionCells(), dx / s, dy / s);
									graph.model.setTerminal(current, cell, source);
								}
								finally
								{
									graph.model.endUpdate();
								}
							}
						}
					}
				});
				
		    	return true;
			}
			else if (tokens[0] == 'connect' || tokens[0] == 'kinect' || (tokens[0] == 'clone' && tokens.length > 1))
		    {
	    		var cell = graph.getSelectionCell();
	    		
		    	if (graph.getModel().isVertex(cell))
		    	{
			    	// Uses east direction if token not understood
			    	var direction = mxConstants.DIRECTION_EAST;
			    	
			    	if (tokens.length > 1)
			    	{
			    		tokens[1] = tokens[1].toLowerCase();
	
			    		// Guessing direction based on minimum hamming distance for given set
			    		var guess = getBestWord(tokens[1], ['up', 'left', 'down', 'right', 'north', 'south', 'east', 'west']);
	
				    	if (guess == 'up' || guess == mxConstants.DIRECTION_NORTH)
				    	{
				    		direction = mxConstants.DIRECTION_NORTH;
				    	}
				    	else if (guess == 'left' || guess == mxConstants.DIRECTION_WEST)
				    	{
				    		direction = mxConstants.DIRECTION_WEST;
				    	}
				    	else if (guess == 'down' || guess == mxConstants.DIRECTION_SOUTH)
				    	{
				    		direction = mxConstants.DIRECTION_SOUTH;
				    	}
		    		}
			    	
			    	var length = graph.defaultEdgeLength;
			    	var cloneSource = tokens[0] == 'clone';
			    	var evt = mouseEvent('click', 1, 50, 1, 50, !cloneSource);
			    	var cells = graph.connectVertex(cell, direction, length, evt);
			    	graph.selectCellsForConnectVertex(cells, evt, ui.hoverIcons);
		    	}
		    	
		    	return true;
		    }
			// Fixes drive and ride common mistakes for right
		    else if (mxUtils.indexOf(['and', 'drive', 'ride', 'move', 'up', 'left', 'down', 'right', 'north', 'south', 'east', 'west', 'downright'], tokens[0]) >= 0)
		    {
	    		var cell = graph.getSelectionCell();
	    		
		    	if (!graph.isSelectionEmpty())
		    	{
			    	// Uses east direction if token not understood
			    	var dx = 0;
			    	var dy = 0;
			    	
			    	for (var i = 0; i < tokens.length; i++)
			    	{
			    		tokens[i] = tokens[i].toLowerCase();
				    	var direction = null;
				    	
				    	// Downright is a single word needs special handling
				    	if (tokens[i].toLowerCase() == 'downright')
				    	{
				    		dx += graph.defaultEdgeLength;
				    		dy += graph.defaultEdgeLength;
				    	}
				    	else
				    	{
				    		var guess = null;
				    		
				    		// Guessing direction based on minimum hamming distance for given set
				    		// Handle some common cases
				    		if (tokens[i] == 'drive' || tokens[i] == 'ride')
				    		{
				    			guess = 'right';
				    		}
				    		else
				    		{
					    		guess = getBestWord(tokens[i], ['move', 'and', 'up', 'left', 'right', 'north', 'south', 'east', 'west', 'down', 'downright']);
				    		}
		
				    		if (guess == 'up' || guess == mxConstants.DIRECTION_NORTH)
					    	{
					    		direction = mxConstants.DIRECTION_NORTH;
					    	}
					    	else if (guess == 'left' || guess == mxConstants.DIRECTION_WEST)
					    	{
					    		direction = mxConstants.DIRECTION_WEST;
					    	}
					    	else if (guess == 'down' || guess == mxConstants.DIRECTION_SOUTH)
					    	{
					    		direction = mxConstants.DIRECTION_SOUTH;
					    	}
					    	else if (guess == 'right' || guess == mxConstants.DIRECTION_EAST)
					    	{
					    		direction = mxConstants.DIRECTION_EAST;
					    	}
					    	
					    	if (direction != null)
					    	{
						    	if (direction == mxConstants.DIRECTION_NORTH)
						    	{
						    		dy += -graph.defaultEdgeLength;
						    	}
						    	else if (direction == mxConstants.DIRECTION_WEST)
						    	{
						    		dx += -graph.defaultEdgeLength;
						    	}
						    	else if (direction == mxConstants.DIRECTION_SOUTH)
						    	{
						    		dy += graph.defaultEdgeLength;
						    	}
						    	else if (direction == mxConstants.DIRECTION_EAST)
						    	{
						    		dx += graph.defaultEdgeLength;
						    	}
					    	}
				    	}
			    	}
			    	
			    	if (dx != 0 || dy != null)
			    	{
			    		graph.moveCells(graph.getSelectionCells(), dx, dy);
			    		App.say('Moved');
			    	}
			    	
			    	return true;
		    	}
		    }
		    else if (tokens[0] == 'text')
		    {
				var cells = graph.getSelectionCells();
		    	
		    	if (cells.length == 0 && graph.model.contains(lastInserted))
		    	{
		    		cells = [lastInserted];
		    	}
	
		    	if (cells.length == 0)
		    	{
					App.say('No cell for text');
		    	}
		    	else if (tokens[0].length >= 2)
				{
		    		var value = tokens.slice(1, tokens.length).join(' ');
		    		
		    		if (value.length > 0)
		    		{
			    		// Capitalize string
			    		if (value.length > 1)
			    		{
			    			value = value.charAt(0).toUpperCase() + value.slice(1);
			    		}

		    			graph.labelChanged(cells[0], value);
		    		}
				}
		    	
		    	return true;
		    }
		    else if (tokens[0] == 'disconnect' && tokens.length == 1)
		    {
				var cells = graph.getAllEdges(graph.getSelectionCells());
		    	
		    	if (cells.length == 0)
		    	{
					App.say('No cell to disconnect');
		    	}
		    	else
		    	{
		    		graph.removeCells(cells);
		    	}
		    	
		    	return true;
		    }
		    else if (tokens[0] == 'deselect' && tokens.length == 1)
		    {
		    	graph.clearSelection();
		    	
		    	return true;
		    }
		    else if (tokens[0] === 'select' && (tokens.length == 1 || mxUtils.indexOf(
		    	['vertices', 'edges', 'none', 'all'], tokens[1].toLowerCase()) < 0))
			{
		    	// Handles some other shortcuts
		    	if (tokens.length == 1 || mxUtils.indexOf(['last'], tokens[1].toLowerCase()) >= 0)
		    	{
		    		if (graph.model.contains(lastInserted))
		    		{
		    			graph.setSelectionCell(lastInserted);
		    			App.say('{1} selected', [graph.getWordForCell(lastInserted).replace(/([A-Z])/g, ' $1')]);
				    	return true;
		    		}
		    	}
		    	// Handles alternative cases of edges
		    	else if (mxUtils.indexOf(['connection', 'connections', 'inches'], tokens[1].toLowerCase()) >= 0)
		    	{
					var edges = graph.getAllEdges(graph.getSelectionCells());
		
			    	if (edges.length > 0)
			    	{
			    		graph.setSelectionCells(edges);
			    	}
			    	else
			    	{
			    		ui.actions.get('selectEdges').funct();
			    	}
			    	
		    		App.sayHint();
			    	return true;
		    	}
		    	// Handles alternative version of vertices
		    	else if (mxUtils.indexOf(['shapes'], tokens[1].toLowerCase()) >= 0)
		    	{
		    		ui.actions.get('selectVertices').funct();
		    		App.sayHint();
			    	return true;
		    	}
		    	else if (mxUtils.indexOf(['previous'], tokens[1].toLowerCase()) >= 0)
		    	{
		    		if (graph.isSelectionEmpty())
		    		{
		    			// Selects the first vertex
		    			var parent = graph.getDefaultParent();
		    			var childCount = graph.model.getChildCount(parent);
		    			
		    			for (var i = childCount - 1; i >= 0; i--)
		    			{
		    				var child = graph.model.getChildAt(parent, i);
		    				
		    				if (graph.model.isVertex(child))
		    				{
		    					graph.setSelectionCell(child);
		    					App.say('{1} selected', [graph.getWordForCell(child).replace(/([A-Z])/g, ' $1')]);
		    					
		    					return true;
		    				}
		    			}
		    		}
		    		else
		    		{
			    		var cell = graph.getSelectionCell();
			    		var model = graph.getModel();
			    		var index = model.getParent(cell).getIndex(cell);
			    		var childCount = model.getChildCount(model.getParent(cell));
			    		
			    		if (index >= 0)
			    		{
			    			var next = model.getParent(cell).getChildAt(((index == 0) ? childCount : index) - 1);
			    			
			    			if (next != null)
			    			{
			    				graph.setSelectionCell(next);
			    				App.say('{1} selected', [graph.getWordForCell(next)]);
			    				
			    				return true;
			    			}
			    		}
		
			    		App.say('Previous not found');
		    		}
		    	}
		    	else if (mxUtils.indexOf(['source', 'target'], tokens[1].toLowerCase()) >= 0)
		    	{
		    		var cell = graph.getSelectionCell();
		    		
		    		if (graph.model.isEdge(cell))
		    		{
		    			var terminal = graph.model.getTerminal(cell, tokens[1].toLowerCase() == 'source');
		    			
		    			if (terminal != null)
		    			{
		    				graph.setSelectionCell(terminal);
		    		    	return true;
		    			}
		    		}
		    	}
		    	else if (mxUtils.indexOf(['next'], tokens[1].toLowerCase()) >= 0)
		    	{
		    		if (graph.isSelectionEmpty())
		    		{
		    			// Selects the first vertex
		    			var parent = graph.getDefaultParent();
		    			var childCount = graph.model.getChildCount(parent);
		    			
		    			for (var i = 0; i < childCount; i++)
		    			{
		    				var child = graph.model.getChildAt(parent, i);
		    				
		    				if (graph.model.isVertex(child))
		    				{
		    					graph.setSelectionCell(child);
		    					App.say('{1} selected', [graph.getWordForCell(child).replace(/([A-Z])/g, ' $1')]);
		    					
		    					return true;
		    				}
		    			}
		    		}
		    		else
		    		{
			    		var cell = graph.getSelectionCell();
			    		var model = graph.getModel();
			    		var index = model.getParent(cell).getIndex(cell);
			    		var childCount = model.getChildCount(model.getParent(cell));
			    		
			    		if (index < childCount)
			    		{
			    			var next = model.getParent(cell).getChildAt(((index == childCount - 1) ? 0 : index + 1));
			    			
			    			if (next != null)
			    			{
			    				graph.setSelectionCell(next);
			    				App.say('{1} selected', [graph.getWordForCell(next).replace(/([A-Z])/g, ' $1')]);
			    				
			    				return true;
			    			}
			    		}
		    		}
		    	}
		    	else
		    	{
			    	var states = graph.view.states.getValues();
			    	var token = tokens[1].toLowerCase();
			    	var searchToken = tokens.slice(1, tokens.length).join('').toLowerCase();

			    	for (var i = states.length - 1; i > 0; i--)
			    	{
			    		// Simple matching for shape name or label
				    	if (!graph.isCellSelected(states[i].cell))
				    	{
				    		// Tries label search first
				    		var lab = graph.getLabel(states[i].cell);
				    		
				    		if (lab != null && lab.length > 0)
				    		{
				    			lab = lab.toLowerCase().replace(/ /g, '');
				    			
						    	// Some common mistakes
						    	if (lab.charAt(lab.length - 1) == '2' && tokens[tokens.length - 1].toLowerCase() == 'to')
						    	{
						    		lab = lab.substring(0, lab.length - 1) + 'to';
						    	}
				    			
				    			var min = Math.min(searchToken.length, lab.length);
				    			
				    			if (searchToken.substring(0, min) == lab.substring(0, min))
				    			{
				    				graph.setSelectionCell(states[i].cell);
					    			App.say('{1} selected', [graph.getWordForCell(states[i].cell)]);
					    		
					    			return true;
				    			}
				    		}
				    		
				    		// Then tries shapename search
					    	if (tokens.length == 2)
					    	{
						    	// Some common names
						    	if (mxUtils.indexOf(['circle'], token) >= 0)
						    	{
						    		searchToken = 'ellipse';
						    	}
						    	else if (mxUtils.indexOf(['condition', 'decision'], token) >= 0)
						    	{
						    		searchToken = 'rhombus';
						    	}
						    	else if (mxUtils.indexOf(['preparation'], token) >= 0)
						    	{
						    		searchToken = 'hexagon';
						    	}
						    	else if (mxUtils.indexOf(['trapez'], token) >= 0)
						    	{
						    		searchToken = 'parallelogram';
						    	}
					    	}
					    	
				    		var wrd = graph.getWordForCell(states[i].cell, true);
				    		var min = Math.min(wrd.length, searchToken.length);
				    		
				    		if (searchToken.substring(0, min) == wrd.substring(0, min))
				    		{
				    			graph.setSelectionCell(states[i].cell);
				    			App.say('{1} selected', [graph.getWordForCell(states[i].cell)]);
				    		
				    			return true;
				    		}
				    	}
			    	}
		    	}
			}
		    else if (tokens[0] === 'remove')
			{
				var cells = graph.getSelectionCells();
		    	
		    	if (cells.length == 0 && graph.model.contains(lastInserted))
		    	{
		    		cells = [lastInserted];
		    	}
	
		    	if (cells.length == 0)
		    	{
					App.say('No cells');
		    	}
		    	else if (tokens[1].toLowerCase() == 'text')
				{
	    			graph.labelChanged(cells[0], '');
				}
				else
			    {
					// Remove style
					var styleToken = mxUtils.trim(tokens.slice(1, tokens.length).join(' ').toLowerCase());
					
					// Fixes common recognition errors
					styleToken = styleToken.replace(/a line/g, 'align')
					
					// Merges to single word
					styleToken = styleToken.replace(/ /g, '')

			    	// Fixes common speech errors that make no sense in the context
	    			var keys = [mxConstants.STYLE_FILLCOLOR, mxConstants.STYLE_GRADIENTCOLOR,
	    			               mxConstants.STYLE_STROKECOLOR, mxConstants.STYLE_FONTCOLOR,
	    			               mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, mxConstants.STYLE_LABEL_BORDERCOLOR,
	    			        mxConstants.STYLE_STROKEWIDTH, mxConstants.STYLE_FONTSIZE, mxConstants.STYLE_SPACING,
	    		            mxConstants.STYLE_SPACING_TOP, mxConstants.STYLE_SPACING_LEFT, mxConstants.STYLE_SPACING_RIGHT,
	    		            mxConstants.STYLE_SPACING_BOTTOM, mxConstants.STYLE_PERIMETER_SPACING,
	    		            mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, mxConstants.STYLE_OPACITY,
	    		            mxConstants.STYLE_TEXT_OPACITY, mxConstants.STYLE_ROTATION,
	    		            mxConstants.STYLE_ALIGN, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.STYLE_FONTFAMILY,
	    			        mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_VERTICAL_LABEL_POSITION,
	    			        mxConstants.STYLE_GRADIENT_DIRECTION];
    			
		    		// Guesses best word
		    		var	style = getBestWord(styleToken, keys);

		    		if (style != null)
			    	{
			    		graph.setCellStyles(style, null, cells);
			    		ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [null], 'cells', cells));
			    	}
			    	else
			    	{
			    		App.say('Unknown style {1}', [changeTokens[0]]);
			    	}
			    }
		    	
		    	return true;
			}
			else
			{
				var cells = graph.getSelectionCells();
		    	
		    	if (cells.length == 0 && graph.model.contains(lastInserted))
		    	{
		    		cells = [lastInserted];
		    	}
		    	
				// Try numeric stylename if last token is numeric
				var lastToken = tokens[tokens.length - 1].toLowerCase();
				
				// Fixes some special cases for recoginition of short phrases
				// like "stroke width 2" where it tries to be clever
				if (lastToken == 'tool' || lastToken == 'tune' || lastToken == 'tomb' || lastToken == 'tube')
				{
					lastToken = '2';
				}
				else if (lastToken == 'd3')
				{
					lastToken = '3';
				}
				else if (lastToken == 'v')
				{
					lastToken = '5';
				}
				else
				{
					// Converts numeric words to numbers (system only seems to return written numbers for <= 4)
					var numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
					var tmpIndex = mxUtils.indexOf(numbers, lastToken);
					
					if (tmpIndex >= 0)
					{
						lastToken = tmpIndex;
					}
				}
				
				// If last token is numeric
				var lastValue = parseFloat(lastToken);
				
				if (tokens.length >= 2 && !isNaN(lastValue))
				{
					var styleToken = tokens.slice(0, tokens.length - 1).join('').toLowerCase();
					
					// Numeric styles
		    		var keys = [mxConstants.STYLE_STROKEWIDTH, mxConstants.STYLE_FONTSIZE, mxConstants.STYLE_SPACING,
		    		            mxConstants.STYLE_SPACING_TOP, mxConstants.STYLE_SPACING_LEFT, mxConstants.STYLE_SPACING_RIGHT,
		    		            mxConstants.STYLE_SPACING_BOTTOM, mxConstants.STYLE_PERIMETER_SPACING,
		    		            mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, mxConstants.STYLE_OPACITY,
		    		            mxConstants.STYLE_TEXT_OPACITY, mxConstants.STYLE_ROTATION]
					var style = null;
					
					// Workaround for problem with "font size" is to say "size" ("font" is near "phone")
					if (styleToken == 'size')
					{
						style = mxConstants.STYLE_FONTSIZE;
					}
					else
					{
						// Guesses best word
						style = getBestWord(styleToken, keys);
					}
					
					if (style != null)
			    	{
						if (cells.length == 0)
				    	{
							App.say('No cell for {1}', [style]);
				    	}
						// Plausibility check
						else if (lastValue <= 400)
						{
							graph.setCellStyles(style, lastValue, cells);
			    			ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [lastValue], 'cells', cells));
						}
						else
						{
							App.say('{1} ignored', [lastValue]);
						}
						
		    			// Terminate
		    			return true;
			    	}
				}
				
				// If "color" appears in the command
				if (tokens.length >= 2)
				{
					// Replaces GB spelling with US spelling for internal lookups
					var colorCommand = mxUtils.trim(command.toLowerCase().replace(/colour/g, 'color'));
					var colorIndex = colorCommand.indexOf('color');
					
					// "Color" (word alone) matches to fill color
					if (colorIndex >= 0)
					{
						// Text from first space after color* word
						var colorToken = mxUtils.trim(colorCommand.substring(
							colorCommand.indexOf(' ', colorIndex))).replace(/ /g, '');
						var color = null;
				    	
						// Checks for color code of token using ntc
				    	for (var i = 0; i < ntc.names.length; i++)
				    	{
				    		if (ntc.names[i][1].toLowerCase().replace(/ /g, '') == colorToken)
				    		{
				    			color = '#' + ntc.names[i][0];
				    			break;
				    		}
				    	}
				    	
				    	// Color is known
				    	if (color != null)
				    	{
				    		var styleToken = colorCommand.substring(0, colorIndex + 'color'.length).replace(/ /g, '');
				    		
				    		keys = [mxConstants.STYLE_GRADIENTCOLOR,
				    		        mxConstants.STYLE_STROKECOLOR, mxConstants.STYLE_FONTCOLOR,
				    		        mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, mxConstants.STYLE_LABEL_BORDERCOLOR,
				    		        mxConstants.STYLE_FILLCOLOR];
				    		var style = null;
				    		
				    		// Handles some special cases
				    		if (styleToken == 'thecolor' || styleToken == 'color')
				    		{
				    			if (graph.model.isEdge(graph.getSelectionCell()))
				    			{
				    				style = mxConstants.STYLE_STROKECOLOR;
				    			}
				    			else
				    			{
				    				style = mxConstants.STYLE_FILLCOLOR;
				    			}
				    		}
				    		else
				    		{
				    			// Guesses best word
				    			style = getBestWord(styleToken, keys);
				    		}
				    		
				    		if (style != null)
				    		{
								if (cells.length == 0)
						    	{
									App.say('No cell for {1}', [style]);
						    	}
								else
								{
									graph.setCellStyles(style, color, cells);
					    			ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [color], 'cells', cells));
								}
				    			
				    			// Terminate
				    			return true;
				    		}
				    	}
					}
				}
				
				// If the first token is a general stylename
				if (tokens.length >= 2)
				{
					var keys = [mxConstants.STYLE_ALIGN, mxConstants.STYLE_VERTICAL_ALIGN,
					        mxConstants.STYLE_FONTFAMILY, mxConstants.STYLE_LABEL_POSITION,
					        mxConstants.STYLE_VERTICAL_LABEL_POSITION,
				            mxConstants.STYLE_GRADIENT_DIRECTION];
					
					var styleToken = mxUtils.trim(tokens.slice(0, tokens.length - 1).join(' ').toLowerCase());
					
					// Fixes common recognition errors
					styleToken = styleToken.replace(/a line/g, 'align')
					
					// Merges to single word
					styleToken = styleToken.replace(/ /g, '')
					
					var style = resolveStylename(styleToken, keys);
					var value = mxUtils.trim(tokens[tokens.length - 1].toLowerCase());
					
					if (style != null && value != null && value.length > 0)
					{
						if (cells.length == 0)
				    	{
							App.say('No cell for {1}', [style]);
				    	}
						else
						{
							graph.setCellStyles(style, value, cells);
			    			ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [value], 'cells', cells));
						}
		    			
		    			// Terminate
		    			return true;
					}
				}
				
				// Checks if the command is a shape name
				var vertices = [];
				
				for (var i = 0; i < cells.length; i++)
				{
					var cell = cells[i];
					
					if (graph.model.isVertex(cell))
					{
						vertices.push(cell);
					}
				}
				
		    	var shapenameToken = mxUtils.trim(tokens.join('')).toLowerCase();

		    	// Searches for registered shape names
		    	// LATER: Using search like insert requires access to
		    	// the cells of the search result items
		    	if (shapeList == null)
		    	{
		    		shapeList = [];
		    		
		    		for (var tmp in mxCellRenderer.defaultShapes)
		    		{
		    			shapeList.push(tmp.toLowerCase());
		    		}
		    	}
		    	
		    	// Only exact matches allowed here
		    	// LATER: Support rounded style
		    	var shape = null;
		    	
		    	// Some common mappings
		    	if (mxUtils.indexOf(['cirlce', 'event', 'start', 'end'], shapenameToken) >= 0)
		    	{
		    		shapenameToken = shape = 'ellipse';
		    	}
		    	else if (mxUtils.indexOf(['condition', 'decision'], shapenameToken) >= 0)
		    	{
		    		shapenameToken = shape = 'rhombus';
		    	}
		    	else if (mxUtils.indexOf(['preparation'], shapenameToken) >= 0)
		    	{
		    		shapenameToken = shape = 'hexagon';
		    	}
		    	else if (mxUtils.indexOf(['trapez'], shapenameToken) >= 0)
		    	{
		    		shapenameToken = shape = 'parallelogram';
		    	}
		    	else
		    	{
		    		shape = getBestWord(shapenameToken, shapeList);
		    	}
		    	
		    	// LATER: Ignore all edge shapes
	    		if (shape != null && shape.toLowerCase() == shapenameToken && shape != 'connector' &&
	    			shape != 'arrow' && shape != 'flexarrow' && shape != 'arrowconnector' &&
	    			shape != 'link')
		    	{
			    	if (cells.length == 0)
			    	{
			    		App.say('No cell for {1}', [shape]);
			    	}
			    	else if (vertices.length == 0)
				{
			    		App.say('Connections ignored');
				}
			    	else
				{
				    	// LATER: Add perimeter style etc
			    		graph.setCellStyles(mxConstants.STYLE_SHAPE, shapenameToken, vertices);
			    		ui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_SHAPE],
			    			'values', [shapenameToken], 'cells', vertices));
			    		
			    		// Terminate
			    		return true;
				}
		    	}
				
				// Lazy creation of cache for action names
				if (actions == null)
				{
					actions = {};
					actionList = [];
					
					for (var name in ui.actions.actions)
					{
						var shortname = mxUtils.trim(name).toLowerCase().replace(/ /g, '');
						actions[shortname] = ui.actions.actions[name];
						actionList.push(shortname);
					}
				}
				
				var name = mxUtils.trim(command).toLowerCase().replace(/ /g, '');
				
				if (urlParams['dev'] == '1')
				{
					var guess = getBestWord(name, actionList, true);
					console.log('App.say guess:', name, '=>', guess, '(' +
						naiveHammingDistance(name, guess) + ', ' +
						levenshteinDist(name, guess) +
						')');
				}
				
				// Some common redirects and mistakes
				if (tokens[0] == 'back')
				{
					command = name = 'undo';
				}
				else if (tokens[0] == 'restore')
				{
					command = name = 'redo';
				}
				else if (tokens[0] == 'clone')
				{
					command = name = 'duplicate';
				}
				else if (mxUtils.indexOf(['all', 'small', 'wall', 'call'], name) >= 0)
				{
					command = name = 'selectall';
				}
				else if (mxUtils.indexOf(['both', 'boat', 'phone', 'don\'t', 'food', 'bolt', 'bull'], tokens[0]) >= 0)
				{
					command = name = 'bold';
				}

				var action = actions[name];
				
				if (action != null)
				{
					if (action.isEnabled())
					{
						App.say(name);
						action.funct();
					}
					else
					{
						// Cannot use name here as it has no spaces
						App.say('{1} disabled', [command]);
					}
					
					return true;
				}
				
				return false;
			}
	    }
	};

	if ('speechSynthesis' in window)
	{
		// Shows dialog for mic access
		if (navigator.webkitGetUserMedia)
		{
			window.addEventListener('load', function()
			{
				navigator.webkitGetUserMedia({audio:true}, function()
				{
	    			//console.log('access to mic ok');
	    		}, function(e)
	    		{
	    			//alert('Error getting audio');
	    			console.log(e);
	    		});
	        });
		}
		
		// Installs helper methods and listeners for speech output
		var graph = ui.editor.graph;
		
		App.reloadVoicePlugin = function()
		{
	    	// Shows UI
			speechOutputEnabled = true;
	    	menu.style.display = '';
	    	td.style.display = 'inline-block';
		};
		
		App.sayHint = function()
		{
			if (graph.getSelectionCount() == 0)
			{
				App.say('No cell selected.' + ((ui.isDiagramEmpty()) ? ' Diagram is empty.' : ''));
			}
			else if (graph.getSelectionCount() == 1)
			{
				var cell = graph.getSelectionCell();
				
				if (graph.getModel().isVertex(cell))
				{
					var geo = graph.getCellGeometry(cell)
			
					if (geo != null)
					{
						App.say('{1} at {2} and {3} is {4} times {5} pixels', [graph.getWordForCell(cell, true),
						                                                       geo.x, geo.y, geo.width, geo.height]);
					}
				}
				else
				{
					App.say('One connection selected');
				}
				
				var lab = mxUtils.trim(graph.getLabel(cell));
				
				if (lab != null && lab.length > 0 && lab.length < 20)
				{
					App.say('Label is {1}', [lab]);
				}
			}
			else
			{
				var cells = graph.getSelectionCells();
				var vertexCount = 0;
				var edgeCount = 0;
				
				for (var i = 0; i < cells.length; i++)
				{
					var cell = cells[i];
					
					if (graph.model.isEdge(cell))
					{
						edgeCount++;
					}
					else if (graph.model.isVertex(cell))
					{
						vertexCount++;
					}
				}

				if (vertexCount > 0 && edgeCount > 0)
				{
					var tmp = '';
					
					if (vertexCount == 1)
					{
						tmp += 'One shape';
					}
					else
					{
						tmp += '{1} shapes';
					}
					
					tmp += ' and ';
					
					if (edgeCount == 1)
					{
						tmp += 'one connection';
					}
					else
					{
						tmp += '{2} connections';
					}
					
					App.say(tmp + ' selected', [vertexCount, edgeCount]);
				}
				else if (vertexCount > 0)
				{
					App.say('{1} shapes selected', [vertexCount]);
				}
				else
				{
					App.say('{1} connections selected', [edgeCount]);
				}
			}
		};
		
		// Can return more than first word
		function firstWord(value)
		{
			// TODO Use regex
			if (value != null && value.length > maxLabelLength)
			{
				var space = value.indexOf(' ');
				
				// Add second word if label is short
				var tmp = value.indexOf(' ', space + 1);
				
				if (tmp >= 0 && tmp <= maxLabelLength)
				{
					space = tmp;

					// Add third word if label is short
					var tmp = value.indexOf(' ', space + 1);
					
					if (tmp >= 0 && tmp <= maxLabelLength)
					{
						space = tmp;
					}
				}
				
				if (space >= 0)
				{
					value = value.substring(0, space);
				}
			}

			return value;
		};

		graph.getWordForCell = function(cell, ignoreLabel)
		{
			var label = 'no';
			
			if (cell != null)
			{
				label = (ignoreLabel) ? null : firstWord(this.getLabel(cell));

				if (label == null || label.length == 0 || label.length > maxLabelLength || mxUtils.isNumeric(label))
				{
					var style = this.getCurrentCellStyle(cell);
					var tmp = style[mxConstants.STYLE_SHAPE];

					if (tmp == 'label')
					{
						label = 'rectangle';
					}
					else if (tmp != null)
					{
						var dot = tmp.lastIndexOf('.');
						
						if (dot >= 0)
						{
							tmp = tmp.substring(dot + 1);
						}

						label = tmp
					}
				}

				var div = document.createElement('div');
				div.innerHTML = label;
				label = div.innerText;
			}
			
			return label;
		};

		ui.addListener('styleChanged', function(sender, evt)
		{
			//console.log('styleChanged', evt, evt.getProperty('keys'));
			var cells = evt.getProperty('cells');
			var keys = evt.getProperty('keys');
			var values = evt.getProperty('values');

			if (cells != null && keys != null && keys.length == 1 && values.length == 1)
			{
				var tmp = values[0];
				
				if (typeof tmp === 'string' && tmp.charAt(0) == '#')
				{
					var n_match  = ntc.name(tmp);
					
					//if (n_match[2]) /* exact match */
					{
						tmp = n_match[1];
					}
				}
				
				if (tmp == mxConstants.NONE || tmp == null)
				{
					App.say('Removed {1}', [keys[0]]);
				}
				else
				{
					// Replaces camel case notation with spaces
					var key = keys[0].replace(/([A-Z])/g, ' $1')
					App.say('{1} {2}', [key, tmp]);
				}
			}
		});
		graph.addListener(mxEvent.LABEL_CHANGED, function(sender, evt)
		{
			//console.log('CELL_CONNECTED', evt);
			var cell = evt.getProperty('cell');
			var old = evt.getProperty('old');

			// Resolves placeholders in new label
			var value = this.getLabel(cell);
			
			if ((value != null && value.length > 20) ||
				(old != null && old.length > 20))
			{
				App.say('Label changed');
			}
			else if (value != null && value.length == 0)
			{
				App.say('Label removed');
			}
			else if (value != null)
			{
				App.say('{1}', [value]);
			}
		});
		
		graph.addListener(mxEvent.CELL_CONNECTED, function(sender, evt)
		{
//				console.log('CELL_CONNECTED', evt);
//				var edge = evt.getProperty('edge');
//				var terminal = evt.getProperty('terminal');
//				var other = graph.model.getTerminal(edge, !evt.getProperty('source'));
//				
//				if (other != null && terminal != null)
//				{
//					App.say('connected {1} to {2}', [getWordForCell(other), getWordForCell(terminal)]);
//				}
		});
		
		graph.addListener(mxEvent.CELLS_ADDED, function(sender, evt)
		{
			//console.log('CELLS_ADDED', evt);
			var cells = evt.getProperty('cells');
			
			if (cells.length > 1)
			{
				var vertexCount = 0;
				var edgeCount = 0;
				
				for (var i = 0; i < cells.length; i++)
				{
					var cell = cells[i];
					
					if (graph.model.isEdge(cell))
					{
						edgeCount++;
					}
					else if (graph.model.isVertex(cell))
					{
						vertexCount++;
					}
				}

				if (vertexCount > 0 && edgeCount > 0)
				{
					var tmp = '';
					
					if (vertexCount == 1)
					{
						tmp += 'One shape';
					}
					else
					{
						tmp += '{1} shapes';
					}
					
					tmp += ' and ';
					
					if (edgeCount == 1)
					{
						tmp += 'one connection';
					}
					else
					{
						tmp += '{2} connections';
					}
					
					App.say(tmp + ' inserted', [vertexCount, edgeCount]);
				}
				else if (vertexCount > 0)
				{
					App.say('{1} shapes', [vertexCount]);
				}
				else
				{
					App.say('{1} connections', [edgeCount]);
				}	
			}
			else
			{
				cell = cells[0];
			
				if (graph.model.isEdge(cell) && graph.model.getTerminal(cell, true) != null &&
					graph.model.getTerminal(cell, false) != null)
				{
					if (graph.getWordForCell(graph.model.getTerminal(cell, true)) ==
						graph.getWordForCell(graph.model.getTerminal(cell, false)))
					{
						App.say('Connected');
					}
					else
					{
						App.say('{1} connected to {2}', [graph.getWordForCell(graph.model.getTerminal(cell, true)),
					                                 graph.getWordForCell(graph.model.getTerminal(cell, false))]);
					}
				}
				else if (graph.model.isVertex(cell))
				{
					lastInserted = cell;
					
					// Replaces camel case notation with spaces
					var word = graph.getWordForCell(cell).replace(/([A-Z])/g, ' $1');
					
					App.say('{1}', [word]);
				}
			}
		});
		graph.addListener(mxEvent.CELLS_REMOVED, function(sender, evt)
		{
			//console.log('CELLS_REMOVED', evt);
			var cells = evt.getProperty('cells');
			
			if (cells.length > 1)
			{
				App.say('{1} cells deleted', [cells.length]);
			}
			else
			{
				cell = cells[0];
				App.say('{1} deleted', [graph.getWordForCell(cell)]);
			}
		});
	}
});

/** Code for color to voice based on ntc (name that color)

/*

+-----------------------------------------------------------------+
|     Created by Chirag Mehta - http://chir.ag/projects/ntc       |
|-----------------------------------------------------------------|
|               ntc js (Name that Color JavaScript)               |
+-----------------------------------------------------------------+

All the functions, code, lists etc. have been written specifically
for the Name that Color JavaScript by Chirag Mehta unless otherwise
specified.

This script is released under the: Creative Commons License:
Attribution 2.5 http://creativecommons.org/licenses/by/2.5/

Sample Usage:

  <script type="text/javascript" src="ntc.js"></script>

  <script type="text/javascript">

    var n_match  = ntc.name("#6195ED");
    n_rgb        = n_match[0]; // This is the RGB value of the closest matching color
    n_name       = n_match[1]; // This is the text string for the name of the match
    n_exactmatch = n_match[2]; // True if exact color match, False if close-match

    alert(n_match);

  </script>

*/

var ntc = {

  init: function() {
    var color, rgb, hsl;
    for(var i = 0; i < ntc.names.length; i++)
    {
      color = "#" + ntc.names[i][0];
      rgb = ntc.rgb(color);
      hsl = ntc.hsl(color);
      ntc.names[i].push(rgb[0], rgb[1], rgb[2], hsl[0], hsl[1], hsl[2]);
    }
  },

  name: function(color) {

    color = color.toUpperCase();
    if(color.length < 3 || color.length > 7)
      return ["#000000", "Invalid Color: " + color, false];
    if(color.length % 3 == 0)
      color = "#" + color;
    if(color.length == 4)
      color = "#" + color.substr(1, 1) + color.substr(1, 1) + color.substr(2, 1) + color.substr(2, 1) + color.substr(3, 1) + color.substr(3, 1);

    var rgb = ntc.rgb(color);
    var r = rgb[0], g = rgb[1], b = rgb[2];
    var hsl = ntc.hsl(color);
    var h = hsl[0], s = hsl[1], l = hsl[2];
    var ndf1 = 0; ndf2 = 0; ndf = 0;
    var cl = -1, df = -1;

    for(var i = 0; i < ntc.names.length; i++)
    {
      if(color == "#" + ntc.names[i][0])
        return ["#" + ntc.names[i][0], ntc.names[i][1], true];

      ndf1 = Math.pow(r - ntc.names[i][2], 2) + Math.pow(g - ntc.names[i][3], 2) + Math.pow(b - ntc.names[i][4], 2);
      ndf2 = Math.pow(h - ntc.names[i][5], 2) + Math.pow(s - ntc.names[i][6], 2) + Math.pow(l - ntc.names[i][7], 2);
      ndf = ndf1 + ndf2 * 2;
      if(df < 0 || df > ndf)
      {
        df = ndf;
        cl = i;
      }
    }

    return (cl < 0 ? ["#000000", "Invalid Color: " + color, false] : ["#" + ntc.names[cl][0], ntc.names[cl][1], false]);
  },

  // adopted from: Farbtastic 1.2
  // http://acko.net/dev/farbtastic
  hsl: function (color) {

    var rgb = [parseInt('0x' + color.substring(1, 3)) / 255, parseInt('0x' + color.substring(3, 5)) / 255, parseInt('0x' + color.substring(5, 7)) / 255];
    var min, max, delta, h, s, l;
    var r = rgb[0], g = rgb[1], b = rgb[2];

    min = Math.min(r, Math.min(g, b));
    max = Math.max(r, Math.max(g, b));
    delta = max - min;
    l = (min + max) / 2;

    s = 0;
    if(l > 0 && l < 1)
      s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));

    h = 0;
    if(delta > 0)
    {
      if (max == r && max != g) h += (g - b) / delta;
      if (max == g && max != b) h += (2 + (b - r) / delta);
      if (max == b && max != r) h += (4 + (r - g) / delta);
      h /= 6;
    }
    return [parseInt(h * 255), parseInt(s * 255), parseInt(l * 255)];
  },

  // adopted from: Farbtastic 1.2
  // http://acko.net/dev/farbtastic
  rgb: function(color) {
    return [parseInt('0x' + color.substring(1, 3)), parseInt('0x' + color.substring(3, 5)),  parseInt('0x' + color.substring(5, 7))];
  },

  names: [
          
 // Added all standard HTML color names / gaudenz, oct-2015
["F0F8FF", "aliceblue"],
["FAEBD7", "antiquewhite"],
["00FFFF", "aqua"],
["7FFFD4", "aquamarine"],
["F0FFFF", "azure"],
["F5F5DC", "beige"],
["FFE4C4", "bisque"],
["000000", "black"],
["FFEBCD", "blanchedalmond"],
["0000FF", "blue"],
["8A2BE2", "blueviolet"],
["A52A2A", "brown"],
["DEB887", "burlywood"],
["5F9EA0", "cadetblue"],
["7FFF00", "chartreuse"],
["D2691E", "chocolate"],
["FF7F50", "coral"],
["6495ED", "cornflowerblue"],
["FFF8DC", "cornsilk"],
["DC143C", "crimson"],
["00FFFF", "cyan"],
["00008B", "darkblue"],
["008B8B", "darkcyan"],
["B8860B", "darkgoldenrod"],
["A9A9A9", "darkgray"],
["A9A9A9", "darkgrey"],
["006400", "darkgreen"],
["BDB76B", "darkkhaki"],
["8B008B", "darkmagenta"],
["556B2F", "darkolivegreen"],
["FF8C00", "darkorange"],
["9932CC", "darkorchid"],
["8B0000", "darkred"],
["E9967A", "darksalmon"],
["8FBC8F", "darkseagreen"],
["483D8B", "darkslateblue"],
["2F4F4F", "darkslategray"],
["2F4F4F", "darkslategrey"],
["00CED1", "darkturquoise"],
["9400D3", "darkviolet"],
["FF1493", "deeppink"],
["00BFFF", "deepskyblue"],
["696969", "dimgray"],
["696969", "dimgrey"],
["1E90FF", "dodgerblue"],
["B22222", "firebrick"],
["FFFAF0", "floralwhite"],
["228B22", "forestgreen"],
["FF00FF", "fuchsia"],
["DCDCDC", "gainsboro"],
["F8F8FF", "ghostwhite"],
["FFD700", "gold"],
["DAA520", "goldenrod"],
["808080", "gray"],
["808080", "grey"],
["008000", "green"],
["ADFF2F", "greenyellow"],
["F0FFF0", "honeydew"],
["FF69B4", "hotpink"],
["CD5C5C", "indianred "],
["4B0082", "indigo "],
["FFFFF0", "ivory"],
["F0E68C", "khaki"],
["E6E6FA", "lavender"],
["FFF0F5", "lavenderblush"],
["7CFC00", "lawngreen"],
["FFFACD", "lemonchiffon"],
["ADD8E6", "lightblue"],
["F08080", "lightcoral"],
["E0FFFF", "lightcyan"],
["FAFAD2", "lightgoldenrodyellow"],
["D3D3D3", "lightgray"],
["D3D3D3", "lightgrey"],
["90EE90", "lightgreen"],
["FFB6C1", "lightpink"],
["FFA07A", "lightsalmon"],
["20B2AA", "lightseagreen"],
["87CEFA", "lightskyblue"],
["778899", "lightslategray"],
["778899", "lightslategrey"],
["B0C4DE", "lightsteelblue"],
["FFFFE0", "lightyellow"],
["00FF00", "lime"],
["32CD32", "limegreen"],
["FAF0E6", "linen"],
["FF00FF", "magenta"],
["800000", "maroon"],
["66CDAA", "mediumaquamarine"],
["0000CD", "mediumblue"],
["BA55D3", "mediumorchid"],
["9370DB", "mediumpurple"],
["3CB371", "mediumseagreen"],
["7B68EE", "mediumslateblue"],
["00FA9A", "mediumspringgreen"],
["48D1CC", "mediumturquoise"],
["C71585", "mediumvioletred"],
["191970", "midnightblue"],
["F5FFFA", "mintcream"],
["FFE4E1", "mistyrose"],
["FFE4B5", "moccasin"],
["FFDEAD", "navajowhite"],
["000080", "navy"],
["FDF5E6", "oldlace"],
["808000", "olive"],
["6B8E23", "olivedrab"],
["FFA500", "orange"],
["FF4500", "orangered"],
["DA70D6", "orchid"],
["EEE8AA", "palegoldenrod"],
["98FB98", "palegreen"],
["AFEEEE", "paleturquoise"],
["DB7093", "palevioletred"],
["FFEFD5", "papayawhip"],
["FFDAB9", "peachpuff"],
["CD853F", "peru"],
["FFC0CB", "pink"],
["DDA0DD", "plum"],
["B0E0E6", "powderblue"],
["800080", "purple"],
["FF0000", "red"],
["BC8F8F", "rosybrown"],
["4169E1", "royalblue"],
["8B4513", "saddlebrown"],
["FA8072", "salmon"],
["F4A460", "sandybrown"],
["2E8B57", "seagreen"],
["FFF5EE", "seashell"],
["A0522D", "sienna"],
["C0C0C0", "silver"],
["87CEEB", "skyblue"],
["6A5ACD", "slateblue"],
["708090", "slategray"],
["708090", "slategrey"],
["FFFAFA", "snow"],
["00FF7F", "springgreen"],
["4682B4", "steelblue"],
["D2B48C", "tan"],
["008080", "teal"],
["D8BFD8", "thistle"],
["FF6347", "tomato"],
["40E0D0", "turquoise"],
["EE82EE", "violet"],
["F5DEB3", "wheat"],
["FFFFFF", "white"],
["F5F5F5", "whitesmoke"],
["FFFF00", "yellow"],
["9ACD32", "yellowgreen"],
 
// Existing table
          
["000000", "Black"],
["000080", "Navy Blue"],
["0000C8", "Dark Blue"],
["0000FF", "Blue"],
["000741", "Stratos"],
["001B1C", "Swamp"],
["002387", "Resolution Blue"],
["002900", "Deep Fir"],
["002E20", "Burnham"],
["002FA7", "International Klein Blue"],
["003153", "Prussian Blue"],
["003366", "Midnight Blue"],
["003399", "Smalt"],
["003532", "Deep Teal"],
["003E40", "Cyprus"],
["004620", "Kaitoke Green"],
["0047AB", "Cobalt"],
["004816", "Crusoe"],
["004950", "Sherpa Blue"],
["0056A7", "Endeavour"],
["00581A", "Camarone"],
["0066CC", "Science Blue"],
["0066FF", "Blue Ribbon"],
["00755E", "Tropical Rain Forest"],
["0076A3", "Allports"],
["007BA7", "Deep Cerulean"],
["007EC7", "Lochmara"],
["007FFF", "Azure Radiance"],
["008080", "Teal"],
["0095B6", "Bondi Blue"],
["009DC4", "Pacific Blue"],
["00A693", "Persian Green"],
["00A86B", "Jade"],
["00CC99", "Caribbean Green"],
["00CCCC", "Robin's Egg Blue"],
["00FF00", "Green"],
["00FF7F", "Spring Green"],
["00FFFF", "Cyan / Aqua"],
["010D1A", "Blue Charcoal"],
["011635", "Midnight"],
["011D13", "Holly"],
["012731", "Daintree"],
["01361C", "Cardin Green"],
["01371A", "County Green"],
["013E62", "Astronaut Blue"],
["013F6A", "Regal Blue"],
["014B43", "Aqua Deep"],
["015E85", "Orient"],
["016162", "Blue Stone"],
["016D39", "Fun Green"],
["01796F", "Pine Green"],
["017987", "Blue Lagoon"],
["01826B", "Deep Sea"],
["01A368", "Green Haze"],
["022D15", "English Holly"],
["02402C", "Sherwood Green"],
["02478E", "Congress Blue"],
["024E46", "Evening Sea"],
["026395", "Bahama Blue"],
["02866F", "Observatory"],
["02A4D3", "Cerulean"],
["03163C", "Tangaroa"],
["032B52", "Green Vogue"],
["036A6E", "Mosque"],
["041004", "Midnight Moss"],
["041322", "Black Pearl"],
["042E4C", "Blue Whale"],
["044022", "Zuccini"],
["044259", "Teal Blue"],
["051040", "Deep Cove"],
["051657", "Gulf Blue"],
["055989", "Venice Blue"],
["056F57", "Watercourse"],
["062A78", "Catalina Blue"],
["063537", "Tiber"],
["069B81", "Gossamer"],
["06A189", "Niagara"],
["073A50", "Tarawera"],
["080110", "Jaguar"],
["081910", "Black Bean"],
["082567", "Deep Sapphire"],
["088370", "Elf Green"],
["08E8DE", "Bright Turquoise"],
["092256", "Downriver"],
["09230F", "Palm Green"],
["09255D", "Madison"],
["093624", "Bottle Green"],
["095859", "Deep Sea Green"],
["097F4B", "Salem"],
["0A001C", "Black Russian"],
["0A480D", "Dark Fern"],
["0A6906", "Japanese Laurel"],
["0A6F75", "Atoll"],
["0B0B0B", "Cod Gray"],
["0B0F08", "Marshland"],
["0B1107", "Gordons Green"],
["0B1304", "Black Forest"],
["0B6207", "San Felix"],
["0BDA51", "Malachite"],
["0C0B1D", "Ebony"],
["0C0D0F", "Woodsmoke"],
["0C1911", "Racing Green"],
["0C7A79", "Surfie Green"],
["0C8990", "Blue Chill"],
["0D0332", "Black Rock"],
["0D1117", "Bunker"],
["0D1C19", "Aztec"],
["0D2E1C", "Bush"],
["0E0E18", "Cinder"],
["0E2A30", "Firefly"],
["0F2D9E", "Torea Bay"],
["10121D", "Vulcan"],
["101405", "Green Waterloo"],
["105852", "Eden"],
["110C6C", "Arapawa"],
["120A8F", "Ultramarine"],
["123447", "Elephant"],
["126B40", "Jewel"],
["130000", "Diesel"],
["130A06", "Asphalt"],
["13264D", "Blue Zodiac"],
["134F19", "Parsley"],
["140600", "Nero"],
["1450AA", "Tory Blue"],
["151F4C", "Bunting"],
["1560BD", "Denim"],
["15736B", "Genoa"],
["161928", "Mirage"],
["161D10", "Hunter Green"],
["162A40", "Big Stone"],
["163222", "Celtic"],
["16322C", "Timber Green"],
["163531", "Gable Green"],
["171F04", "Pine Tree"],
["175579", "Chathams Blue"],
["182D09", "Deep Forest Green"],
["18587A", "Blumine"],
["19330E", "Palm Leaf"],
["193751", "Nile Blue"],
["1959A8", "Fun Blue"],
["1A1A68", "Lucky Point"],
["1AB385", "Mountain Meadow"],
["1B0245", "Tolopea"],
["1B1035", "Haiti"],
["1B127B", "Deep Koamaru"],
["1B1404", "Acadia"],
["1B2F11", "Seaweed"],
["1B3162", "Biscay"],
["1B659D", "Matisse"],
["1C1208", "Crowshead"],
["1C1E13", "Rangoon Green"],
["1C39BB", "Persian Blue"],
["1C402E", "Everglade"],
["1C7C7D", "Elm"],
["1D6142", "Green Pea"],
["1E0F04", "Creole"],
["1E1609", "Karaka"],
["1E1708", "El Paso"],
["1E385B", "Cello"],
["1E433C", "Te Papa Green"],
["1E90FF", "Dodger Blue"],
["1E9AB0", "Eastern Blue"],
["1F120F", "Night Rider"],
["1FC2C2", "Java"],
["20208D", "Jacksons Purple"],
["202E54", "Cloud Burst"],
["204852", "Blue Dianne"],
["211A0E", "Eternity"],
["220878", "Deep Blue"],
["228B22", "Forest Green"],
["233418", "Mallard"],
["240A40", "Violet"],
["240C02", "Kilamanjaro"],
["242A1D", "Log Cabin"],
["242E16", "Black Olive"],
["24500F", "Green House"],
["251607", "Graphite"],
["251706", "Cannon Black"],
["251F4F", "Port Gore"],
["25272C", "Shark"],
["25311C", "Green Kelp"],
["2596D1", "Curious Blue"],
["260368", "Paua"],
["26056A", "Paris M"],
["261105", "Wood Bark"],
["261414", "Gondola"],
["262335", "Steel Gray"],
["26283B", "Ebony Clay"],
["273A81", "Bay of Many"],
["27504B", "Plantation"],
["278A5B", "Eucalyptus"],
["281E15", "Oil"],
["283A77", "Astronaut"],
["286ACD", "Mariner"],
["290C5E", "Violent Violet"],
["292130", "Bastille"],
["292319", "Zeus"],
["292937", "Charade"],
["297B9A", "Jelly Bean"],
["29AB87", "Jungle Green"],
["2A0359", "Cherry Pie"],
["2A140E", "Coffee Bean"],
["2A2630", "Baltic Sea"],
["2A380B", "Turtle Green"],
["2A52BE", "Cerulean Blue"],
["2B0202", "Sepia Black"],
["2B194F", "Valhalla"],
["2B3228", "Heavy Metal"],
["2C0E8C", "Blue Gem"],
["2C1632", "Revolver"],
["2C2133", "Bleached Cedar"],
["2C8C84", "Lochinvar"],
["2D2510", "Mikado"],
["2D383A", "Outer Space"],
["2D569B", "St Tropaz"],
["2E0329", "Jacaranda"],
["2E1905", "Jacko Bean"],
["2E3222", "Rangitoto"],
["2E3F62", "Rhino"],
["2E8B57", "Sea Green"],
["2EBFD4", "Scooter"],
["2F270E", "Onion"],
["2F3CB3", "Governor Bay"],
["2F519E", "Sapphire"],
["2F5A57", "Spectra"],
["2F6168", "Casal"],
["300529", "Melanzane"],
["301F1E", "Cocoa Brown"],
["302A0F", "Woodrush"],
["304B6A", "San Juan"],
["30D5C8", "Turquoise"],
["311C17", "Eclipse"],
["314459", "Pickled Bluewood"],
["315BA1", "Azure"],
["31728D", "Calypso"],
["317D82", "Paradiso"],
["32127A", "Persian Indigo"],
["32293A", "Blackcurrant"],
["323232", "Mine Shaft"],
["325D52", "Stromboli"],
["327C14", "Bilbao"],
["327DA0", "Astral"],
["33036B", "Christalle"],
["33292F", "Thunder"],
["33CC99", "Shamrock"],
["341515", "Tamarind"],
["350036", "Mardi Gras"],
["350E42", "Valentino"],
["350E57", "Jagger"],
["353542", "Tuna"],
["354E8C", "Chambray"],
["363050", "Martinique"],
["363534", "Tuatara"],
["363C0D", "Waiouru"],
["36747D", "Ming"],
["368716", "La Palma"],
["370202", "Chocolate"],
["371D09", "Clinker"],
["37290E", "Brown Tumbleweed"],
["373021", "Birch"],
["377475", "Oracle"],
["380474", "Blue Diamond"],
["381A51", "Grape"],
["383533", "Dune"],
["384555", "Oxford Blue"],
["384910", "Clover"],
["394851", "Limed Spruce"],
["396413", "Dell"],
["3A0020", "Toledo"],
["3A2010", "Sambuca"],
["3A2A6A", "Jacarta"],
["3A686C", "William"],
["3A6A47", "Killarney"],
["3AB09E", "Keppel"],
["3B000B", "Temptress"],
["3B0910", "Aubergine"],
["3B1F1F", "Jon"],
["3B2820", "Treehouse"],
["3B7A57", "Amazon"],
["3B91B4", "Boston Blue"],
["3C0878", "Windsor"],
["3C1206", "Rebel"],
["3C1F76", "Meteorite"],
["3C2005", "Dark Ebony"],
["3C3910", "Camouflage"],
["3C4151", "Bright Gray"],
["3C4443", "Cape Cod"],
["3C493A", "Lunar Green"],
["3D0C02", "Bean  "],
["3D2B1F", "Bistre"],
["3D7D52", "Goblin"],
["3E0480", "Kingfisher Daisy"],
["3E1C14", "Cedar"],
["3E2B23", "English Walnut"],
["3E2C1C", "Black Marlin"],
["3E3A44", "Ship Gray"],
["3EABBF", "Pelorous"],
["3F2109", "Bronze"],
["3F2500", "Cola"],
["3F3002", "Madras"],
["3F307F", "Minsk"],
["3F4C3A", "Cabbage Pont"],
["3F583B", "Tom Thumb"],
["3F5D53", "Mineral Green"],
["3FC1AA", "Puerto Rico"],
["3FFF00", "Harlequin"],
["401801", "Brown Pod"],
["40291D", "Cork"],
["403B38", "Masala"],
["403D19", "Thatch Green"],
["405169", "Fiord"],
["40826D", "Viridian"],
["40A860", "Chateau Green"],
["410056", "Ripe Plum"],
["411F10", "Paco"],
["412010", "Deep Oak"],
["413C37", "Merlin"],
["414257", "Gun Powder"],
["414C7D", "East Bay"],
["4169E1", "Royal Blue"],
["41AA78", "Ocean Green"],
["420303", "Burnt Maroon"],
["423921", "Lisbon Brown"],
["427977", "Faded Jade"],
["431560", "Scarlet Gum"],
["433120", "Iroko"],
["433E37", "Armadillo"],
["434C59", "River Bed"],
["436A0D", "Green Leaf"],
["44012D", "Barossa"],
["441D00", "Morocco Brown"],
["444954", "Mako"],
["454936", "Kelp"],
["456CAC", "San Marino"],
["45B1E8", "Picton Blue"],
["460B41", "Loulou"],
["462425", "Crater Brown"],
["465945", "Gray Asparagus"],
["4682B4", "Steel Blue"],
["480404", "Rustic Red"],
["480607", "Bulgarian Rose"],
["480656", "Clairvoyant"],
["481C1C", "Cocoa Bean"],
["483131", "Woody Brown"],
["483C32", "Taupe"],
["49170C", "Van Cleef"],
["492615", "Brown Derby"],
["49371B", "Metallic Bronze"],
["495400", "Verdun Green"],
["496679", "Blue Bayoux"],
["497183", "Bismark"],
["4A2A04", "Bracken"],
["4A3004", "Deep Bronze"],
["4A3C30", "Mondo"],
["4A4244", "Tundora"],
["4A444B", "Gravel"],
["4A4E5A", "Trout"],
["4B0082", "Pigment Indigo"],
["4B5D52", "Nandor"],
["4C3024", "Saddle"],
["4C4F56", "Abbey"],
["4D0135", "Blackberry"],
["4D0A18", "Cab Sav"],
["4D1E01", "Indian Tan"],
["4D282D", "Cowboy"],
["4D282E", "Livid Brown"],
["4D3833", "Rock"],
["4D3D14", "Punga"],
["4D400F", "Bronzetone"],
["4D5328", "Woodland"],
["4E0606", "Mahogany"],
["4E2A5A", "Bossanova"],
["4E3B41", "Matterhorn"],
["4E420C", "Bronze Olive"],
["4E4562", "Mulled Wine"],
["4E6649", "Axolotl"],
["4E7F9E", "Wedgewood"],
["4EABD1", "Shakespeare"],
["4F1C70", "Honey Flower"],
["4F2398", "Daisy Bush"],
["4F69C6", "Indigo"],
["4F7942", "Fern Green"],
["4F9D5D", "Fruit Salad"],
["4FA83D", "Apple"],
["504351", "Mortar"],
["507096", "Kashmir Blue"],
["507672", "Cutty Sark"],
["50C878", "Emerald"],
["514649", "Emperor"],
["516E3D", "Chalet Green"],
["517C66", "Como"],
["51808F", "Smalt Blue"],
["52001F", "Castro"],
["520C17", "Maroon Oak"],
["523C94", "Gigas"],
["533455", "Voodoo"],
["534491", "Victoria"],
["53824B", "Hippie Green"],
["541012", "Heath"],
["544333", "Judge Gray"],
["54534D", "Fuscous Gray"],
["549019", "Vida Loca"],
["55280C", "Cioccolato"],
["555B10", "Saratoga"],
["556D56", "Finlandia"],
["5590D9", "Havelock Blue"],
["56B4BE", "Fountain Blue"],
["578363", "Spring Leaves"],
["583401", "Saddle Brown"],
["585562", "Scarpa Flow"],
["587156", "Cactus"],
["589AAF", "Hippie Blue"],
["591D35", "Wine Berry"],
["592804", "Brown Bramble"],
["593737", "Congo Brown"],
["594433", "Millbrook"],
["5A6E9C", "Waikawa Gray"],
["5A87A0", "Horizon"],
["5B3013", "Jambalaya"],
["5C0120", "Bordeaux"],
["5C0536", "Mulberry Wood"],
["5C2E01", "Carnaby Tan"],
["5C5D75", "Comet"],
["5D1E0F", "Redwood"],
["5D4C51", "Don Juan"],
["5D5C58", "Chicago"],
["5D5E37", "Verdigris"],
["5D7747", "Dingley"],
["5DA19F", "Breaker Bay"],
["5E483E", "Kabul"],
["5E5D3B", "Hemlock"],
["5F3D26", "Irish Coffee"],
["5F5F6E", "Mid Gray"],
["5F6672", "Shuttle Gray"],
["5FA777", "Aqua Forest"],
["5FB3AC", "Tradewind"],
["604913", "Horses Neck"],
["605B73", "Smoky"],
["606E68", "Corduroy"],
["6093D1", "Danube"],
["612718", "Espresso"],
["614051", "Eggplant"],
["615D30", "Costa Del Sol"],
["61845F", "Glade Green"],
["622F30", "Buccaneer"],
["623F2D", "Quincy"],
["624E9A", "Butterfly Bush"],
["625119", "West Coast"],
["626649", "Finch"],
["639A8F", "Patina"],
["63B76C", "Fern"],
["6456B7", "Blue Violet"],
["646077", "Dolphin"],
["646463", "Storm Dust"],
["646A54", "Siam"],
["646E75", "Nevada"],
["6495ED", "Cornflower Blue"],
["64CCDB", "Viking"],
["65000B", "Rosewood"],
["651A14", "Cherrywood"],
["652DC1", "Purple Heart"],
["657220", "Fern Frond"],
["65745D", "Willow Grove"],
["65869F", "Hoki"],
["660045", "Pompadour"],
["660099", "Purple"],
["66023C", "Tyrian Purple"],
["661010", "Dark Tan"],
["66B58F", "Silver Tree"],
["66FF00", "Bright Green"],
["66FF66", "Screamin' Green"],
["67032D", "Black Rose"],
["675FA6", "Scampi"],
["676662", "Ironside Gray"],
["678975", "Viridian Green"],
["67A712", "Christi"],
["683600", "Nutmeg Wood Finish"],
["685558", "Zambezi"],
["685E6E", "Salt Box"],
["692545", "Tawny Port"],
["692D54", "Finn"],
["695F62", "Scorpion"],
["697E9A", "Lynch"],
["6A442E", "Spice"],
["6A5D1B", "Himalaya"],
["6A6051", "Soya Bean"],
["6B2A14", "Hairy Heath"],
["6B3FA0", "Royal Purple"],
["6B4E31", "Shingle Fawn"],
["6B5755", "Dorado"],
["6B8BA2", "Bermuda Gray"],
["6B8E23", "Olive Drab"],
["6C3082", "Eminence"],
["6CDAE7", "Turquoise Blue"],
["6D0101", "Lonestar"],
["6D5E54", "Pine Cone"],
["6D6C6C", "Dove Gray"],
["6D9292", "Juniper"],
["6D92A1", "Gothic"],
["6E0902", "Red Oxide"],
["6E1D14", "Moccaccino"],
["6E4826", "Pickled Bean"],
["6E4B26", "Dallas"],
["6E6D57", "Kokoda"],
["6E7783", "Pale Sky"],
["6F440C", "Cafe Royale"],
["6F6A61", "Flint"],
["6F8E63", "Highland"],
["6F9D02", "Limeade"],
["6FD0C5", "Downy"],
["701C1C", "Persian Plum"],
["704214", "Sepia"],
["704A07", "Antique Bronze"],
["704F50", "Ferra"],
["706555", "Coffee"],
["708090", "Slate Gray"],
["711A00", "Cedar Wood Finish"],
["71291D", "Metallic Copper"],
["714693", "Affair"],
["714AB2", "Studio"],
["715D47", "Tobacco Brown"],
["716338", "Yellow Metal"],
["716B56", "Peat"],
["716E10", "Olivetone"],
["717486", "Storm Gray"],
["718080", "Sirocco"],
["71D9E2", "Aquamarine Blue"],
["72010F", "Venetian Red"],
["724A2F", "Old Copper"],
["726D4E", "Go Ben"],
["727B89", "Raven"],
["731E8F", "Seance"],
["734A12", "Raw Umber"],
["736C9F", "Kimberly"],
["736D58", "Crocodile"],
["737829", "Crete"],
["738678", "Xanadu"],
["74640D", "Spicy Mustard"],
["747D63", "Limed Ash"],
["747D83", "Rolling Stone"],
["748881", "Blue Smoke"],
["749378", "Laurel"],
["74C365", "Mantis"],
["755A57", "Russett"],
["7563A8", "Deluge"],
["76395D", "Cosmic"],
["7666C6", "Blue Marguerite"],
["76BD17", "Lima"],
["76D7EA", "Sky Blue"],
["770F05", "Dark Burgundy"],
["771F1F", "Crown of Thorns"],
["773F1A", "Walnut"],
["776F61", "Pablo"],
["778120", "Pacifika"],
["779E86", "Oxley"],
["77DD77", "Pastel Green"],
["780109", "Japanese Maple"],
["782D19", "Mocha"],
["782F16", "Peanut"],
["78866B", "Camouflage Green"],
["788A25", "Wasabi"],
["788BBA", "Ship Cove"],
["78A39C", "Sea Nymph"],
["795D4C", "Roman Coffee"],
["796878", "Old Lavender"],
["796989", "Rum"],
["796A78", "Fedora"],
["796D62", "Sandstone"],
["79DEEC", "Spray"],
["7A013A", "Siren"],
["7A58C1", "Fuchsia Blue"],
["7A7A7A", "Boulder"],
["7A89B8", "Wild Blue Yonder"],
["7AC488", "De York"],
["7B3801", "Red Beech"],
["7B3F00", "Cinnamon"],
["7B6608", "Yukon Gold"],
["7B7874", "Tapa"],
["7B7C94", "Waterloo "],
["7B8265", "Flax Smoke"],
["7B9F80", "Amulet"],
["7BA05B", "Asparagus"],
["7C1C05", "Kenyan Copper"],
["7C7631", "Pesto"],
["7C778A", "Topaz"],
["7C7B7A", "Concord"],
["7C7B82", "Jumbo"],
["7C881A", "Trendy Green"],
["7CA1A6", "Gumbo"],
["7CB0A1", "Acapulco"],
["7CB7BB", "Neptune"],
["7D2C14", "Pueblo"],
["7DA98D", "Bay Leaf"],
["7DC8F7", "Malibu"],
["7DD8C6", "Bermuda"],
["7E3A15", "Copper Canyon"],
["7F1734", "Claret"],
["7F3A02", "Peru Tan"],
["7F626D", "Falcon"],
["7F7589", "Mobster"],
["7F76D3", "Moody Blue"],
["7FFF00", "Chartreuse"],
["7FFFD4", "Aquamarine"],
["800000", "Maroon"],
["800B47", "Rose Bud Cherry"],
["801818", "Falu Red"],
["80341F", "Red Robin"],
["803790", "Vivid Violet"],
["80461B", "Russet"],
["807E79", "Friar Gray"],
["808000", "Olive"],
["808080", "Gray"],
["80B3AE", "Gulf Stream"],
["80B3C4", "Glacier"],
["80CCEA", "Seagull"],
["81422C", "Nutmeg"],
["816E71", "Spicy Pink"],
["817377", "Empress"],
["819885", "Spanish Green"],
["826F65", "Sand Dune"],
["828685", "Gunsmoke"],
["828F72", "Battleship Gray"],
["831923", "Merlot"],
["837050", "Shadow"],
["83AA5D", "Chelsea Cucumber"],
["83D0C6", "Monte Carlo"],
["843179", "Plum"],
["84A0A0", "Granny Smith"],
["8581D9", "Chetwode Blue"],
["858470", "Bandicoot"],
["859FAF", "Bali Hai"],
["85C4CC", "Half Baked"],
["860111", "Red Devil"],
["863C3C", "Lotus"],
["86483C", "Ironstone"],
["864D1E", "Bull Shot"],
["86560A", "Rusty Nail"],
["868974", "Bitter"],
["86949F", "Regent Gray"],
["871550", "Disco"],
["87756E", "Americano"],
["877C7B", "Hurricane"],
["878D91", "Oslo Gray"],
["87AB39", "Sushi"],
["885342", "Spicy Mix"],
["886221", "Kumera"],
["888387", "Suva Gray"],
["888D65", "Avocado"],
["893456", "Camelot"],
["893843", "Solid Pink"],
["894367", "Cannon Pink"],
["897D6D", "Makara"],
["8A3324", "Burnt Umber"],
["8A73D6", "True V"],
["8A8360", "Clay Creek"],
["8A8389", "Monsoon"],
["8A8F8A", "Stack"],
["8AB9F1", "Jordy Blue"],
["8B00FF", "Electric Violet"],
["8B0723", "Monarch"],
["8B6B0B", "Corn Harvest"],
["8B8470", "Olive Haze"],
["8B847E", "Schooner"],
["8B8680", "Natural Gray"],
["8B9C90", "Mantle"],
["8B9FEE", "Portage"],
["8BA690", "Envy"],
["8BA9A5", "Cascade"],
["8BE6D8", "Riptide"],
["8C055E", "Cardinal Pink"],
["8C472F", "Mule Fawn"],
["8C5738", "Potters Clay"],
["8C6495", "Trendy Pink"],
["8D0226", "Paprika"],
["8D3D38", "Sanguine Brown"],
["8D3F3F", "Tosca"],
["8D7662", "Cement"],
["8D8974", "Granite Green"],
["8D90A1", "Manatee"],
["8DA8CC", "Polo Blue"],
["8E0000", "Red Berry"],
["8E4D1E", "Rope"],
["8E6F70", "Opium"],
["8E775E", "Domino"],
["8E8190", "Mamba"],
["8EABC1", "Nepal"],
["8F021C", "Pohutukawa"],
["8F3E33", "El Salva"],
["8F4B0E", "Korma"],
["8F8176", "Squirrel"],
["8FD6B4", "Vista Blue"],
["900020", "Burgundy"],
["901E1E", "Old Brick"],
["907874", "Hemp"],
["907B71", "Almond Frost"],
["908D39", "Sycamore"],
["92000A", "Sangria"],
["924321", "Cumin"],
["926F5B", "Beaver"],
["928573", "Stonewall"],
["928590", "Venus"],
["9370DB", "Medium Purple"],
["93CCEA", "Cornflower"],
["93DFB8", "Algae Green"],
["944747", "Copper Rust"],
["948771", "Arrowtown"],
["950015", "Scarlett"],
["956387", "Strikemaster"],
["959396", "Mountain Mist"],
["960018", "Carmine"],
["964B00", "Brown"],
["967059", "Leather"],
["9678B6", "Purple Mountain's Majesty"],
["967BB6", "Lavender Purple"],
["96A8A1", "Pewter"],
["96BBAB", "Summer Green"],
["97605D", "Au Chico"],
["9771B5", "Wisteria"],
["97CD2D", "Atlantis"],
["983D61", "Vin Rouge"],
["9874D3", "Lilac Bush"],
["98777B", "Bazaar"],
["98811B", "Hacienda"],
["988D77", "Pale Oyster"],
["98FF98", "Mint Green"],
["990066", "Fresh Eggplant"],
["991199", "Violet Eggplant"],
["991613", "Tamarillo"],
["991B07", "Totem Pole"],
["996666", "Copper Rose"],
["9966CC", "Amethyst"],
["997A8D", "Mountbatten Pink"],
["9999CC", "Blue Bell"],
["9A3820", "Prairie Sand"],
["9A6E61", "Toast"],
["9A9577", "Gurkha"],
["9AB973", "Olivine"],
["9AC2B8", "Shadow Green"],
["9B4703", "Oregon"],
["9B9E8F", "Lemon Grass"],
["9C3336", "Stiletto"],
["9D5616", "Hawaiian Tan"],
["9DACB7", "Gull Gray"],
["9DC209", "Pistachio"],
["9DE093", "Granny Smith Apple"],
["9DE5FF", "Anakiwa"],
["9E5302", "Chelsea Gem"],
["9E5B40", "Sepia Skin"],
["9EA587", "Sage"],
["9EA91F", "Citron"],
["9EB1CD", "Rock Blue"],
["9EDEE0", "Morning Glory"],
["9F381D", "Cognac"],
["9F821C", "Reef Gold"],
["9F9F9C", "Star Dust"],
["9FA0B1", "Santas Gray"],
["9FD7D3", "Sinbad"],
["9FDD8C", "Feijoa"],
["A02712", "Tabasco"],
["A1750D", "Buttered Rum"],
["A1ADB5", "Hit Gray"],
["A1C50A", "Citrus"],
["A1DAD7", "Aqua Island"],
["A1E9DE", "Water Leaf"],
["A2006D", "Flirt"],
["A23B6C", "Rouge"],
["A26645", "Cape Palliser"],
["A2AAB3", "Gray Chateau"],
["A2AEAB", "Edward"],
["A3807B", "Pharlap"],
["A397B4", "Amethyst Smoke"],
["A3E3ED", "Blizzard Blue"],
["A4A49D", "Delta"],
["A4A6D3", "Wistful"],
["A4AF6E", "Green Smoke"],
["A50B5E", "Jazzberry Jam"],
["A59B91", "Zorba"],
["A5CB0C", "Bahia"],
["A62F20", "Roof Terracotta"],
["A65529", "Paarl"],
["A68B5B", "Barley Corn"],
["A69279", "Donkey Brown"],
["A6A29A", "Dawn"],
["A72525", "Mexican Red"],
["A7882C", "Luxor Gold"],
["A85307", "Rich Gold"],
["A86515", "Reno Sand"],
["A86B6B", "Coral Tree"],
["A8989B", "Dusty Gray"],
["A899E6", "Dull Lavender"],
["A8A589", "Tallow"],
["A8AE9C", "Bud"],
["A8AF8E", "Locust"],
["A8BD9F", "Norway"],
["A8E3BD", "Chinook"],
["A9A491", "Gray Olive"],
["A9ACB6", "Aluminium"],
["A9B2C3", "Cadet Blue"],
["A9B497", "Schist"],
["A9BDBF", "Tower Gray"],
["A9BEF2", "Perano"],
["A9C6C2", "Opal"],
["AA375A", "Night Shadz"],
["AA4203", "Fire"],
["AA8B5B", "Muesli"],
["AA8D6F", "Sandal"],
["AAA5A9", "Shady Lady"],
["AAA9CD", "Logan"],
["AAABB7", "Spun Pearl"],
["AAD6E6", "Regent St Blue"],
["AAF0D1", "Magic Mint"],
["AB0563", "Lipstick"],
["AB3472", "Royal Heath"],
["AB917A", "Sandrift"],
["ABA0D9", "Cold Purple"],
["ABA196", "Bronco"],
["AC8A56", "Limed Oak"],
["AC91CE", "East Side"],
["AC9E22", "Lemon Ginger"],
["ACA494", "Napa"],
["ACA586", "Hillary"],
["ACA59F", "Cloudy"],
["ACACAC", "Silver Chalice"],
["ACB78E", "Swamp Green"],
["ACCBB1", "Spring Rain"],
["ACDD4D", "Conifer"],
["ACE1AF", "Celadon"],
["AD781B", "Mandalay"],
["ADBED1", "Casper"],
["ADDFAD", "Moss Green"],
["ADE6C4", "Padua"],
["ADFF2F", "Green Yellow"],
["AE4560", "Hippie Pink"],
["AE6020", "Desert"],
["AE809E", "Bouquet"],
["AF4035", "Medium Carmine"],
["AF4D43", "Apple Blossom"],
["AF593E", "Brown Rust"],
["AF8751", "Driftwood"],
["AF8F2C", "Alpine"],
["AF9F1C", "Lucky"],
["AFA09E", "Martini"],
["AFB1B8", "Bombay"],
["AFBDD9", "Pigeon Post"],
["B04C6A", "Cadillac"],
["B05D54", "Matrix"],
["B05E81", "Tapestry"],
["B06608", "Mai Tai"],
["B09A95", "Del Rio"],
["B0E0E6", "Powder Blue"],
["B0E313", "Inch Worm"],
["B10000", "Bright Red"],
["B14A0B", "Vesuvius"],
["B1610B", "Pumpkin Skin"],
["B16D52", "Santa Fe"],
["B19461", "Teak"],
["B1E2C1", "Fringy Flower"],
["B1F4E7", "Ice Cold"],
["B20931", "Shiraz"],
["B2A1EA", "Biloba Flower"],
["B32D29", "Tall Poppy"],
["B35213", "Fiery Orange"],
["B38007", "Hot Toddy"],
["B3AF95", "Taupe Gray"],
["B3C110", "La Rioja"],
["B43332", "Well Read"],
["B44668", "Blush"],
["B4CFD3", "Jungle Mist"],
["B57281", "Turkish Rose"],
["B57EDC", "Lavender"],
["B5A27F", "Mongoose"],
["B5B35C", "Olive Green"],
["B5D2CE", "Jet Stream"],
["B5ECDF", "Cruise"],
["B6316C", "Hibiscus"],
["B69D98", "Thatch"],
["B6B095", "Heathered Gray"],
["B6BAA4", "Eagle"],
["B6D1EA", "Spindle"],
["B6D3BF", "Gum Leaf"],
["B7410E", "Rust"],
["B78E5C", "Muddy Waters"],
["B7A214", "Sahara"],
["B7A458", "Husk"],
["B7B1B1", "Nobel"],
["B7C3D0", "Heather"],
["B7F0BE", "Madang"],
["B81104", "Milano Red"],
["B87333", "Copper"],
["B8B56A", "Gimblet"],
["B8C1B1", "Green Spring"],
["B8C25D", "Celery"],
["B8E0F9", "Sail"],
["B94E48", "Chestnut"],
["B95140", "Crail"],
["B98D28", "Marigold"],
["B9C46A", "Wild Willow"],
["B9C8AC", "Rainee"],
["BA0101", "Guardsman Red"],
["BA450C", "Rock Spray"],
["BA6F1E", "Bourbon"],
["BA7F03", "Pirate Gold"],
["BAB1A2", "Nomad"],
["BAC7C9", "Submarine"],
["BAEEF9", "Charlotte"],
["BB3385", "Medium Red Violet"],
["BB8983", "Brandy Rose"],
["BBD009", "Rio Grande"],
["BBD7C1", "Surf"],
["BCC9C2", "Powder Ash"],
["BD5E2E", "Tuscany"],
["BD978E", "Quicksand"],
["BDB1A8", "Silk"],
["BDB2A1", "Malta"],
["BDB3C7", "Chatelle"],
["BDBBD7", "Lavender Gray"],
["BDBDC6", "French Gray"],
["BDC8B3", "Clay Ash"],
["BDC9CE", "Loblolly"],
["BDEDFD", "French Pass"],
["BEA6C3", "London Hue"],
["BEB5B7", "Pink Swan"],
["BEDE0D", "Fuego"],
["BF5500", "Rose of Sharon"],
["BFB8B0", "Tide"],
["BFBED8", "Blue Haze"],
["BFC1C2", "Silver Sand"],
["BFC921", "Key Lime Pie"],
["BFDBE2", "Ziggurat"],
["BFFF00", "Lime"],
["C02B18", "Thunderbird"],
["C04737", "Mojo"],
["C08081", "Old Rose"],
["C0C0C0", "Silver"],
["C0D3B9", "Pale Leaf"],
["C0D8B6", "Pixie Green"],
["C1440E", "Tia Maria"],
["C154C1", "Fuchsia Pink"],
["C1A004", "Buddha Gold"],
["C1B7A4", "Bison Hide"],
["C1BAB0", "Tea"],
["C1BECD", "Gray Suit"],
["C1D7B0", "Sprout"],
["C1F07C", "Sulu"],
["C26B03", "Indochine"],
["C2955D", "Twine"],
["C2BDB6", "Cotton Seed"],
["C2CAC4", "Pumice"],
["C2E8E5", "Jagged Ice"],
["C32148", "Maroon Flush"],
["C3B091", "Indian Khaki"],
["C3BFC1", "Pale Slate"],
["C3C3BD", "Gray Nickel"],
["C3CDE6", "Periwinkle Gray"],
["C3D1D1", "Tiara"],
["C3DDF9", "Tropical Blue"],
["C41E3A", "Cardinal"],
["C45655", "Fuzzy Wuzzy Brown"],
["C45719", "Orange Roughy"],
["C4C4BC", "Mist Gray"],
["C4D0B0", "Coriander"],
["C4F4EB", "Mint Tulip"],
["C54B8C", "Mulberry"],
["C59922", "Nugget"],
["C5994B", "Tussock"],
["C5DBCA", "Sea Mist"],
["C5E17A", "Yellow Green"],
["C62D42", "Brick Red"],
["C6726B", "Contessa"],
["C69191", "Oriental Pink"],
["C6A84B", "Roti"],
["C6C3B5", "Ash"],
["C6C8BD", "Kangaroo"],
["C6E610", "Las Palmas"],
["C7031E", "Monza"],
["C71585", "Red Violet"],
["C7BCA2", "Coral Reef"],
["C7C1FF", "Melrose"],
["C7C4BF", "Cloud"],
["C7C9D5", "Ghost"],
["C7CD90", "Pine Glade"],
["C7DDE5", "Botticelli"],
["C88A65", "Antique Brass"],
["C8A2C8", "Lilac"],
["C8A528", "Hokey Pokey"],
["C8AABF", "Lily"],
["C8B568", "Laser"],
["C8E3D7", "Edgewater"],
["C96323", "Piper"],
["C99415", "Pizza"],
["C9A0DC", "Light Wisteria"],
["C9B29B", "Rodeo Dust"],
["C9B35B", "Sundance"],
["C9B93B", "Earls Green"],
["C9C0BB", "Silver Rust"],
["C9D9D2", "Conch"],
["C9FFA2", "Reef"],
["C9FFE5", "Aero Blue"],
["CA3435", "Flush Mahogany"],
["CABB48", "Turmeric"],
["CADCD4", "Paris White"],
["CAE00D", "Bitter Lemon"],
["CAE6DA", "Skeptic"],
["CB8FA9", "Viola"],
["CBCAB6", "Foggy Gray"],
["CBD3B0", "Green Mist"],
["CBDBD6", "Nebula"],
["CC3333", "Persian Red"],
["CC5500", "Burnt Orange"],
["CC7722", "Ochre"],
["CC8899", "Puce"],
["CCCAA8", "Thistle Green"],
["CCCCFF", "Periwinkle"],
["CCFF00", "Electric Lime"],
["CD5700", "Tenn"],
["CD5C5C", "Chestnut Rose"],
["CD8429", "Brandy Punch"],
["CDF4FF", "Onahau"],
["CEB98F", "Sorrell Brown"],
["CEBABA", "Cold Turkey"],
["CEC291", "Yuma"],
["CEC7A7", "Chino"],
["CFA39D", "Eunry"],
["CFB53B", "Old Gold"],
["CFDCCF", "Tasman"],
["CFE5D2", "Surf Crest"],
["CFF9F3", "Humming Bird"],
["CFFAF4", "Scandal"],
["D05F04", "Red Stage"],
["D06DA1", "Hopbush"],
["D07D12", "Meteor"],
["D0BEF8", "Perfume"],
["D0C0E5", "Prelude"],
["D0F0C0", "Tea Green"],
["D18F1B", "Geebung"],
["D1BEA8", "Vanilla"],
["D1C6B4", "Soft Amber"],
["D1D2CA", "Celeste"],
["D1D2DD", "Mischka"],
["D1E231", "Pear"],
["D2691E", "Hot Cinnamon"],
["D27D46", "Raw Sienna"],
["D29EAA", "Careys Pink"],
["D2B48C", "Tan"],
["D2DA97", "Deco"],
["D2F6DE", "Blue Romance"],
["D2F8B0", "Gossip"],
["D3CBBA", "Sisal"],
["D3CDC5", "Swirl"],
["D47494", "Charm"],
["D4B6AF", "Clam Shell"],
["D4BF8D", "Straw"],
["D4C4A8", "Akaroa"],
["D4CD16", "Bird Flower"],
["D4D7D9", "Iron"],
["D4DFE2", "Geyser"],
["D4E2FC", "Hawkes Blue"],
["D54600", "Grenadier"],
["D591A4", "Can Can"],
["D59A6F", "Whiskey"],
["D5D195", "Winter Hazel"],
["D5F6E3", "Granny Apple"],
["D69188", "My Pink"],
["D6C562", "Tacha"],
["D6CEF6", "Moon Raker"],
["D6D6D1", "Quill Gray"],
["D6FFDB", "Snowy Mint"],
["D7837F", "New York Pink"],
["D7C498", "Pavlova"],
["D7D0FF", "Fog"],
["D84437", "Valencia"],
["D87C63", "Japonica"],
["D8BFD8", "Thistle"],
["D8C2D5", "Maverick"],
["D8FCFA", "Foam"],
["D94972", "Cabaret"],
["D99376", "Burning Sand"],
["D9B99B", "Cameo"],
["D9D6CF", "Timberwolf"],
["D9DCC1", "Tana"],
["D9E4F5", "Link Water"],
["D9F7FF", "Mabel"],
["DA3287", "Cerise"],
["DA5B38", "Flame Pea"],
["DA6304", "Bamboo"],
["DA6A41", "Red Damask"],
["DA70D6", "Orchid"],
["DA8A67", "Copperfield"],
["DAA520", "Golden Grass"],
["DAECD6", "Zanah"],
["DAF4F0", "Iceberg"],
["DAFAFF", "Oyster Bay"],
["DB5079", "Cranberry"],
["DB9690", "Petite Orchid"],
["DB995E", "Di Serria"],
["DBDBDB", "Alto"],
["DBFFF8", "Frosted Mint"],
["DC143C", "Crimson"],
["DC4333", "Punch"],
["DCB20C", "Galliano"],
["DCB4BC", "Blossom"],
["DCD747", "Wattle"],
["DCD9D2", "Westar"],
["DCDDCC", "Moon Mist"],
["DCEDB4", "Caper"],
["DCF0EA", "Swans Down"],
["DDD6D5", "Swiss Coffee"],
["DDF9F1", "White Ice"],
["DE3163", "Cerise Red"],
["DE6360", "Roman"],
["DEA681", "Tumbleweed"],
["DEBA13", "Gold Tips"],
["DEC196", "Brandy"],
["DECBC6", "Wafer"],
["DED4A4", "Sapling"],
["DED717", "Barberry"],
["DEE5C0", "Beryl Green"],
["DEF5FF", "Pattens Blue"],
["DF73FF", "Heliotrope"],
["DFBE6F", "Apache"],
["DFCD6F", "Chenin"],
["DFCFDB", "Lola"],
["DFECDA", "Willow Brook"],
["DFFF00", "Chartreuse Yellow"],
["E0B0FF", "Mauve"],
["E0B646", "Anzac"],
["E0B974", "Harvest Gold"],
["E0C095", "Calico"],
["E0FFFF", "Baby Blue"],
["E16865", "Sunglo"],
["E1BC64", "Equator"],
["E1C0C8", "Pink Flare"],
["E1E6D6", "Periglacial Blue"],
["E1EAD4", "Kidnapper"],
["E1F6E8", "Tara"],
["E25465", "Mandy"],
["E2725B", "Terracotta"],
["E28913", "Golden Bell"],
["E292C0", "Shocking"],
["E29418", "Dixie"],
["E29CD2", "Light Orchid"],
["E2D8ED", "Snuff"],
["E2EBED", "Mystic"],
["E2F3EC", "Apple Green"],
["E30B5C", "Razzmatazz"],
["E32636", "Alizarin Crimson"],
["E34234", "Cinnabar"],
["E3BEBE", "Cavern Pink"],
["E3F5E1", "Peppermint"],
["E3F988", "Mindaro"],
["E47698", "Deep Blush"],
["E49B0F", "Gamboge"],
["E4C2D5", "Melanie"],
["E4CFDE", "Twilight"],
["E4D1C0", "Bone"],
["E4D422", "Sunflower"],
["E4D5B7", "Grain Brown"],
["E4D69B", "Zombie"],
["E4F6E7", "Frostee"],
["E4FFD1", "Snow Flurry"],
["E52B50", "Amaranth"],
["E5841B", "Zest"],
["E5CCC9", "Dust Storm"],
["E5D7BD", "Stark White"],
["E5D8AF", "Hampton"],
["E5E0E1", "Bon Jour"],
["E5E5E5", "Mercury"],
["E5F9F6", "Polar"],
["E64E03", "Trinidad"],
["E6BE8A", "Gold Sand"],
["E6BEA5", "Cashmere"],
["E6D7B9", "Double Spanish White"],
["E6E4D4", "Satin Linen"],
["E6F2EA", "Harp"],
["E6F8F3", "Off Green"],
["E6FFE9", "Hint of Green"],
["E6FFFF", "Tranquil"],
["E77200", "Mango Tango"],
["E7730A", "Christine"],
["E79F8C", "Tonys Pink"],
["E79FC4", "Kobi"],
["E7BCB4", "Rose Fog"],
["E7BF05", "Corn"],
["E7CD8C", "Putty"],
["E7ECE6", "Gray Nurse"],
["E7F8FF", "Lily White"],
["E7FEFF", "Bubbles"],
["E89928", "Fire Bush"],
["E8B9B3", "Shilo"],
["E8E0D5", "Pearl Bush"],
["E8EBE0", "Green White"],
["E8F1D4", "Chrome White"],
["E8F2EB", "Gin"],
["E8F5F2", "Aqua Squeeze"],
["E96E00", "Clementine"],
["E97451", "Burnt Sienna"],
["E97C07", "Tahiti Gold"],
["E9CECD", "Oyster Pink"],
["E9D75A", "Confetti"],
["E9E3E3", "Ebb"],
["E9F8ED", "Ottoman"],
["E9FFFD", "Clear Day"],
["EA88A8", "Carissma"],
["EAAE69", "Porsche"],
["EAB33B", "Tulip Tree"],
["EAC674", "Rob Roy"],
["EADAB8", "Raffia"],
["EAE8D4", "White Rock"],
["EAF6EE", "Panache"],
["EAF6FF", "Solitude"],
["EAF9F5", "Aqua Spring"],
["EAFFFE", "Dew"],
["EB9373", "Apricot"],
["EBC2AF", "Zinnwaldite"],
["ECA927", "Fuel Yellow"],
["ECC54E", "Ronchi"],
["ECC7EE", "French Lilac"],
["ECCDB9", "Just Right"],
["ECE090", "Wild Rice"],
["ECEBBD", "Fall Green"],
["ECEBCE", "Aths Special"],
["ECF245", "Starship"],
["ED0A3F", "Red Ribbon"],
["ED7A1C", "Tango"],
["ED9121", "Carrot Orange"],
["ED989E", "Sea Pink"],
["EDB381", "Tacao"],
["EDC9AF", "Desert Sand"],
["EDCDAB", "Pancho"],
["EDDCB1", "Chamois"],
["EDEA99", "Primrose"],
["EDF5DD", "Frost"],
["EDF5F5", "Aqua Haze"],
["EDF6FF", "Zumthor"],
["EDF9F1", "Narvik"],
["EDFC84", "Honeysuckle"],
["EE82EE", "Lavender Magenta"],
["EEC1BE", "Beauty Bush"],
["EED794", "Chalky"],
["EED9C4", "Almond"],
["EEDC82", "Flax"],
["EEDEDA", "Bizarre"],
["EEE3AD", "Double Colonial White"],
["EEEEE8", "Cararra"],
["EEEF78", "Manz"],
["EEF0C8", "Tahuna Sands"],
["EEF0F3", "Athens Gray"],
["EEF3C3", "Tusk"],
["EEF4DE", "Loafer"],
["EEF6F7", "Catskill White"],
["EEFDFF", "Twilight Blue"],
["EEFF9A", "Jonquil"],
["EEFFE2", "Rice Flower"],
["EF863F", "Jaffa"],
["EFEFEF", "Gallery"],
["EFF2F3", "Porcelain"],
["F091A9", "Mauvelous"],
["F0D52D", "Golden Dream"],
["F0DB7D", "Golden Sand"],
["F0DC82", "Buff"],
["F0E2EC", "Prim"],
["F0E68C", "Khaki"],
["F0EEFD", "Selago"],
["F0EEFF", "Titan White"],
["F0F8FF", "Alice Blue"],
["F0FCEA", "Feta"],
["F18200", "Gold Drop"],
["F19BAB", "Wewak"],
["F1E788", "Sahara Sand"],
["F1E9D2", "Parchment"],
["F1E9FF", "Blue Chalk"],
["F1EEC1", "Mint Julep"],
["F1F1F1", "Seashell"],
["F1F7F2", "Saltpan"],
["F1FFAD", "Tidal"],
["F1FFC8", "Chiffon"],
["F2552A", "Flamingo"],
["F28500", "Tangerine"],
["F2C3B2", "Mandys Pink"],
["F2F2F2", "Concrete"],
["F2FAFA", "Black Squeeze"],
["F34723", "Pomegranate"],
["F3AD16", "Buttercup"],
["F3D69D", "New Orleans"],
["F3D9DF", "Vanilla Ice"],
["F3E7BB", "Sidecar"],
["F3E9E5", "Dawn Pink"],
["F3EDCF", "Wheatfield"],
["F3FB62", "Canary"],
["F3FBD4", "Orinoco"],
["F3FFD8", "Carla"],
["F400A1", "Hollywood Cerise"],
["F4A460", "Sandy brown"],
["F4C430", "Saffron"],
["F4D81C", "Ripe Lemon"],
["F4EBD3", "Janna"],
["F4F2EE", "Pampas"],
["F4F4F4", "Wild Sand"],
["F4F8FF", "Zircon"],
["F57584", "Froly"],
["F5C85C", "Cream Can"],
["F5C999", "Manhattan"],
["F5D5A0", "Maize"],
["F5DEB3", "Wheat"],
["F5E7A2", "Sandwisp"],
["F5E7E2", "Pot Pourri"],
["F5E9D3", "Albescent White"],
["F5EDEF", "Soft Peach"],
["F5F3E5", "Ecru White"],
["F5F5DC", "Beige"],
["F5FB3D", "Golden Fizz"],
["F5FFBE", "Australian Mint"],
["F64A8A", "French Rose"],
["F653A6", "Brilliant Rose"],
["F6A4C9", "Illusion"],
["F6F0E6", "Merino"],
["F6F7F7", "Black Haze"],
["F6FFDC", "Spring Sun"],
["F7468A", "Violet Red"],
["F77703", "Chilean Fire"],
["F77FBE", "Persian Pink"],
["F7B668", "Rajah"],
["F7C8DA", "Azalea"],
["F7DBE6", "We Peep"],
["F7F2E1", "Quarter Spanish White"],
["F7F5FA", "Whisper"],
["F7FAF7", "Snow Drift"],
["F8B853", "Casablanca"],
["F8C3DF", "Chantilly"],
["F8D9E9", "Cherub"],
["F8DB9D", "Marzipan"],
["F8DD5C", "Energy Yellow"],
["F8E4BF", "Givry"],
["F8F0E8", "White Linen"],
["F8F4FF", "Magnolia"],
["F8F6F1", "Spring Wood"],
["F8F7DC", "Coconut Cream"],
["F8F7FC", "White Lilac"],
["F8F8F7", "Desert Storm"],
["F8F99C", "Texas"],
["F8FACD", "Corn Field"],
["F8FDD3", "Mimosa"],
["F95A61", "Carnation"],
["F9BF58", "Saffron Mango"],
["F9E0ED", "Carousel Pink"],
["F9E4BC", "Dairy Cream"],
["F9E663", "Portica"],
["F9EAF3", "Amour"],
["F9F8E4", "Rum Swizzle"],
["F9FF8B", "Dolly"],
["F9FFF6", "Sugar Cane"],
["FA7814", "Ecstasy"],
["FA9D5A", "Tan Hide"],
["FAD3A2", "Corvette"],
["FADFAD", "Peach Yellow"],
["FAE600", "Turbo"],
["FAEAB9", "Astra"],
["FAECCC", "Champagne"],
["FAF0E6", "Linen"],
["FAF3F0", "Fantasy"],
["FAF7D6", "Citrine White"],
["FAFAFA", "Alabaster"],
["FAFDE4", "Hint of Yellow"],
["FAFFA4", "Milan"],
["FB607F", "Brink Pink"],
["FB8989", "Geraldine"],
["FBA0E3", "Lavender Rose"],
["FBA129", "Sea Buckthorn"],
["FBAC13", "Sun"],
["FBAED2", "Lavender Pink"],
["FBB2A3", "Rose Bud"],
["FBBEDA", "Cupid"],
["FBCCE7", "Classic Rose"],
["FBCEB1", "Apricot Peach"],
["FBE7B2", "Banana Mania"],
["FBE870", "Marigold Yellow"],
["FBE96C", "Festival"],
["FBEA8C", "Sweet Corn"],
["FBEC5D", "Candy Corn"],
["FBF9F9", "Hint of Red"],
["FBFFBA", "Shalimar"],
["FC0FC0", "Shocking Pink"],
["FC80A5", "Tickle Me Pink"],
["FC9C1D", "Tree Poppy"],
["FCC01E", "Lightning Yellow"],
["FCD667", "Goldenrod"],
["FCD917", "Candlelight"],
["FCDA98", "Cherokee"],
["FCF4D0", "Double Pearl Lusta"],
["FCF4DC", "Pearl Lusta"],
["FCF8F7", "Vista White"],
["FCFBF3", "Bianca"],
["FCFEDA", "Moon Glow"],
["FCFFE7", "China Ivory"],
["FCFFF9", "Ceramic"],
["FD0E35", "Torch Red"],
["FD5B78", "Wild Watermelon"],
["FD7B33", "Crusta"],
["FD7C07", "Sorbus"],
["FD9FA2", "Sweet Pink"],
["FDD5B1", "Light Apricot"],
["FDD7E4", "Pig Pink"],
["FDE1DC", "Cinderella"],
["FDE295", "Golden Glow"],
["FDE910", "Lemon"],
["FDF5E6", "Old Lace"],
["FDF6D3", "Half Colonial White"],
["FDF7AD", "Drover"],
["FDFEB8", "Pale Prim"],
["FDFFD5", "Cumulus"],
["FE28A2", "Persian Rose"],
["FE4C40", "Sunset Orange"],
["FE6F5E", "Bittersweet"],
["FE9D04", "California"],
["FEA904", "Yellow Sea"],
["FEBAAD", "Melon"],
["FED33C", "Bright Sun"],
["FED85D", "Dandelion"],
["FEDB8D", "Salomie"],
["FEE5AC", "Cape Honey"],
["FEEBF3", "Remy"],
["FEEFCE", "Oasis"],
["FEF0EC", "Bridesmaid"],
["FEF2C7", "Beeswax"],
["FEF3D8", "Bleach White"],
["FEF4CC", "Pipi"],
["FEF4DB", "Half Spanish White"],
["FEF4F8", "Wisp Pink"],
["FEF5F1", "Provincial Pink"],
["FEF7DE", "Half Dutch White"],
["FEF8E2", "Solitaire"],
["FEF8FF", "White Pointer"],
["FEF9E3", "Off Yellow"],
["FEFCED", "Orange White"],
["FF0000", "Red"],
["FF007F", "Rose"],
["FF00CC", "Purple Pizzazz"],
["FF00FF", "Magenta / Fuchsia"],
["FF2400", "Scarlet"],
["FF3399", "Wild Strawberry"],
["FF33CC", "Razzle Dazzle Rose"],
["FF355E", "Radical Red"],
["FF3F34", "Red Orange"],
["FF4040", "Coral Red"],
["FF4D00", "Vermilion"],
["FF4F00", "International Orange"],
["FF6037", "Outrageous Orange"],
["FF6600", "Blaze Orange"],
["FF66FF", "Pink Flamingo"],
["FF681F", "Orange"],
["FF69B4", "Hot Pink"],
["FF6B53", "Persimmon"],
["FF6FFF", "Blush Pink"],
["FF7034", "Burning Orange"],
["FF7518", "Pumpkin"],
["FF7D07", "Flamenco"],
["FF7F00", "Flush Orange"],
["FF7F50", "Coral"],
["FF8C69", "Salmon"],
["FF9000", "Pizazz"],
["FF910F", "West Side"],
["FF91A4", "Pink Salmon"],
["FF9933", "Neon Carrot"],
["FF9966", "Atomic Tangerine"],
["FF9980", "Vivid Tangerine"],
["FF9E2C", "Sunshade"],
["FFA000", "Orange Peel"],
["FFA194", "Mona Lisa"],
["FFA500", "Web Orange"],
["FFA6C9", "Carnation Pink"],
["FFAB81", "Hit Pink"],
["FFAE42", "Yellow Orange"],
["FFB0AC", "Cornflower Lilac"],
["FFB1B3", "Sundown"],
["FFB31F", "My Sin"],
["FFB555", "Texas Rose"],
["FFB7D5", "Cotton Candy"],
["FFB97B", "Macaroni and Cheese"],
["FFBA00", "Selective Yellow"],
["FFBD5F", "Koromiko"],
["FFBF00", "Amber"],
["FFC0A8", "Wax Flower"],
["FFC0CB", "Pink"],
["FFC3C0", "Your Pink"],
["FFC901", "Supernova"],
["FFCBA4", "Flesh"],
["FFCC33", "Sunglow"],
["FFCC5C", "Golden Tainoi"],
["FFCC99", "Peach Orange"],
["FFCD8C", "Chardonnay"],
["FFD1DC", "Pastel Pink"],
["FFD2B7", "Romantic"],
["FFD38C", "Grandis"],
["FFD700", "Gold"],
["FFD800", "School bus Yellow"],
["FFD8D9", "Cosmos"],
["FFDB58", "Mustard"],
["FFDCD6", "Peach Schnapps"],
["FFDDAF", "Caramel"],
["FFDDCD", "Tuft Bush"],
["FFDDCF", "Watusi"],
["FFDDF4", "Pink Lace"],
["FFDEAD", "Navajo White"],
["FFDEB3", "Frangipani"],
["FFE1DF", "Pippin"],
["FFE1F2", "Pale Rose"],
["FFE2C5", "Negroni"],
["FFE5A0", "Cream Brulee"],
["FFE5B4", "Peach"],
["FFE6C7", "Tequila"],
["FFE772", "Kournikova"],
["FFEAC8", "Sandy Beach"],
["FFEAD4", "Karry"],
["FFEC13", "Broom"],
["FFEDBC", "Colonial White"],
["FFEED8", "Derby"],
["FFEFA1", "Vis Vis"],
["FFEFC1", "Egg White"],
["FFEFD5", "Papaya Whip"],
["FFEFEC", "Fair Pink"],
["FFF0DB", "Peach Cream"],
["FFF0F5", "Lavender blush"],
["FFF14F", "Gorse"],
["FFF1B5", "Buttermilk"],
["FFF1D8", "Pink Lady"],
["FFF1EE", "Forget Me Not"],
["FFF1F9", "Tutu"],
["FFF39D", "Picasso"],
["FFF3F1", "Chardon"],
["FFF46E", "Paris Daisy"],
["FFF4CE", "Barley White"],
["FFF4DD", "Egg Sour"],
["FFF4E0", "Sazerac"],
["FFF4E8", "Serenade"],
["FFF4F3", "Chablis"],
["FFF5EE", "Seashell Peach"],
["FFF5F3", "Sauvignon"],
["FFF6D4", "Milk Punch"],
["FFF6DF", "Varden"],
["FFF6F5", "Rose White"],
["FFF8D1", "Baja White"],
["FFF9E2", "Gin Fizz"],
["FFF9E6", "Early Dawn"],
["FFFACD", "Lemon Chiffon"],
["FFFAF4", "Bridal Heath"],
["FFFBDC", "Scotch Mist"],
["FFFBF9", "Soapstone"],
["FFFC99", "Witch Haze"],
["FFFCEA", "Buttery White"],
["FFFCEE", "Island Spice"],
["FFFDD0", "Cream"],
["FFFDE6", "Chilean Heath"],
["FFFDE8", "Travertine"],
["FFFDF3", "Orchid White"],
["FFFDF4", "Quarter Pearl Lusta"],
["FFFEE1", "Half and Half"],
["FFFEEC", "Apricot White"],
["FFFEF0", "Rice Cake"],
["FFFEF6", "Black White"],
["FFFEFD", "Romance"],
["FFFF00", "Yellow"],
["FFFF66", "Laser Lemon"],
["FFFF99", "Pale Canary"],
["FFFFB4", "Portafino"],
["FFFFF0", "Ivory"],
["FFFFFF", "White"]
]

}

ntc.init();
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,s)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const c={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return c;default:return e(r)}}))).then((e=>{const r=s(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-99ba3a23"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"d0668c5b57af3b7c6a91d695547c6efd"},{url:"js/extensions.min.js",revision:"422b0b4c0dcd8edcbece721088280e83"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"032c895c801a1442b9bd93e838b5d616"},{url:"js/shapes-14-6-5.min.js",revision:"95f54e7999c9fba2a1d65b4fe4f634f3"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"d29a8e0ad73c5cfd3dc1e35361bf558b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"9ef237732b381ca42443073a0a03730f"},{url:"styles/atlas.css",revision:"d627cfef208f13a9cff1670f143c6348"},{url:"styles/dark.css",revision:"e01f048ea775be6d6d4f0a49ca1e5ab2"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"75da978f7278f54d6c93c80891c9de60"},{url:"connect/jira/editor-1-3-3.html",revision:"6ec59ca5f689067e52cdda13f22ed89f"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"ff2e0198719b4c0824bb2ee817605476"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"b97742df8b77cd516251645afcce930a"},{url:"connect/jira/viewerPanel.js",revision:"0b8e07ff825c61fa2d6d10d1d6d13edb"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"d1c80a7301cd26c6dc31b1fdce9e37e5"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"d5748a4fe01b7e747914ebd3e37c9de2"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"ee6764429bf47a8545aa1cedacee718e"},{url:"plugins/cConf-1-4-8.js",revision:"91c04e236ba9dbdb26d8565b3354e00a"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"9b93b748a41a6f9444ff92810b7908b8"},{url:"connect/new_common/cac.js",revision:"6d666b6789b51dabc5a1af53a9db5d3d"},{url:"connect/gdrive_common/gac.js",revision:"78f85e79f15f56b8b8d83c90f4a15679"},{url:"connect/onedrive_common/ac.js",revision:"d10d4603e86da7c9af277dac832e8e06"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"8f66d9ae8a8941fd230fbafbbc9eccd4"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4a9a11f6de154cbd7a2df9e45790daf1"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"b2908e71f755a069fe6487e1e705736c"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ed9daba2190b293a1c7ba13b649f5149"},{url:"connect/confluence/includeDiagram.html",revision:"4df629a5bfba840368ab8185ce27f439"},{url:"connect/confluence/macro-editor.js",revision:"0bd745f0c23bba15ad1ff8e7b8e14987"},{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:"070e99e620b678d6efebce77a4f78f22"},{url:"resources/dia_am.txt",revision:"24490041dc0894101a9b8591ff857f27"},{url:"resources/dia_ar.txt",revision:"3b3af114a9176b766911ba777ab9dfe5"},{url:"resources/dia_bg.txt",revision:"8d8e4f730161bb04f50a46ecafedd843"},{url:"resources/dia_bn.txt",revision:"d633c8ed9bc728d3dcf95c7794e7faa2"},{url:"resources/dia_bs.txt",revision:"37a27a661006878596314fe2941328bc"},{url:"resources/dia_ca.txt",revision:"2ad8d0e087f22b51ebd2e37172164b74"},{url:"resources/dia_cs.txt",revision:"4ce02dafa392719ff1de8c87cc52c671"},{url:"resources/dia_da.txt",revision:"5a5f4f660dd914feccacbb0cb1f477ba"},{url:"resources/dia_de.txt",revision:"6cbfac1e7e7389574136f0d6850325d9"},{url:"resources/dia_el.txt",revision:"4db0fad8e6b18cb4dad60675a9d9e6c1"},{url:"resources/dia_eo.txt",revision:"12d3e6e93626859d7f1fe0415b508ec2"},{url:"resources/dia_es.txt",revision:"f7186238aa7dd9ac210feb9ff9b884c8"},{url:"resources/dia_et.txt",revision:"1f41cee18f340ad3d058ad583e1968dc"},{url:"resources/dia_eu.txt",revision:"7077ebc436cf486b8dbb58a50c78a929"},{url:"resources/dia_fa.txt",revision:"c4e691b90109e399a4916dd858997ad1"},{url:"resources/dia_fi.txt",revision:"ec22566aa2aa48802c2e0d0e282089a0"},{url:"resources/dia_fil.txt",revision:"50c50d6fd55165344c5bac76d0a7b163"},{url:"resources/dia_fr.txt",revision:"bdde1f332647bcc1f7e442192149c2f6"},{url:"resources/dia_gl.txt",revision:"b2511dfa377ed0c4f4aef554b0cdd48a"},{url:"resources/dia_gu.txt",revision:"f2e237fae11c6d5d9c14c6a90526b7c4"},{url:"resources/dia_he.txt",revision:"316568ef9660c8faff3acbbff4bb1d5d"},{url:"resources/dia_hi.txt",revision:"90a9db5a1781eee9f09b9e01dff4672b"},{url:"resources/dia_hr.txt",revision:"1c36344956001e327a563b697bb777e8"},{url:"resources/dia_hu.txt",revision:"8f3f05139ddb0faf2dc9e65ff2739bee"},{url:"resources/dia_id.txt",revision:"15028adb2a38c12911c2cfb527a6673a"},{url:"resources/dia_it.txt",revision:"20fe98f5e74fdd93428139a2755dfeb2"},{url:"resources/dia_ja.txt",revision:"86c5ab25c3ed29509d50c09ef6daf8d4"},{url:"resources/dia_kn.txt",revision:"9f895e516c96aef05ad7bbf62e0a6d0f"},{url:"resources/dia_ko.txt",revision:"454b3f239e3ea2527c296f319b25aa15"},{url:"resources/dia_lt.txt",revision:"423e99457a2e3c19b8139df72b779e57"},{url:"resources/dia_lv.txt",revision:"66139e41b90a0e3f7841f6022ec8c4ac"},{url:"resources/dia_ml.txt",revision:"a04f0a3a9a44e7a47acd6c8dfee48cde"},{url:"resources/dia_mr.txt",revision:"5ecae95143f9ddd8ea47b89fc4a32779"},{url:"resources/dia_ms.txt",revision:"33edd41052e9978263ddef6edce046a0"},{url:"resources/dia_my.txt",revision:"070e99e620b678d6efebce77a4f78f22"},{url:"resources/dia_nl.txt",revision:"fbbeafc95e4713743b2c5d1c578815c5"},{url:"resources/dia_no.txt",revision:"8c27b73d22827c38d5a3f0abcddf38b9"},{url:"resources/dia_pl.txt",revision:"a61057ccce1c943ee529a80c3572414a"},{url:"resources/dia_pt-br.txt",revision:"c7ad6374f86e3a7a82e163df81fa4f46"},{url:"resources/dia_pt.txt",revision:"11f18646f93aea3a125cf86afa7ed0b9"},{url:"resources/dia_ro.txt",revision:"4ea38fe9313df43ae827a7b56ddf407a"},{url:"resources/dia_ru.txt",revision:"fd2f0eb15bffe3d931f1265f3f7b5e18"},{url:"resources/dia_si.txt",revision:"070e99e620b678d6efebce77a4f78f22"},{url:"resources/dia_sk.txt",revision:"34cc4e6486b2f60f040da88f93fe93e6"},{url:"resources/dia_sl.txt",revision:"06a69daf3b2dbc5ed5c0a37ebd337bb6"},{url:"resources/dia_sr.txt",revision:"8a143e1230a6681bd24f0c5f28e5aade"},{url:"resources/dia_sv.txt",revision:"562ddf8fb3b86def0cd652b3c8526560"},{url:"resources/dia_sw.txt",revision:"b09b88a0dcf41e07dbbad5a217f4b039"},{url:"resources/dia_ta.txt",revision:"951784d11df6d9379a0ac67b66093a41"},{url:"resources/dia_te.txt",revision:"8eaa7eeacd4dac3c144bbc77f9da6041"},{url:"resources/dia_th.txt",revision:"7882c1b3a63b81c1b7855fe914c820a3"},{url:"resources/dia_tr.txt",revision:"659bd72b2d3cfe48c7aa55fad1cffdd5"},{url:"resources/dia_uk.txt",revision:"dd7945dee90ea3eee794a2b19d40f656"},{url:"resources/dia_vi.txt",revision:"4f79d38f2c9089a5b3e9fd6e477ac2f3"},{url:"resources/dia_zh-tw.txt",revision:"51b5d3b75dfa4a8a4b8b66752a0e97aa"},{url:"resources/dia_zh.txt",revision:"3dcb691f4b2abf2b91da630dba0082af"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"389fa448cb99794bece27ffcb216abee"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{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:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{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/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"618b42f0bde0c7685e04811c25dc2b3e"},{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:[/.*/]})}));
{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/f761bf7f731dc725103be2639901b475/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/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.addEventListener('message', (event) => {\n  if (event.data && event.data.type === 'SKIP_WAITING') {\n    self.skipWaiting();\n  }\n});\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\": \"d0668c5b57af3b7c6a91d695547c6efd\"\n  },\n  {\n    \"url\": \"js/extensions.min.js\",\n    \"revision\": \"422b0b4c0dcd8edcbece721088280e83\"\n  },\n  {\n    \"url\": \"js/orgchart.min.js\",\n    \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n  },\n  {\n    \"url\": \"js/stencils.min.js\",\n    \"revision\": \"032c895c801a1442b9bd93e838b5d616\"\n  },\n  {\n    \"url\": \"js/shapes-14-6-5.min.js\",\n    \"revision\": \"95f54e7999c9fba2a1d65b4fe4f634f3\"\n  },\n  {\n    \"url\": \"js/math-print.js\",\n    \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n  },\n  {\n    \"url\": \"index.html\",\n    \"revision\": \"d29a8e0ad73c5cfd3dc1e35361bf558b\"\n  },\n  {\n    \"url\": \"open.html\",\n    \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n  },\n  {\n    \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n    \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n  },\n  {\n    \"url\": \"styles/grapheditor.css\",\n    \"revision\": \"9ef237732b381ca42443073a0a03730f\"\n  },\n  {\n    \"url\": \"styles/atlas.css\",\n    \"revision\": \"d627cfef208f13a9cff1670f143c6348\"\n  },\n  {\n    \"url\": \"styles/dark.css\",\n    \"revision\": \"e01f048ea775be6d6d4f0a49ca1e5ab2\"\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\": \"75da978f7278f54d6c93c80891c9de60\"\n  },\n  {\n    \"url\": \"connect/jira/editor-1-3-3.html\",\n    \"revision\": \"6ec59ca5f689067e52cdda13f22ed89f\"\n  },\n  {\n    \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n    \"revision\": \"ff2e0198719b4c0824bb2ee817605476\"\n  },\n  {\n    \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n    \"revision\": \"b97742df8b77cd516251645afcce930a\"\n  },\n  {\n    \"url\": \"connect/jira/viewerPanel.js\",\n    \"revision\": \"0b8e07ff825c61fa2d6d10d1d6d13edb\"\n  },\n  {\n    \"url\": \"connect/jira/spinner.gif\",\n    \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n  },\n  {\n    \"url\": \"connect/jira/editor.js\",\n    \"revision\": \"d1c80a7301cd26c6dc31b1fdce9e37e5\"\n  },\n  {\n    \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n    \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n  },\n  {\n    \"url\": \"connect/jira/fullscreen-viewer.js\",\n    \"revision\": \"d5748a4fe01b7e747914ebd3e37c9de2\"\n  },\n  {\n    \"url\": \"plugins/connectJira.js\",\n    \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n  },\n  {\n    \"url\": \"plugins/cConf-comments.js\",\n    \"revision\": \"ee6764429bf47a8545aa1cedacee718e\"\n  },\n  {\n    \"url\": \"plugins/cConf-1-4-8.js\",\n    \"revision\": \"91c04e236ba9dbdb26d8565b3354e00a\"\n  },\n  {\n    \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n    \"revision\": \"9b93b748a41a6f9444ff92810b7908b8\"\n  },\n  {\n    \"url\": \"connect/new_common/cac.js\",\n    \"revision\": \"6d666b6789b51dabc5a1af53a9db5d3d\"\n  },\n  {\n    \"url\": \"connect/gdrive_common/gac.js\",\n    \"revision\": \"78f85e79f15f56b8b8d83c90f4a15679\"\n  },\n  {\n    \"url\": \"connect/onedrive_common/ac.js\",\n    \"revision\": \"d10d4603e86da7c9af277dac832e8e06\"\n  },\n  {\n    \"url\": \"connect/confluence/viewer-init.js\",\n    \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n  },\n  {\n    \"url\": \"connect/confluence/viewer.js\",\n    \"revision\": \"8f66d9ae8a8941fd230fbafbbc9eccd4\"\n  },\n  {\n    \"url\": \"connect/confluence/viewer-1-4-42.html\",\n    \"revision\": \"4a9a11f6de154cbd7a2df9e45790daf1\"\n  },\n  {\n    \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n    \"revision\": \"b2908e71f755a069fe6487e1e705736c\"\n  },\n  {\n    \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n    \"revision\": \"ed9daba2190b293a1c7ba13b649f5149\"\n  },\n  {\n    \"url\": \"connect/confluence/includeDiagram.html\",\n    \"revision\": \"4df629a5bfba840368ab8185ce27f439\"\n  },\n  {\n    \"url\": \"connect/confluence/macro-editor.js\",\n    \"revision\": \"0bd745f0c23bba15ad1ff8e7b8e14987\"\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\": \"070e99e620b678d6efebce77a4f78f22\"\n  },\n  {\n    \"url\": \"resources/dia_am.txt\",\n    \"revision\": \"24490041dc0894101a9b8591ff857f27\"\n  },\n  {\n    \"url\": \"resources/dia_ar.txt\",\n    \"revision\": \"3b3af114a9176b766911ba777ab9dfe5\"\n  },\n  {\n    \"url\": \"resources/dia_bg.txt\",\n    \"revision\": \"8d8e4f730161bb04f50a46ecafedd843\"\n  },\n  {\n    \"url\": \"resources/dia_bn.txt\",\n    \"revision\": \"d633c8ed9bc728d3dcf95c7794e7faa2\"\n  },\n  {\n    \"url\": \"resources/dia_bs.txt\",\n    \"revision\": \"37a27a661006878596314fe2941328bc\"\n  },\n  {\n    \"url\": \"resources/dia_ca.txt\",\n    \"revision\": \"2ad8d0e087f22b51ebd2e37172164b74\"\n  },\n  {\n    \"url\": \"resources/dia_cs.txt\",\n    \"revision\": \"4ce02dafa392719ff1de8c87cc52c671\"\n  },\n  {\n    \"url\": \"resources/dia_da.txt\",\n    \"revision\": \"5a5f4f660dd914feccacbb0cb1f477ba\"\n  },\n  {\n    \"url\": \"resources/dia_de.txt\",\n    \"revision\": \"6cbfac1e7e7389574136f0d6850325d9\"\n  },\n  {\n    \"url\": \"resources/dia_el.txt\",\n    \"revision\": \"4db0fad8e6b18cb4dad60675a9d9e6c1\"\n  },\n  {\n    \"url\": \"resources/dia_eo.txt\",\n    \"revision\": \"12d3e6e93626859d7f1fe0415b508ec2\"\n  },\n  {\n    \"url\": \"resources/dia_es.txt\",\n    \"revision\": \"f7186238aa7dd9ac210feb9ff9b884c8\"\n  },\n  {\n    \"url\": \"resources/dia_et.txt\",\n    \"revision\": \"1f41cee18f340ad3d058ad583e1968dc\"\n  },\n  {\n    \"url\": \"resources/dia_eu.txt\",\n    \"revision\": \"7077ebc436cf486b8dbb58a50c78a929\"\n  },\n  {\n    \"url\": \"resources/dia_fa.txt\",\n    \"revision\": \"c4e691b90109e399a4916dd858997ad1\"\n  },\n  {\n    \"url\": \"resources/dia_fi.txt\",\n    \"revision\": \"ec22566aa2aa48802c2e0d0e282089a0\"\n  },\n  {\n    \"url\": \"resources/dia_fil.txt\",\n    \"revision\": \"50c50d6fd55165344c5bac76d0a7b163\"\n  },\n  {\n    \"url\": \"resources/dia_fr.txt\",\n    \"revision\": \"bdde1f332647bcc1f7e442192149c2f6\"\n  },\n  {\n    \"url\": \"resources/dia_gl.txt\",\n    \"revision\": \"b2511dfa377ed0c4f4aef554b0cdd48a\"\n  },\n  {\n    \"url\": \"resources/dia_gu.txt\",\n    \"revision\": \"f2e237fae11c6d5d9c14c6a90526b7c4\"\n  },\n  {\n    \"url\": \"resources/dia_he.txt\",\n    \"revision\": \"316568ef9660c8faff3acbbff4bb1d5d\"\n  },\n  {\n    \"url\": \"resources/dia_hi.txt\",\n    \"revision\": \"90a9db5a1781eee9f09b9e01dff4672b\"\n  },\n  {\n    \"url\": \"resources/dia_hr.txt\",\n    \"revision\": \"1c36344956001e327a563b697bb777e8\"\n  },\n  {\n    \"url\": \"resources/dia_hu.txt\",\n    \"revision\": \"8f3f05139ddb0faf2dc9e65ff2739bee\"\n  },\n  {\n    \"url\": \"resources/dia_id.txt\",\n    \"revision\": \"15028adb2a38c12911c2cfb527a6673a\"\n  },\n  {\n    \"url\": \"resources/dia_it.txt\",\n    \"revision\": \"20fe98f5e74fdd93428139a2755dfeb2\"\n  },\n  {\n    \"url\": \"resources/dia_ja.txt\",\n    \"revision\": \"86c5ab25c3ed29509d50c09ef6daf8d4\"\n  },\n  {\n    \"url\": \"resources/dia_kn.txt\",\n    \"revision\": \"9f895e516c96aef05ad7bbf62e0a6d0f\"\n  },\n  {\n    \"url\": \"resources/dia_ko.txt\",\n    \"revision\": \"454b3f239e3ea2527c296f319b25aa15\"\n  },\n  {\n    \"url\": \"resources/dia_lt.txt\",\n    \"revision\": \"423e99457a2e3c19b8139df72b779e57\"\n  },\n  {\n    \"url\": \"resources/dia_lv.txt\",\n    \"revision\": \"66139e41b90a0e3f7841f6022ec8c4ac\"\n  },\n  {\n    \"url\": \"resources/dia_ml.txt\",\n    \"revision\": \"a04f0a3a9a44e7a47acd6c8dfee48cde\"\n  },\n  {\n    \"url\": \"resources/dia_mr.txt\",\n    \"revision\": \"5ecae95143f9ddd8ea47b89fc4a32779\"\n  },\n  {\n    \"url\": \"resources/dia_ms.txt\",\n    \"revision\": \"33edd41052e9978263ddef6edce046a0\"\n  },\n  {\n    \"url\": \"resources/dia_my.txt\",\n    \"revision\": \"070e99e620b678d6efebce77a4f78f22\"\n  },\n  {\n    \"url\": \"resources/dia_nl.txt\",\n    \"revision\": \"fbbeafc95e4713743b2c5d1c578815c5\"\n  },\n  {\n    \"url\": \"resources/dia_no.txt\",\n    \"revision\": \"8c27b73d22827c38d5a3f0abcddf38b9\"\n  },\n  {\n    \"url\": \"resources/dia_pl.txt\",\n    \"revision\": \"a61057ccce1c943ee529a80c3572414a\"\n  },\n  {\n    \"url\": \"resources/dia_pt-br.txt\",\n    \"revision\": \"c7ad6374f86e3a7a82e163df81fa4f46\"\n  },\n  {\n    \"url\": \"resources/dia_pt.txt\",\n    \"revision\": \"11f18646f93aea3a125cf86afa7ed0b9\"\n  },\n  {\n    \"url\": \"resources/dia_ro.txt\",\n    \"revision\": \"4ea38fe9313df43ae827a7b56ddf407a\"\n  },\n  {\n    \"url\": \"resources/dia_ru.txt\",\n    \"revision\": \"fd2f0eb15bffe3d931f1265f3f7b5e18\"\n  },\n  {\n    \"url\": \"resources/dia_si.txt\",\n    \"revision\": \"070e99e620b678d6efebce77a4f78f22\"\n  },\n  {\n    \"url\": \"resources/dia_sk.txt\",\n    \"revision\": \"34cc4e6486b2f60f040da88f93fe93e6\"\n  },\n  {\n    \"url\": \"resources/dia_sl.txt\",\n    \"revision\": \"06a69daf3b2dbc5ed5c0a37ebd337bb6\"\n  },\n  {\n    \"url\": \"resources/dia_sr.txt\",\n    \"revision\": \"8a143e1230a6681bd24f0c5f28e5aade\"\n  },\n  {\n    \"url\": \"resources/dia_sv.txt\",\n    \"revision\": \"562ddf8fb3b86def0cd652b3c8526560\"\n  },\n  {\n    \"url\": \"resources/dia_sw.txt\",\n    \"revision\": \"b09b88a0dcf41e07dbbad5a217f4b039\"\n  },\n  {\n    \"url\": \"resources/dia_ta.txt\",\n    \"revision\": \"951784d11df6d9379a0ac67b66093a41\"\n  },\n  {\n    \"url\": \"resources/dia_te.txt\",\n    \"revision\": \"8eaa7eeacd4dac3c144bbc77f9da6041\"\n  },\n  {\n    \"url\": \"resources/dia_th.txt\",\n    \"revision\": \"7882c1b3a63b81c1b7855fe914c820a3\"\n  },\n  {\n    \"url\": \"resources/dia_tr.txt\",\n    \"revision\": \"659bd72b2d3cfe48c7aa55fad1cffdd5\"\n  },\n  {\n    \"url\": \"resources/dia_uk.txt\",\n    \"revision\": \"dd7945dee90ea3eee794a2b19d40f656\"\n  },\n  {\n    \"url\": \"resources/dia_vi.txt\",\n    \"revision\": \"4f79d38f2c9089a5b3e9fd6e477ac2f3\"\n  },\n  {\n    \"url\": \"resources/dia_zh-tw.txt\",\n    \"revision\": \"51b5d3b75dfa4a8a4b8b66752a0e97aa\"\n  },\n  {\n    \"url\": \"resources/dia_zh.txt\",\n    \"revision\": \"3dcb691f4b2abf2b91da630dba0082af\"\n  },\n  {\n    \"url\": \"favicon.ico\",\n    \"revision\": \"fab2d88b37c72d83607527573de45281\"\n  },\n  {\n    \"url\": \"images/manifest.json\",\n    \"revision\": \"389fa448cb99794bece27ffcb216abee\"\n  },\n  {\n    \"url\": \"images/logo.png\",\n    \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\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\": \"73da7989a23ce9a4be565ec65658a239\"\n  },\n  {\n    \"url\": \"images/favicon-16x16.png\",\n    \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n  },\n  {\n    \"url\": \"images/favicon-32x32.png\",\n    \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n  },\n  {\n    \"url\": \"images/android-chrome-196x196.png\",\n    \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n  },\n  {\n    \"url\": \"images/android-chrome-512x512.png\",\n    \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\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/hs.png\",\n    \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n  },\n  {\n    \"url\": \"images/aui-wait.gif\",\n    \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n  },\n  {\n    \"url\": \"mxgraph/css/common.css\",\n    \"revision\": \"618b42f0bde0c7685e04811c25dc2b3e\"\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","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}

Fixed code:
18-JUL-2023: 21.6.3

- Shift+Alt+Drag moves selection cells [drawio-3726]
- Fixes grouping of shapes with table [drawio-3725]
- Updates DOMPurify from 3.0.3 to 3.0.5
- Fixes update of page tabs after import [DID-8891]
- [conf cloud] Load main file diagram if draft unchanged and old version in macro
- Fixes Grid option in pdf export
- [jira cloud] Added support for server zip format [DFJC-18]
- [vsdx] Added support for rotated edge labels [DID-8697]
- Fixes getBoundingBoxFromGeometry for nested groups
- Fixes initial scrollbar for demo mode in simple UI
- Removes voice plugin [CSP-2113]
- Use Ctrl+Y and Ctrl+Shift+Z for redo [drawio-3733]
- Sanitizes HTML markup in labels [CSP-2113]

| Version  | Supported          |
| -------- | ------------------ |
| Latest   | :white_check_mark: |
| Older    | :x:                |
Email support@diagrams.net. If you do not wish to submit by email, please 
ask for an alternative via email or Github issue.
21.6.3
	  "dompurify": "3.0.5",
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.3",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b,c){b=null!=b?b:!1;var d=null;if(null!=a)for(var e=0;e<a.length;e++)if(b||this.model.isVertex(a[e])){var f=this.getCellGeometry(a[e]);if(null!=f){var g=null;if(this.model.isEdge(a[e])){g=function(m){null!=m&&(null==k?k=new mxRectangle(m.x,m.y,0,0):k.add(new mxRectangle(m.x,m.y,0,0)))};null==this.model.getTerminal(a[e],!0)&&g(f.getTerminalPoint(!0));null==this.model.getTerminal(a[e],!1)&&g(f.getTerminalPoint(!1));f=f.points;if(null!=f&&0<f.length)for(var k=
new mxRectangle(f[0].x,f[0].y,0,0),l=1;l<f.length;l++)g(f[l]);g=k}else l=this.model.getParent(a[e]),f.relative?this.model.isVertex(l)&&l!=this.view.currentRoot&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g=new mxRectangle(f.x*k.width,f.y*k.height,f.width,f.height),0<=mxUtils.indexOf(null!=c?c:a,l)&&(g.x+=k.x,g.y+=k.y))):(g=mxRectangle.fromRectangle(f),this.model.isVertex(l)&&0<=mxUtils.indexOf(null!=c?c:a,l)&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g.x+=
k.x,g.y+=k.y))),null!=g&&null!=f.offset&&(g.x+=f.offset.x,g.y+=f.offset.y),f=this.getCurrentCellStyle(a[e]),null!=g&&(f=mxUtils.getValue(f,mxConstants.STYLE_ROTATION,0),0!=f&&(g=mxUtils.getBoundingBox(g,f)));null!=g&&(null==d?d=mxRectangle.fromRectangle(g):d.add(g))}}return d};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};
mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();a=b.getEvent();var c=mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)&&!this.graph.isSelectionEmpty();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null!=b.getState()||c)&&!mxEvent.isMultiTouchEvent(a)){var d=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(d,b);this.cell=null;null==d&&c&&(d=this.graph.getSelectionCell());this.isSelectEnabled()&&!this.delayedSelection&&
this.graph.selectCellForEvent(d,a);this.isMoveEnabled()&&(this.delayedSelection?this.cell=d:this.start(d,b.getX(),b.getY()),this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b))}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
b.cells.length);this.actions.get("group").setEnabled(1<b.cells.length||1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0]));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&
(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("copyData").setEnabled(1==b.cells.length);this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("editStyle").setEnabled(1==b.cells.length);this.actions.get("editTooltip").setEnabled(1==
!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(90,!0,"redo",!0),g.bindAction(89,!0,"redo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,
!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"format",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(109,!0,"decreaseFontSize",!0),g.bindAction(107,!0,"increaseFontSize",!0),g.bindAction(219,!0,"decreaseFontSize",!0),g.bindAction(221,!0,"increaseFontSize",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),
g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){f.isEnabled()&&f.startEditingAtCell()});return g};
ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var e=this.addActions(a,["group","ungroup"])+this.addActions(a,["removeFromGroup"]);b.cell||b.row||(e+=this.addActions(a,["copySize","pasteSize","swap"]));b=this.addAction(a,"clearWaypoints");null!=b&&(mxUtils.br(a),b.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),
e++);e+=this.addActions(a,["lockUnlock"]);0==e&&(a.style.display="none");return a};
(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="21.6.3";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,g,n){function q(E){return"simple"==E||0==g&&"sketch"==E}g=null!=g?g:150;var t=Editor.currentTheme,x=q(t)&&this.isDefaultTheme(d)||this.isDefaultTheme(t)&&q(d),A=x&&"sketch"!=d&&"sketch"!=t;x&&!this.themeSwitching&&(Editor.currentTheme=
d,this.themeSwitching=!0,mxUtils.setPrefixedStyle(this.container.style,"transition","all "+g+"ms ease-in-out"),0==g&&(this.container.style.opacity="0"),window.setTimeout(mxUtils.bind(this,function(){var E=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){q(t)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",this.tabContainer.style.display="flex",this.hsplit.style.display=
this.editor.graph.refresh();this.restoreScrollState(E);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&q(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=n&&n()}),g)}),g)}),g)}),0));return A};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,g=this.diagramContainer.scrollLeft,
n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(g-=this.embedViewport.x,n-=this.embedViewport.y):(g+=this.embedViewport.x,n+=this.embedViewport.y));return{x:g,y:n,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,n=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=d.x+(n.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(n.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?
d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var n=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var q=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?
this.statusContainer.firstChild:null;g=null!=q&&null!=q.getAttribute("class");if(!g&&null!=q){q=q.getAttribute("title");var t=this.getCurrentFile();t=null!=t?t.savingStatusKey:DrawioFile.prototype.savingStatusKey;q==mxResources.get(t)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(t))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";q=32>=d.clientWidth;d.style.visibility=q&&""==this.editor.getStatus()?"hidden":
"";if(q||g)this.statusContainer.style.display="inline-flex",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",n);n()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);
this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createMainMenuForTheme(d);this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);this.sidebarContainer.style.display="";if("sketch"==d){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var g=Editor.enableCustomLibraries&&("1"!=urlParams.embed||
"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=g?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(d=this.isDefaultTheme(d)||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,
this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};
EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=
this.menus&&(null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(d){var g=this.editor.graph;g.defaultEdgeLength=
Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);"simple"==d||"sketch"==d?(Editor.fitWindowBorders=new mxRectangle(60,30,30,30),g.defaultEdgeLength=120,null==urlParams.grid&&(g.defaultGridEnabled=!1),null==urlParams.pv&&(g.defaultPageVisible=!1)):Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(d){"simple"==d||
"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"simple"==d||"sketch"==d?(null==this.sketchWrapperElt&&
(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),"sketch"==d&&(this.sketchWrapperElt.className="geSketch"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),
this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.style.cssText="position:absolute;padding:9px 12px;overflow:hidden;white-space:nowrap;user-select:none;box-sizing:border-box;";var g=this.createMenu("simple"==d?"view":"diagram","simple"==d?Editor.thinViewImage:Editor.menuImage);this.sketchMainMenuElt.appendChild(g);
"simple"==d?(this.sketchMainMenuElt.className="geToolbarContainer geSimpleMainMenu",this.sketchMainMenuElt.style.display="flex",this.sketchMainMenuElt.style.height="52px",this.sketchMainMenuElt.style.justifyContent="start",this.sketchMainMenuElt.style.alignItems="center",this.sketchMainMenuElt.style.top="0px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.sketchMainMenuElt.style.gap="10px",g.style.flexShrink="0",g.style.opacity="0.7"):(this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",
Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.borderRadius="4px",this.sketchMainMenuElt.style.height="44px",this.sketchMainMenuElt.style.left="10px",this.sketchMainMenuElt.style.top="10px",this.sketchMainMenuElt.style.zIndex="1");this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};
EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";var g=this.sketchFooterMenuElt;if("simple"!=d){var n=this.createPageMenuTab(!1,"simple"!=d);n.className="geToolbarButton geAdaptiveAsset";
n.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px 16px 4px 4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;background-position:right 0px top 8px;background-repeat:no-repeat;background-size:13px;background-image:url("+mxWindow.prototype.minimizeImage+");";g.appendChild(n);var q=mxUtils.bind(this,function(){n.innerText="";if(null!=this.currentPage){mxUtils.write(n,this.currentPage.getName());var H=null!=this.pages?this.pages.length:1,V=this.getPageIndex(this.currentPage);
V=null!=V?V+1:1;var R=this.currentPage.getId();n.setAttribute("title",this.currentPage.getName()+" ("+V+"/"+H+")"+(null!=R?" ["+R+"]":""))}});this.editor.addListener("pagesPatched",q);this.editor.addListener("pageSelected",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("fileLoaded",q);q();var t=mxUtils.bind(this,function(){n.style.display=this.isPageMenuVisible()?"inline-block":"none"});this.addListener("editInlineStart",mxUtils.bind(this,function(){t();q()}));this.addListener("fileDescriptorChanged",
t);this.addListener("pagesVisibleChanged",t);this.editor.addListener("pagesPatched",t);t();g.appendChild(this.createMenuItem("zoomOut",Editor.minusImage))}var x=this.createMenu("viewZoom",null,"geToolbarButton geAdaptiveAsset");x.setAttribute("title",mxResources.get("zoom"));x.innerHTML="100%";x.style.cssText="display:inline-flex;align-items:center;position:relative;padding:4px;box-shadow:none;width:40px;justify-content:center;cursor:pointer;";"simple"==d?(x.style.borderStyle="solid",x.style.borderWidth=
"1px",x.style.borderRadius="4px",x.style.fontSize="11px",x.style.fontWeight="500",x.style.paddingTop="4px",x.style.paddingRight="14px",x.style.backgroundImage="url("+Editor.thinExpandImage+")",x.style.backgroundPosition="right 0px center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="18px",x.style.opacity="0.7",x.style.height="12px"):(x.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",x.style.backgroundPosition="right 0px top 8px",x.style.backgroundRepeat="no-repeat",
x.style.backgroundSize="13px",x.style.paddingRight="16px",x.style.marginRight="-4px");g.appendChild(x);if("simple"==d){var A=this.createMenu("pages",Editor.thinNoteImage);A.style.backgroundSize="24px";A.style.display="inline-block";A.style.width="24px";A.style.height="30px";A.style.opacity="0.7";g.appendChild(A);var E=this.createMenuItem("undo",Editor.thinUndoImage);E.style.marginLeft="auto";E.style.flexShrink="0";E.style.opacity="0.7";g.appendChild(E);E=this.createMenuItem("redo",Editor.thinRedoImage);
E.style.marginLeft="0px";E.style.flexShrink="0";E.style.opacity="0.7";g.appendChild(E);E=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.style.display=480>H?"none":"";x.style.display=750>H?"none":"inline-flex"});mxEvent.addListener(window,"resize",E);E()}mxUtils.bind(this,function(H){mxEvent.addListener(H,"click",mxUtils.bind(this,function(R){mxEvent.isAltDown(R)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
mxEvent.consume(R)):mxEvent.isShiftDown(R)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(R))}));var V=mxUtils.bind(this,function(R,M,S){H.innerText="";mxUtils.write(H,Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,V);this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",V);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(R,M){V(R,M,M.getProperty("factor"))}))})(x);
"simple"!=d&&g.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var K=this.createMenuItem("fullscreen",Editor.fullscreenImage);g.appendChild(K);E=mxUtils.bind(this,function(){K.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",mxUtils.bind(this,function(){K.style.backgroundImage="url("+(Editor.inlineFullscreen?
Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",E);g.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==d?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;display:flex;text-align:right;user-select:none;box-sizing:border-box;",
this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt))}};EditorUi.prototype.createPickerMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchPickerMenuElt){var g=this.editor.graph;this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";var n=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(n.style,"transition","transform .3s ease-out");var q=document.createElement("a");q.style.padding="0px";q.style.boxShadow="none";
q.className="geMenuItem geAdaptiveAsset";q.style.display="simple"==d?"inline-block":"block";q.style.width="100%";q.style.height="14px";q.style.margin="4px 0 2px 0";q.style.backgroundImage="url("+Editor.expandMoreImage+")";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";q.style.backgroundSize="22px";mxUtils.setOpacity(q,40);q.setAttribute("title",mxResources.get("collapseExpand"));var t=q.style.margin,x=this.createMenuItem("insertFreehand","simple"==d?Editor.thinGestureImage:
Editor.freehandImage,!0);x.style.paddingLeft="simple"==d?"0px":"12px";x.style.backgroundSize="24px";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var A=this.createMenu("insert","simple"==d?Editor.thinAddCircleImage:Editor.addBoxImage);A.style.backgroundSize="24px";A.style.display="simple"==d?"inline-block":"block";A.style.flexShrink="0";A.style.width="30px";A.style.height="30px";A.style.padding="simple"==d?"0px":"4px 4px 0px 4px";A.style.opacity="0.7";var E=this.createMenu("table",
Editor.thinTableImage);E.style.backgroundSize="24px";E.style.padding="simple"==d?"0px":"4px 4px 0px 4px";E.style.display="inline-block";E.style.width="30px";E.style.height="30px";E.style.opacity="0.7";var K=A.cloneNode(!0);K.style.backgroundImage="url("+("simple"==d?Editor.thinShapesImage:Editor.shapesImage)+")";K.style.backgroundSize="24px";K.setAttribute("title",mxResources.get("shapes"));mxEvent.addListener(K,"click",mxUtils.bind(this,function(S){if(this.isShapePickerVisible())this.hideShapePicker();
else{var U=mxUtils.getOffset(K);Editor.inlineFullscreen||null==this.embedViewport?"simple"==d?(U.x-=this.diagramContainer.offsetLeft+30,U.y+=K.offsetHeight-19):(U.x+=K.offsetWidth+28,U.y+=20):(U.x=0,U.y=K.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,U.x)),this.diagramContainer.scrollTop+U.y,null,null,null,null,mxUtils.bind(this,function(l){return g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(l,!0))}),"simple"==d,!1)}mxEvent.consume(S)}));A.style.backgroundSize=
"24px";"simple"==d?A.style.flexShrink="0":A.style.marginBottom="4px";var H=!1,V=mxUtils.bind(this,function(S){if(S||document.body.contains(n)){S=function(J,G,P,p,z,I){null!=G&&J.setAttribute("title",G);J.style.cursor="pointer";J.style.margin="simple"==d?"0px":"8px 0px 8px 2px";J.style.display="simple"==d?"inline-block":"block";n.appendChild(J);"simple"==d?J.style.opacity="0.7":null!=p&&(G=z,G=null!=G?G:30,I=null!=I?I:26,J.style.position="relative",J.style.overflow="visible",P=document.createElement("div"),
P.style.position="absolute",P.style.fontSize="8px",P.style.left=G+"px",P.style.top=I+"px",mxUtils.write(P,p),J.appendChild(P));return J};n.innerText="";if(!H){var U=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==d&&(this.sidebar.graph.cellRenderer.minSvgStrokeWidth=.9);var l="simple"==d?"0px":"4px 0px 6px 2px";if("simple"!=d||660<=U){var y=this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,"simple"!=d,null,38,38,"simple"==d?Editor.thinTextImage:null,!0);"simple"==d&&(y.className="geToolbarButton",y.style.opacity="0.7");S(y,mxResources.get("text")+" (A)",null,"A",32).style.margin="simple"==d?"0 -8px 0 0":"0 0 0 -2px"}y=this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=d,null,28,28,"simple"==d?Editor.thinRectangleImage:null);"simple"==d?(600<=U&&
(y.className="geToolbarButton",y.style.opacity="0.7",S(y,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=U&&this.sketchPickerMenuElt.appendChild(K),440<=U&&S(x,mxResources.get("freehand")+" (X)",null,"X"),500<=U&&this.sketchPickerMenuElt.appendChild(E)):(S(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0,null,28,28),mxResources.get("note")+" (S)",null,"S").style.margin=l,S(y,mxResources.get("rectangle")+" (D)",null,"D").style.margin=l,S(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0,null,28,28),mxResources.get("ellipse")+" (F)",null,"F").style.margin=l,l=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),
l.geometry.setTerminalPoint(new mxPoint(0,0),!0),l.geometry.setTerminalPoint(new mxPoint(l.geometry.width,0),!1),l.geometry.points=[],l.geometry.relative=!0,l.edge=!0,S(this.sidebar.createEdgeTemplateFromCells([l],l.geometry.width,l.geometry.height,mxResources.get("line")+" (C)",!0,null,"simple"!=d,!1,null,28,28),mxResources.get("line")+" (C)",null,"C").margin="1px 0px 1px 2px",l=l.clone(),l.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;",
l.geometry.width=this.editor.graph.defaultEdgeLength+20,l.geometry.setTerminalPoint(new mxPoint(0,20),!0),l.geometry.setTerminalPoint(new mxPoint(l.geometry.width,20),!1),S(this.sidebar.createEdgeTemplateFromCells([l],l.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1,null,28,28),mxResources.get("arrow")).style.margin="1px 0px 1px 2px",S(x,mxResources.get("freehand")+" (X)",null,"X"),this.sketchPickerMenuElt.appendChild(K));("simple"!=d||320<U)&&this.sketchPickerMenuElt.appendChild(A)}"simple"!=
d&&"1"!=urlParams.embedInline&&n.appendChild(q);this.sidebar.graph.cellRenderer.minSvgStrokeWidth=this.sidebar.minThumbStrokeWidth}});mxEvent.addListener(q,"click",mxUtils.bind(this,function(){H?(mxUtils.setPrefixedStyle(n.style,"transform","translate(0, -50%)"),n.style.padding="0px 4px 4px",n.style.width="48px",n.style.top="50%",n.style.bottom="",n.style.height="",q.style.backgroundImage="url("+Editor.expandMoreImage+")",q.style.width="100%",q.style.height="14px",q.style.margin=t,H=!1,V()):(n.innerText=
"",n.appendChild(q),mxUtils.setPrefixedStyle(n.style,"transform","translate(0, 0)"),n.style.width="auto",n.style.bottom="12px",n.style.padding="0px",n.style.top="",q.style.backgroundImage="url("+Editor.expandLessImage+")",q.style.width="24px",q.style.height="24px",q.style.margin="0px",H=!0)}));var R=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,M=null;mxEvent.addListener(window,"resize",function(){var S=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth;S!=R&&(R=S,null!=M&&window.clearTimeout(M),M=window.setTimeout(function(){M=null;V()},200))});this.editor.addListener("fileLoaded",V);this.addListener("sketchModeChanged",V);this.addListener("currentThemeChanged",V);Editor.enableCssDarkMode||this.addListener("darkModeChanged",V);V(!0);"simple"==d?(this.sketchPickerMenuElt.style.cssText="position:relative;white-space:nowrap;user-select:none;display:flex;align-items:center;justify-content:flex-end;flex-grow:1;gap:6px;flex-shrink:0;",
this.sketchMainMenuElt.appendChild(this.sketchPickerMenuElt)):(this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;z-index:1;width:48px;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;",this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt));mxClient.IS_POINTER&&(this.sketchPickerMenuElt.style.touchAction="none")}};EditorUi.prototype.getNetworkStatus=function(){var d=null;if(this.isOffline(!0))d=
mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()?null==g.sync||g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(d=g.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+
": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){if("simple"==d||"sketch"==d){if(null==this.sketchMenubarElt){this.sketchMenubarElt=document.createElement("div");this.sketchMenubarElt.className="geToolbarContainer";if("simple"==d){this.sketchMenubarElt.style.cssText="position:relative;flex-grow:0.5;overflow:visible;"+("1"!=urlParams.embed?"flex-shrink:0;":"min-width:0;")+"display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;";
null==this.commentElt&&(this.commentElt=this.createMenuItem("comments",Editor.thinCommentImage,!0),this.commentElt.style.paddingLeft="0px",this.commentElt.style.backgroundSize="24px",this.commentElt.style.width="26px",this.commentElt.style.height="30px",this.commentElt.style.opacity="0.7");if(null==this.shareElt&&"1"!=urlParams.embed&&"draw.io"==this.getServiceName())if(this.shareElt=this.createMenu("share",Editor.thinUserAddImage),this.shareElt.style.backgroundSize="24px",this.shareElt.style.display=
"inline-block",this.shareElt.style.flexShrink="0",this.shareElt.style.width="24px",this.shareElt.style.height="30px",this.shareElt.style.opacity="0.7",this.isStandaloneApp())this.shareElt.style.backgroundImage="url("+Editor.thinShareImage+")";else{var g=mxUtils.bind(this,function(){var q=mxResources.get("share"),t=Editor.thinUserAddImage,x=this.getNetworkStatus();null!=x&&(q=q+" ("+x+")",t=Editor.thinUserFlashImage);this.shareElt.style.backgroundImage="url("+t+")";this.shareElt.setAttribute("title",
q)});this.addListener("realtimeStateChanged",g);this.editor.addListener("statusChanged",g);mxEvent.addListener(window,"offline",g);mxEvent.addListener(window,"online",g);g()}null==this.mainMenuElt&&(this.mainMenuElt=this.createMenu("diagram",Editor.thinMenuImage),this.mainMenuElt.style.backgroundSize="24px",this.mainMenuElt.style.display="inline-block",this.mainMenuElt.style.flexShrink="0",this.mainMenuElt.style.width="24px",this.mainMenuElt.style.height="30px",this.mainMenuElt.style.opacity="0.7");
if(null==this.formatElt){this.formatElt=this.createMenuItem("format",Editor.thinDesignImage,!0);this.formatElt.style.backgroundSize="24px";this.formatElt.style.marginLeft="1"!=urlParams.embed?"auto":"0";this.formatElt.style.flexShrink="0";this.formatElt.style.width="20px";this.formatElt.style.opacity="0.7";var n=this.formatElt.className+" geToggleItem";this.formatElt.className=n+(0==this.formatWidth?"":" geActiveItem");this.addListener("formatWidthChanged",function(){this.formatElt.className=n+(0==
this.formatWidth?"":" geActiveItem")})}}else this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;overflow:hidden;user-select:none;max-width:calc(100% - 170px);box-sizing:border-box;justify-content:flex-end;z-index:1;padding:7px 12px;display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;",this.sketchWrapperElt.appendChild(this.sketchMenubarElt);"1"!=urlParams.embedInline&&(g=mxUtils.bind(this,
function(){if("sketch"==Editor.currentTheme){var q=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=q?"70px":"10px";this.sketchMenubarElt.style.maxWidth=q?"calc(100% - 230px)":"calc(100% - 170px)"}else"simple"==Editor.currentTheme&&(q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,null!=this.commentElt&&(this.commentElt.style.display=560<q&&this.commentsSupported()?"":"none"),null!=this.shareElt&&(this.shareElt.style.display=
360<q?"":"none"))}),g(),mxEvent.addListener(window,"resize",g),this.editor.addListener("fileLoaded",g));"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)}"simple"==d&&(null!=this.buttonContainer&&(this.buttonContainer.style.padding="0px",this.sketchMenubarElt.appendChild(this.buttonContainer),null!=this.formatElt&&"1"==urlParams.embed&&(this.formatElt.style.marginLeft="")),null!=this.commentElt&&this.sketchMenubarElt.appendChild(this.commentElt),
null!=this.shareElt&&this.sketchMenubarElt.appendChild(this.shareElt),this.sketchMenubarElt.appendChild(this.mainMenuElt),this.sketchMenubarElt.appendChild(this.formatElt));null!=this.statusContainer&&(this.statusContainer.style.flexGrow="1",this.statusContainer.style.flexShrink="1",this.statusContainer.style.marginTop="0px","simple"!=d?this.sketchMenubarElt.appendChild(this.statusContainer):(this.statusContainer.style.justifyContent="center",this.statusContainer.style.width="22%"));"simple"!=d&&
null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement));g=this.menubar.langIcon;null!=g&&(g.style.position="",g.style.height="21px",g.style.width="21px",g.style.flexShrink="0",g.style.opacity="0.7",this.sketchMenubarElt.appendChild(g));"simple"==d?(this.sketchMainMenuElt.appendChild(this.statusContainer),this.sketchMainMenuElt.appendChild(this.sketchMenubarElt)):null!=this.buttonContainer&&(this.buttonContainer.style.padding=
"0px",this.sketchMenubarElt.appendChild(this.buttonContainer))}else null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer)),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),g=this.menubar.langIcon,null!=g&&
(g.style.position="absolute",g.style.height="18px",g.style.width="18px",g.style.flexShrink="",g.style.opacity="",this.menubarContainer.parentNode.insertBefore(g,this.menubarContainer)),null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,g,n,q){n=null!=n?n:"geToolbarButton";var t=this.menus.get(d);q=this.menubar.addMenu(mxResources.get(d),t.funct,
null,q);q.className=n;q.style.display="inline-block";q.style.cursor="pointer";q.style.height="24px";q.setAttribute("title",mxResources.get(d));this.menus.menuCreated(t,q,n);null!=g&&(q.style.backgroundImage="url("+g+")",q.style.backgroundPosition="center center",q.style.backgroundRepeat="no-repeat",q.style.backgroundSize="100% 100%",q.style.width="24px",q.innerText="");return q};EditorUi.prototype.createToolbarButton=function(d,g,n,q){q=null!=q?q:24;var t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset";
t.setAttribute("title",g);t.style.backgroundImage="url("+d+")";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";t.style.backgroundSize="100% 100%";t.style.display="inline-block";t.style.cursor="pointer";t.style.marginLeft="6px";t.style.width=q+"px";t.style.height=q+"px";null!=n&&(mxEvent.addListener(t,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()})),mxEvent.addListener(t,"click",function(x){"disabled"!=t.getAttribute("disabled")&&
n(x);mxEvent.consume(x)}));return t};EditorUi.prototype.createMenuItem=function(d,g,n){var q=this.actions.get(d),t=null!=q?q.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=q&&null!=q.shortcut?" ("+q.shortcut+")":""),t);null==q||n||(d=function(){q.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=q.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),q.addListener("stateChanged",
d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(t){t.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));
var n=this.formatWindow.window.toggleMinimized,q=240;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+q-140+"px"):(this.div.style.width=q+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-q+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,
"dblclick",mxUtils.bind(this,function(t){mxEvent.getSource(t)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(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 v=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):v.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=134);var n=this.hsplitPosition,q=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=n-this.hsplitPosition}),t=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&q();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&&q()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var D=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():D.apply(this,arguments)};var C=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 n=this.getDiagramContainerOffset();var q=n.x;var t=n.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+q+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+
"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=n.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else C.apply(this,
arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(q){q=this.createMenu(q,null,"geTitle");q.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;";d.appendChild(q);return q});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=
document.createElement("div"),g.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;",g.className="geTitle",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),g=g.cloneNode(!1),g.style.left="50%",g.style.borderLeftStyle="solid",mxUtils.write(g,mxResources.get("openLibrary")),
d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var n=g("newLibrary");n.style.fontSize="11px";n.style.left="0";n=g("openLibraryFrom");n.style.borderLeftStyle="solid";n.style.fontSize="11px";n.style.left="50%"}d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
650),n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),n&&"1"!=urlParams.embedInline?66:10,n&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(q){this.createShapesPanel(q)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return(Editor.isDarkMode()?"html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html > body.geEditor > div > a.geItem { background-color: "+
g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),
"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,n=this.sketchPickerMenuElt,q=this.editor.graph;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",n.style.left="10px",n.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+
" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");q.getGraphBounds();var x=t.split(" ");q=mxUtils.getDocumentSize();this.diagramContainer.style.top=x[0];
this.diagramContainer.style.left=x[1];t=parseInt(x[2]);x=parseInt(x[3]);t=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,t):t,q.width-80);x=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,x):x,q.height-80);this.diagramContainer.style.width=t+"px";this.diagramContainer.style.height=x+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),
"*")}g.style.left=this.diagramContainer.offsetLeft+"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";n.style.display="";n.style.left=this.diagramContainer.offsetLeft-n.offsetWidth-4+"px";n.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=g.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/
2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=
this.bottomResizer.style.visibility;g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;
if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var g=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=g}"simple"==Editor.currentTheme?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle=
"none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=
Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):
this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var n=d.indexOf(",");0<n&&(g=this.getPageById(d.substring(n+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=mxResources.get("action"));return g};
EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var g=d.indexOf(",");if(d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=g.getProperty("customFonts"),
this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();
this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),
this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,n){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,
function(q,t){try{this.spinner.stop();var x=this.createImageDataUri(q,g,"png"),A=parseInt(t.getAttribute("width")),E=parseInt(t.getAttribute("height"));this.writeImageToClipboard(x,A,E,mxUtils.bind(this,function(K){this.handleError(K)}))}catch(K){this.handleError(K)}}),null,null,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=n?n:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?
d:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(d,g,n,q){var t=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":t,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+n+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](q)};EditorUi.prototype.copyCells=function(d,g){var n=this.editor.graph;if(n.isSelectionEmpty())d.innerText="";else{var q=mxUtils.sortCells(n.model.getTopmostCells(n.getSelectionCells())),
t=mxUtils.getXml(n.encodeCells(q));mxUtils.setTextContent(d,encodeURIComponent(t));g?(n.removeCells(q,!1),n.lastPasteXml=null):(n.lastPasteXml=t,n.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};
EditorUi.prototype.pasteXml=function(d,g,n,q,t){t=null!=t?t:!0;var x=this.editor.graph,A=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var E=x.pasteCounter*x.gridSize;if(n||this.isCompatibleString(d))A=this.importXml(d,E,E),x.setSelectionCells(A);else if(g&&1==x.getSelectionCount()){t=x.getStartEditingCell(x.getSelectionCell(),q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(t)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon flow webcola tags".split(" ");
this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,140,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnDomain=function(){return"test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnDomain()};
new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(l,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...",function(){var l=new FeedbackDialog(c);c.showDialog(l.container,610,360,!0,!1);l.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):
c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});B=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):
this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));B=c.actions.addAction("findReplace",mxUtils.bind(this,function(l,y){var J=(l=k.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=J+"Window";if(null==this[y]){var G="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,
P=l?G?330:300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(P+20),100,P,l?G?304:288:170,l);this[y].window.addListener("show",function(){c.fireEvent(new mxEventObject(J))});this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(J))});this[y].window.setVisible(!0)}else this[y].window.setVisible(!this[y].window.isVisible())}),null,null,Editor.ctrlKey+"+F");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){var l=k.isEnabled()?"findReplaceWindow":"findWindow";
return null!=this[l]&&this[l].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var l=null==c.pages||1>=c.pages.length;if(l)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var J=document.createElement("h3");mxUtils.write(J,mxResources.get("formatVsdx"));J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(J);var G=c.addCheckbox(y,mxResources.get("allPages"),
!l,l);G.style.marginBottom="16px";l=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!G.checked)}),null,mxResources.get("export"));c.showDialog(l.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginRight="8px";l.checked=mxSettings.getShowStartScreen();l.defaultChecked=l.checked;if(Editor.isSettingsEnabled()&&("sketch"==
Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(l);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(G){mxEvent.getSource(G)!=l&&(l.checked=!l.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),
function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var J=c.actions.get("plugins");null==J||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),J.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(G,P){if(0<P.value.length)try{var p=
JSON.parse(P.value),z=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(p)),I=new EmbedDialog(c,z);c.showDialog(I.container,450,240,!0);I.init()}catch(Q){c.handleError(Q)}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(G){c.handleError(G)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,l.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=l.parentNode&&(mxSettings.setShowStartScreen(l.checked),mxSettings.save())})});
if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(l,y){var J=mxUtils.bind(this,function(P){var p=""==P?mxResources.get("automatic"):mxLanguageMap[P],z=null;""!=p&&(z=l.addItem(p,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(P);c.alert(mxResources.get("restartForChangeRequired"))}),y),(P==mxLanguage||""==P&&null==mxLanguage)&&l.addCheckmark(z,Editor.checkmarkImage));return z});J("");l.addSeparator(y);for(var G in mxLanguageMap)J(G)})));var F=
Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(l){var y=F.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var J=this.get("dynamicAppearance");if(null!=J){var G=y.addMenu("",J.funct);G.setAttribute("title",mxResources.get("appearance"));G.className="geToolbarButton geAdaptiveAsset";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="100% 100%";
G.style.display="inline-block";G.style.cursor="pointer";G.style.zIndex="1";G.style.position="absolute";G.style.height="18px";G.style.width="18px";"atlas"==Editor.currentTheme?(G.style.filter="invert(100%)",G.style.right="11px",G.style.top="10px"):(G.style.right="10px",G.style.top="5px");document.body.appendChild(G);y.langIcon=G;J=mxUtils.bind(this,function(){var P=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;G.style.display="atlas"==Editor.currentTheme||"min"==
Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";G.style.backgroundImage="simple"==Editor.currentTheme?750>P?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()||Editor.cssDarkMode?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",J);this.editorUi.addListener("darkModeChanged",J);mxEvent.addListener(window,"resize",J);J()}}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))});Editor.enableCssDarkMode&&c.actions.put("convertDarkModeColors",new Action("Dark Mode Colors...",function(l){null==c.darkModeColorsWindow&&(c.darkModeColorsWindow=new DarkModeColorsWindow(c,document.body.offsetWidth-520,80,200,100));
c.darkModeColorsWindow.window.setVisible(!0)}));B=this.get("viewZoom");var d=B.funct;B.funct=mxUtils.bind(this,function(l,y){d.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","outline","fullscreen"],y)});B=this.get("layout");var g=B.funct;B.funct=function(l,y){g.apply(this,arguments);l.addItem(mxResources.get("orgChart"),null,function(){var J=null,G=20,P=20,p=function(){"undefined"!==typeof mxOrgChartLayout&&null!=J&&c.tryAndHandle(mxUtils.bind(this,
function(){var X=c.editor.graph,Z=new mxOrgChartLayout(X,J,G,P),Y=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(Y=X.getSelectionCell());Z.execute(Y)}))},z=document.createElement("div"),I=document.createElement("div");I.style.marginTop="6px";I.style.display="inline-block";I.style.width="140px";mxUtils.write(I,mxResources.get("orgChartType")+": ");z.appendChild(I);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";I=[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 N=0;N<I.length;N++){var T=document.createElement("option");mxUtils.write(T,I[N]);T.value=N;2==N&&T.setAttribute("selected","selected");Q.appendChild(T)}mxEvent.addListener(Q,"change",function(){J=Q.value});z.appendChild(Q);I=document.createElement("div");I.style.marginTop="6px";I.style.display=
"inline-block";I.style.width="140px";mxUtils.write(I,mxResources.get("parentChildSpacing")+": ");z.appendChild(I);var O=document.createElement("input");O.type="number";O.value=G;O.style.width="200px";O.style.boxSizing="border-box";z.appendChild(O);mxEvent.addListener(O,"change",function(){G=O.value});I=document.createElement("div");I.style.marginTop="6px";I.style.display="inline-block";I.style.width="140px";mxUtils.write(I,mxResources.get("siblingSpacing")+": ");z.appendChild(I);var W=document.createElement("input");
W.type="number";W.value=P;W.style.width="200px";W.style.boxSizing="border-box";z.appendChild(W);mxEvent.addListener(W,"change",function(){P=W.value});I=mxUtils.button(mxResources.get("custom")+"...",function(){var X=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(Q.value),parentChildSpacing:parseInt(O.value),siblingSpacing:parseInt(W.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(X,null,2))});I.className="geBtn";z=new CustomDialog(c,z,function(){null==J&&(J=2);c.loadOrgChartLayouts(p)},
null,null,null,I);c.showDialog(z.container,355,140,!0,!0)},y,null,m());l.addSeparator(y);l.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var J=new mxParallelEdgeLayout(k);J.checkOverlap=!0;c.prompt(mxResources.get("spacing"),J.spacing,mxUtils.bind(this,function(G){c.tryAndHandle(mxUtils.bind(this,function(){J.spacing=G;c.executeLayout(function(){J.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},!1)}))}))}))}),
y);l.addSeparator(y);c.menus.addMenuItem(l,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(l,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(l,["about"],y);else{var J=l.addItem("Search:",null,null,y,null,null,!1);J.style.cursor="default";var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("size","25");G.style.borderWidth="1px";G.style.marginLeft="8px";mxEvent.addListener(G,"keydown",mxUtils.bind(this,
function(P){var p=mxUtils.trim(G.value);13==P.keyCode&&0<p.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(p)),G.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:p}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==P.keyCode&&(G.value="")}));J.firstChild.nextSibling.appendChild(G);mxEvent.addGestureListeners(G,function(P){document.activeElement!=
G&&G.focus();mxEvent.consume(P)},function(P){mxEvent.consume(P)},function(P){mxEvent.consume(P)});window.setTimeout(function(){G.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(l,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(l,["check4Updates"],y),this.addMenuItems(l,["openDevTools",
"-","about"],y)):this.addMenuItems(l,"- keyboardShortcuts quickStart support - about".split(" "),y)}"1"==urlParams.test&&(l.addSeparator(y),this.addSubmenu("testDevelop",l,y))})));c.actions.addAction("languageCode...",function(){var l=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,k.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");
c.showDialog(l.container,340,96,!0,!0);l.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,["languageCode","-"],y);y=l.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;k.refresh()},y);Graph.translateDiagram||l.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");
mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");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(!k.isSelectionEmpty()){var l=k.cloneCells(k.getSelectionCells()),y=k.getBoundingBoxFromGeometry(l);l=k.moveCells(l,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(l)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function l(z){return null==z||null==z.boundingBox||!isNaN(z.boundingBox.x)&&!isNaN(z.boundingBox.y)&&
!isNaN(z.boundingBox.width)&&!isNaN(z.boundingBox.height)}var y=k.getGraphBounds(),J=k.view.translate,G=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",y.x/G-J.x,y.y/G-J.y,y.width/G,y.height/G,"fillColor=none;strokeColor=red;");var P=0,p=0;k.view.states.visit(function(z,I){z=!0;l(I.shape)||(console.log("invalid shape",I.cell.id,I.shape),z=!1);l(I.text)||(console.log("invalid text",I.cell.id,I.text),z=!1);z||P++;p++});console.log("states checked",p,"invalid",P)}));c.actions.addAction("testCheckFile",
mxUtils.bind(this,function(){var l=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";l=new TextareaDialog(c,"Paste Data:",l,function(y){if(0<y.length)try{var J=function(I){function Q(aa){if(null==fa[aa]){if(fa[aa]=!0,null!=O[aa]){for(;0<O[aa].length;){var da=O[aa].pop();Q(da)}delete O[aa]}}else mxLog.debug(N+": Visited: "+aa)}var N=I.parentNode.id,T=I.childNodes;I={};for(var O={},W=null,X={},Z=0;Z<T.length;Z++){var Y=T[Z];if(null!=Y.id&&0<Y.id.length)if(null==
I[Y.id]){I[Y.id]=Y.id;var ba=Y.getAttribute("parent");null==ba?null!=W?mxLog.debug(N+": Multiple roots: "+Y.id):W=Y.id:(null==O[ba]&&(O[ba]=[]),O[ba].push(Y.id))}else X[Y.id]=Y.id}T=Object.keys(X);0<T.length?(T=N+": "+T.length+" Duplicates: "+T.join(", "),mxLog.debug(T+" (see console)")):mxLog.debug(N+": Checked");var fa={};null==W?mxLog.debug(N+": No root"):(Q(W),Object.keys(fa).length!=Object.keys(I).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",O)))};"<"!=
y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var G=mxUtils.parseXml(y),P=c.getPagesForNode(G.documentElement,"mxGraphModel");if(null!=P&&0<P.length)try{var p=c.getHashValueForPages(P);mxLog.debug("Checksum: ",p)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var z=G.getElementsByTagName("root");for(y=0;y<z.length;y++)J(z[y]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});
c.showDialog(l.container,620,460,!0,!0);l.init()}));var n=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var l=new TextareaDialog(c,"Diff/Sync:","",function(y){var J=c.getCurrentFile();if(0<y.length&&null!=J)try{var G=JSON.parse(y);J.patch([G],null,!0,!0);c.hideDialog()}catch(P){c.handleError(P)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,J){n=c.getPagesForXml(c.getFileData(!0));l.textarea.value="Snapshot updated "+(new Date).toLocaleString()+
" Checksum "+c.getHashValueForPages(n)}],["Diff",function(y,J){try{l.textarea.value=JSON.stringify(c.diffPages(n,c.pages),null,2)}catch(G){c.handleError(G)}}]]);null==n?(n=c.getPagesForXml(c.getFileData(!0)),l.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(n)):l.textarea.value=JSON.stringify(c.diffPages(n,c.pages),null,2);c.showDialog(l.container,620,460,!0,!0);l.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,
function(){var l=c.getCurrentFile();null!=c.pages&&null!=l?c.spinner.spin(document.body,mxResources.get("loading"))&&l.getLatestVersion(function(y){c.spinner.stop();var J=c.getHashValueForPages(c.pages),G=l.getCurrentRevisionId(),P=c.getHashValueForPages(y.getShadowPages()),p=y.getDescriptorChecksum(y.getDescriptor()),z=y.getCurrentRevisionId();console.log("Local File",[l],"modified",l.isModified(),"checksum",J);console.log("Remote File",[y],"rev",z==G,"desc",p==P,"checksum",P);c.alert("Checksums "+
(P==J?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var l=c.getCurrentFile();console.log("editorUi",c,"file",l);if(null!=l&&l.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(l.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(l.theirPages));console.log("diff ownPages/theirPages",c.diffPages(l.ownPages,
l.theirPages));var y=l.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,l.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(l.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(l.theirPages,y)));null!=l.sync&&null!=l.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(l.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(l.ownPages,l.sync.snapshot)),
console.log("diff theirPages/snapshot",c.diffPages(l.theirPages,l.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(l.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(l.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(l.theirPages,c.pages)))}null!=l&&console.log("Shadow pages",[c.getXmlForPages(l.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));
c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var l=c.getCurrentFile();null!=l&&l.isRealtime()&&null!=l.shadowPages&&(console.log("patching actualPages to shadowPages",l.patch([c.diffPages(l.shadowPages,c.pages)])),l.ownPages=c.clonePages(c.pages),l.theirPages=c.clonePages(c.pages),l.shadowPages=c.clonePages(c.pages),null!=l.sync&&(l.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){k.model.beginUpdate();
try{var l=k.model.cells,y=0,J=[],G=[],P;for(P in l){var p=l[P],z=k.getCurrentCellStyle(p)[mxConstants.STYLE_IMAGE];null!=z&&"data:"==z.substring(0,5)&&(null==J[z]&&(J[z]=(J[z]||0)+1,y++),G.push(p))}k.setCellStyles(mxConstants.STYLE_IMAGE,null,G);console.log("Removed",y,"image(s) from",G.length,"cell(s): ",[G,J])}finally{k.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var l=
new mxImageExport,y=k.getGraphBounds(),J=k.view.scale,G=mxUtils.createXmlDocument(),P=G.createElement("output");G.appendChild(P);G=new mxXmlCanvas2D(P);G.translate(Math.floor((1-y.x)/J),Math.floor((1-y.y)/J));G.scale(1/J);var p=0,z=G.save;G.save=function(){p++;z.apply(this,arguments)};var I=G.restore;G.restore=function(){p--;I.apply(this,arguments)};var Q=l.drawShape;l.drawShape=function(N){mxLog.debug("entering shape",N,p);Q.apply(this,arguments);mxLog.debug("leaving shape",N,p)};l.drawState(k.getView().getState(k.model.root),
G);mxLog.show();mxLog.debug(mxUtils.getXml(P));mxLog.debug("stateCounter",p)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var q=null,t=null,x=null,A=null,E=null,K=null,H=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=q?(k.view.revalidate=q,q=null):(q=k.view.revalidate,k.view.revalidate=function(){var l=Date.now(),y=q.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=t?(c.selectPage=t,t=null):(t=c.selectPage,c.selectPage=function(){var l=Date.now(),y=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=x?(c.diffPages=x,x=null):(x=c.diffPages,c.diffPages=function(){var l=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-l+" ms","args",arguments);
return y});null!=A?(c.patchPages=A,A=null):(A=c.patchPages,c.patchPages=function(){var l=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=E?(c.clonePages=E,E=null):(E=c.clonePages,c.clonePages=function(){var l=Date.now(),y=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=K?(c.getHashValueForPages=K,
K=null):(K=c.getHashValueForPages,c.getHashValueForPages=function(){var l=Date.now(),y=K.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-l+" ms","args",arguments);return y});null!=H?(c.resolveCrossReferences=H,H=null):(H=c.resolveCrossReferences,c.resolveCrossReferences=function(){var l=Date.now(),y=H.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-l+" ms","args",arguments);return y});
EditorUi.debug("[Performance]",null!=q?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var J=l.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=q&&l.addCheckmark(J,Editor.checkmarkImage);this.addMenuItems(l,["-",
"testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(l){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(l){k.isEnabled()&&(l=new mxCell("",new mxGeometry(0,0,120,120),
c.defaultCustomShapeStyle),l.vertex=!0,l=new EditShapeDialog(c,l,mxResources.get("editShape")+":",630,400),c.showDialog(l.container,640,480,!0,!1),l.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",l,function(y,J,G,P,p,z,I,Q,N,T,O){c.createHtml(y,
J,G,P,p,z,I,Q,N,T,O,mxUtils.bind(this,function(W,X){var Z=new EmbedDialog(c,W+"\n"+X,null,null,function(){var Y=window.open(),ba=Y.document;if(null!=ba){"CSS1Compat"===document.compatMode&&ba.writeln("<!DOCTYPE html>");ba.writeln("<html>");ba.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');ba.writeln("<body>");ba.writeln(W);var fa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;fa&&ba.writeln(X);ba.writeln("</body>");ba.writeln("</html>");
ba.close();if(!fa){var aa=Y.document.createElement("div");aa.marginLeft="26px";aa.marginTop="26px";mxUtils.write(aa,mxResources.get("updatingDocument"));fa=Y.document.createElement("img");fa.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");fa.style.marginLeft="6px";aa.appendChild(fa);Y.document.body.insertBefore(aa,Y.document.body.firstChild);window.setTimeout(function(){var da=document.createElement("script");da.type="text/javascript";da.src=/<script.*?src="(.*?)"/.exec(X)[1];
ba.body.appendChild(da);aa.parentNode.removeChild(aa)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(Z.container,450,240,!0,!0);Z.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var l=c.getCurrentFile();null!=l&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(y){c.spinner.stop();null!=y?(y=new EmbedDialog(c,'<img src="'+(l.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+
l.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(l,y,J,G,P,p){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(l,y,J,G,P,p,function(z){c.spinner.stop();z=new EmbedDialog(c,z);c.showDialog(z.container,450,240,!0,!0);z.init()},function(z){c.spinner.stop();c.handleError(z)})},mxResources.get("image"),
mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(l,y,J,G,P,p){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(l,y,J,G,P,p,function(z){c.spinner.stop();z=new EmbedDialog(c,z);c.showDialog(z.container,450,240,!0,!0);z.init()},function(z){c.spinner.stop();c.handleError(z)})},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(){var l=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(l.height/k.view.scale)+2,function(y,J,G,P,p,z,I,Q,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(T){c.spinner.stop();var O=[];N&&O.push("tags=%7B%7D");T=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+Q+';" src="'+c.createLink(y,J,G,P,p,z,T,null,
O)+'"></iframe>');c.showDialog(T.container,450,240,!0,!0);T.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var l=document.createElement("div");l.style.position="absolute";l.style.bottom="30px";l.style.textAlign="center";l.style.width="100%";l.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"));
l.appendChild(y);mxEvent.addListener(y,"click",function(J){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(J)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(J,G,P,p,z,I,Q,N,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(O){c.spinner.stop();var W=["border=0"];T&&W.push("tags=%7B%7D");O=new EmbedDialog(c,c.createLink(J,G,P,p,z,I,O,null,W,!0));
c.showDialog(O.container,450,240,!0,!0);O.init()})},!0,"https://www.drawio.com/blog/drawio-notion",l)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(l,y,J,G,P,p,z,I,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(N){c.spinner.stop();var T=[];Q&&T.push("tags=%7B%7D");N=new EmbedDialog(c,c.createLink(l,y,J,G,P,p,N,null,T));c.showDialog(N.container,450,240,
!0,!0);N.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.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
function(l){c.spinner.stop();l=new GoogleSitesDialog(c,l);c.showDialog(l.container,420,256,!0,!0);l.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)B=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),B.setToggleAction(!0),B.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});B=c.actions.addAction("search",function(){var l=c.sidebar.isEntryVisible("search");
c.sidebar.showPalette("search",!l);isLocalStorage&&(mxSettings.settings.search=!l,mxSettings.save())});B.label=mxResources.get("searchShapes");B.setToggleAction(!0);B.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(l){k.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("save").funct=function(l){k.isEditing()&&k.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 J=c.createLoadMessage("save");J.xml=y;l&&(J.exit=!0);y=JSON.stringify(J)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));l=c.getCurrentFile();null==l||l.constructor==EmbedFile||l.constructor==LocalFile&&null==l.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?
c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var l=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,l,mxResources.get("cancel"),
mxResources.get("discardChanges")):l()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(l,y){c.isExportToCanvas()?(this.addMenuItems(l,["exportPng"],y),c.jpgSupported&&this.addMenuItems(l,["exportJpg"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPng","exportJpg"],y);this.addMenuItems(l,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(l,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&
navigator.standalone||this.addMenuItems(l,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(l,["exportVsdx"],y);this.addMenuItems(l,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(l.addSeparator(y),this.addMenuItem(l,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(l,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==
urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(l.addSeparator(y),c.menus.addSubmenu("embed",l,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(l,y){function J(p){p.pickFile(function(z){c.spinner.spin(document.body,mxResources.get("loading"))&&p.getFile(z,function(I){var Q="data:image/"==I.getData().substring(0,11)?P(I.getTitle()):"text/xml";/\.svg$/i.test(I.getTitle())&&!c.editor.isDataSvg(I.getData())&&(I.setData(Editor.createSvgDataUri(I.getData())),
Q="image/svg+xml");G(I.getData(),Q,I.getTitle())},function(I){c.handleError(I,null!=I?mxResources.get("errorLoadingFile"):null)},p==c.drive)},!0)}var G=mxUtils.bind(this,function(p,z,I){var Q=k.view,N=k.getGraphBounds(),T=k.snap(Math.ceil(Math.max(0,N.x/Q.scale-Q.translate.x)+4*k.gridSize)),O=k.snap(Math.ceil(Math.max(0,(N.y+N.height)/Q.scale-Q.translate.y)+4*k.gridSize));"data:image/"==p.substring(0,11)?c.loadImage(p,mxUtils.bind(this,function(W){var X=!0,Z=mxUtils.bind(this,function(){c.resizeImage(W,
p,mxUtils.bind(this,function(Y,ba,fa){Y=X?Math.min(1,Math.min(c.maxImageSize/ba,c.maxImageSize/fa)):1;c.importFile(p,z,T,O,Math.round(ba*Y),Math.round(fa*Y),I,function(aa){c.spinner.stop();k.setSelectionCells(aa);k.scrollCellToVisible(k.getSelectionCell())})}),X)});p.length>c.resampleThreshold?c.confirmImageResize(function(Y){X=Y;Z()}):Z()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(p,z,T,O,0,0,I,function(W){c.spinner.stop();k.setSelectionCells(W);
k.scrollCellToVisible(k.getSelectionCell())})}),P=mxUtils.bind(this,function(p){var z="text/xml";/\.png$/i.test(p)?z="image/png":/\.jpe?g$/i.test(p)?z="image/jpg":/\.gif$/i.test(p)?z="image/gif":/\.pdf$/i.test(p)&&(z="application/pdf");return z});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){J(c.drive)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},y,null,!1));null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){J(c.oneDrive)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){J(c.dropbox)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){J(c.gitHub)},y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){J(c.gitLab)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){J(c.trello)},y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&
l.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(l.addSeparator(y),l.addItem(mxResources.get("url")+"...",null,function(){var p=new FilenameDialog(c,"",mxResources.get("import"),function(z){if(null!=z&&0<z.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var I=/(\.png)($|\?)/i.test(z)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+
"?url="+encodeURIComponent(z),function(Q){G(Q,I,z)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==I)}},mxResources.get("url"));c.showDialog(p.container,300,80,!0,!0);p.init()},y))}))).isEnabled=m;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(l,y){var J=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>J&&this.addSubmenu("viewZoom",l,y,mxResources.get("zoom")),
460>J&&c.isPageMenuVisible()&&this.addSubmenu("pages",l,y),320>J&&this.addSubmenu("insert",l,y),360>J&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",l,y));this.addMenuItems(l,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(J=c.menus.addMenuItem(l,"autoMode",y),null!=J&&J.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&this.addMenuItems(l,["-","toggleSimpleMode"],
y)})));this.put("appearance",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(l=c.menus.addMenuItem(l,"autoMode",y),null!=l&&l.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||Editor.isDarkMode()?"dark":"light")+")"))})));c.actions.addAction("addToScratchpad",function(l){k.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(l)});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(l,y){var J="1"==urlParams.sketch?"sketch":mxSettings.getUi(),G=l.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},y);"kennedy"!=J&&"atlas"!=J&&"dark"!=J&&"simple"!=J&&"sketch"!=J&&"min"!=J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme(Editor.isDarkMode()?"dark":
"kennedy")},y);"kennedy"!=J&&"dark"!=J||l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("simple"),null,function(){c.setCurrentTheme("simple")},y);"simple"==J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},y);"sketch"==J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},y);"min"==J&&l.addCheckmark(G,Editor.checkmarkImage);G=l.addItem(mxResources.get("atlas"),
null,function(){c.setCurrentTheme("atlas")},y);"atlas"==J&&l.addCheckmark(G,Editor.checkmarkImage)})));B=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var l=this.editorUi.getCurrentFile();if(null!=l)if(l.constructor==LocalFile&&null!=l.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(J,G){l.invalidFileHandle=null;l.fileHandle=J;l.title=G.name;l.desc=G;c.save(G.name)}),null,c.createFileSystemOptions(l.getTitle()));else{var y=null!=l.getTitle()?l.getTitle():this.editorUi.defaultFilename;
y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,function(J){null!=J&&0<J.length&&null!=l&&J!=l.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&l.rename(J,mxUtils.bind(this,function(G){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(G){this.editorUi.handleError(G,null!=G?mxResources.get("errorRenamingFile"):null)}))}),l.constructor==DriveFile||l.constructor==StorageFile?mxResources.get("diagramName"):null,function(J){if(null!=
J&&0<J.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,340,96,!0,!0);y.init()}}));B.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};B.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var l=c.getCurrentFile();if(null!=l){var y=c.getCopyFilename(l);l.constructor==DriveFile?(y=new CreateDialog(c,
y,mxUtils.bind(this,function(J,G){"_blank"==G?c.editor.editAsNew(c.getFileData(),J):("download"==G&&(G=App.MODE_GOOGLE),null!=J&&0<J.length&&(G==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&l.saveAs(J,mxUtils.bind(this,function(P){l.desc=P;l.save(!1,mxUtils.bind(this,function(){c.spinner.stop();l.setModified(!1);l.addAllSavedStatus()}),mxUtils.bind(this,function(p){c.handleError(p)}))}),mxUtils.bind(this,function(P){c.handleError(P)})):c.createFile(J,c.getFileData(!0),
null,G)))}),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(l,y){l=c.getCurrentFile();null!=l&&c.openLink(l.getFolderUrl())}));c.actions.addAction("openFile...",mxUtils.bind(this,
function(){var l=c.getCurrentFile();null!=l&&c.openLink(l.getFileUrl())}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var l=c.getCurrentFile();if(l.getMode()==App.MODE_GOOGLE||l.getMode()==App.MODE_ONEDRIVE){var y=!1;if(l.getMode()==App.MODE_GOOGLE&&null!=l.desc.parents)for(var J=0;J<l.desc.parents.length;J++)if(l.desc.parents[J].isRoot){y=!0;break}c.pickFolder(l.getMode(),mxUtils.bind(this,function(G){c.spinner.spin(document.body,mxResources.get("moving"))&&l.move(G,mxUtils.bind(this,
function(P){c.spinner.stop()}),mxUtils.bind(this,function(P){c.handleError(P)}))}),null,!0,y)}}));this.put("publish",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,["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 l=c.getCurrentFile();null!=l&&l.share()}catch(y){c.handleError(y)}}));this.put("embed",new Menu(mxUtils.bind(this,
function(l,y){var J=c.getCurrentFile();null==J||J.getMode()!=App.MODE_GOOGLE&&J.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(J.getTitle())||this.addMenuItems(l,["liveImage","-"],y);this.addMenuItems(l,["embedImage","embedSvg","-","embedHtml"],y);navigator.standalone||c.isOffline()||this.addMenuItems(l,["embedIframe"],y);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(l,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),y)})));c.addInsertItem=function(l,y,J,
G){("plantUml"!=G||EditorUi.enablePlantUml&&!c.isOffline())&&l.addItem(J,null,mxUtils.bind(this,function(){if("fromText"==G||"formatSql"==G||"plantUml"==G||"mermaid"==G){var P=new ParseDialog(c,J,G);c.showDialog(P.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else P=new CreateGraphDialog(c,J,G),c.showDialog(P.container,620,420,!0,!1);P.init()}),y,null,m())};var V=function(l){k.getModel().beginUpdate();try{l=k.addCell(l),k.fireEvent(new mxEventObject("cellsInserted","cells",[l])),
k.model.isVertex(l)&&k.isAutoSizeCell(l)&&k.updateCellSize(l)}finally{k.getModel().endUpdate()}k.scrollCellToVisible(l);k.setSelectionCell(l);k.container.focus();k.editAfterInsert&&k.startEditing(l);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(l))},0);return l},R=function(l,y,J,G,P){l=new mxCell(l,new mxGeometry(0,0,y,J),G);l.vertex=!0;null==P&&(P=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([l],!0)));l.geometry.x=P.x;l.geometry.y=P.y;return V(l)};c.actions.put("insertText",
new Action(mxResources.get("text"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(R("Text",60,30,"text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint()))},null,null,"A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
R("",120,60,"whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&R("",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==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&R("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),
function(l){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&R("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint())},null,null,"R")).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(l){if(k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())){var y=k.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!k.isMouseInsertPoint()?null:k.getInsertPoint();
null==l&&(l=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([J],!0)));var J=new mxCell("",new mxGeometry(0,0,y,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");J.geometry.setTerminalPoint(l,!0);J.geometry.setTerminalPoint(new mxPoint(l.x+J.geometry.width,l.y),!1);J.geometry.points=[];J.geometry.relative=!0;J.edge=!0;V(J)}},null,null,"C")).isEnabled=m;B=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"));B.setToggleAction(!0);B.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(l,y,J){for(var G=0;G<J.length;G++)"-"==J[G]?l.addSeparator(y):c.addInsertItem(l,y,mxResources.get(J[G])+"...",J[G])});this.put("insert",new Menu(mxUtils.bind(this,function(l,y){"sketch"==
Editor.currentTheme?(c.menus.addMenuItems(l,["toggleShapes"],y),c.menus.addSubmenu("table",l,y),l.addSeparator(y),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(l,["insertTemplate"],y),c.menus.addMenuItems(l,["insertImage","insertLink","-"],y),c.menus.addSubmenu("insertAdvanced",l,y,mxResources.get("advanced")),c.menus.addSubmenu("layout",l,y)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
y),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(l,["insertTemplate"],y),l.addSeparator(y),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("table",l,y),this.addSubmenu("layout",l,y)):this.addSubmenu("insertLayout",l,y,mxResources.get("layout")),this.addSubmenu("insertAdvanced",l,y,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(l,y){c.menus.addInsertTableCellItem(l,y)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,
y){c.addInsertMenuItems(l,y,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(l,y){c.addInsertMenuItems(l,y,["fromText","plantUml","mermaid","-","formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){k.popupMenuHandler.hideMenu();c.showImportCsvDialog()},y,null,m());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","createShape","editDiagram"],
y)})));this.put("openRecent",new Menu(function(l,y){var J=c.getRecent();if(null!=J){for(var G=0;G<J.length;G++)(function(P){var p=P.mode;p==App.MODE_GOOGLE?p="googleDrive":p==App.MODE_ONEDRIVE&&(p="oneDrive");l.addItem(P.title+" ("+mxResources.get(p)+")",null,function(){c.loadFile(P.id)},y)})(J[G]);l.addSeparator(y)}l.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},y)}));this.put("openFrom",new Menu(function(l,y){null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,
function(){c.pickFile(App.MODE_GOOGLE)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+
"...",null,function(){c.pickFile(App.MODE_DROPBOX)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},
y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},y);c.isOffline()||(l.addSeparator(y),l.addItem(mxResources.get("url")+"...",null,function(){var J=
new FilenameDialog(c,"",mxResources.get("open"),function(G){null!=G&&0<G.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(G):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(G)))},mxResources.get("url"));c.showDialog(J.container,300,80,!0,!0);J.init()},y))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(l,y){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
(null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+
"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},y)})),this.put("openLibraryFrom",new Menu(function(l,y){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},y):u&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));null!=c.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},y):D&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);null!=c.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},y):v&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);l.addSeparator(y);null!=c.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},y);null!=c.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},y);null!=c.trello?l.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},y):C&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
"...)",null,function(){},y,null,!1);l.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},y);c.isOffline()||(l.addSeparator(y),l.addItem(mxResources.get("url")+"...",null,function(){var J=new FilenameDialog(c,"",mxResources.get("open"),function(G){if(null!=G&&0<G.length&&c.spinner.spin(document.body,
mxResources.get("loading"))){var P=G;c.editor.isCorsEnabledForUrl(G)||(P=PROXY_URL+"?url="+encodeURIComponent(G));mxUtils.get(P,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,p.getText(),G))}catch(z){c.handleError(z,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
c.showDialog(J.container,300,80,!0,!0);J.init()},y));"1"==urlParams.confLib&&(l.addSeparator(y),l.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},y))})));this.put("edit",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
B=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var l=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(l);this.commentsWindow.refreshCommentsTime();l&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(l,y){var J=
c.getCurrentFile();c.menus.addMenuItems(l,"toggleShapes format ruler - findReplace layers tags outline -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(l,["comments"],y);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&c.menus.addMenuItems(l,["showRemoteCursors"],y);c.menus.addMenuItems(l,["-","fullscreen"],y)};this.put("view",new Menu(mxUtils.bind(this,function(l,y){if("simple"==Editor.currentTheme){var J=c.getCurrentFile();c.menus.addMenuItems(l,["toggleShapes","format"],y);
c.isPageMenuVisible()&&c.menus.addMenuItems(l,["pageTabs"],y);c.menus.addMenuItems(l,["ruler","-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP){var G=c.menus.addMenuItem(l,"scratchpad",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad")}c.menus.addMenuItems(l,"- findReplace layers tags outline -".split(" "),y);c.commentsSupported()&&c.menus.addMenuItems(l,["comments"],y);null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&
this.addMenuItems(l,["showRemoteCursors"],y);this.addMenuItems(l,["-","fullscreen"],y)}else{this.addMenuItems(l,["format","outline","layers","tags"].concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(l,["-","search"],y);if(isLocalStorage||mxClient.IS_CHROMEAPP)G=this.addMenuItem(l,"scratchpad",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(l,["toggleShapes","-","pageView",
"pageScale"]);this.addSubmenu("units",l,y);l.addSeparator(y);c.isPageMenuVisible()&&c.menus.addMenuItems(l,["pageTabs"],y);this.addMenuItems(l,"tooltips ruler - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),y);"1"!=urlParams.sketch&&this.addMenuItems(l,["-","fullscreen"],y)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(l,y){this.addMenuItems(l,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
y)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(l,y){var J=c.currentPage;null!=J&&(l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(J,J.getName())}),y),l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(J)}),y),1<c.pages.length&&(c.menus.addSubmenu("movePage",l,y,mxResources.get("move")),l.addSeparator(y)),l.addSeparator(y),l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(J,
mxResources.get("copyOf",[J.getName()]))}),y),1!=urlParams.embed&&(l.addSeparator(y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y),null!=c.getLinkForPage(J)&&l.addItem(mxResources.get("link")+"...",null,mxUtils.bind(this,function(){c.showPageLinkDialog(J)}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(l,y){var J=
c.currentPage;l.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){c.insertPage()}),y);l.addSeparator(y);if(null!=c.pages)for(var G=0;G<c.pages.length;G++)mxUtils.bind(this,function(P){var p=null;p=c.pages[P]==J?c.menus.addSubmenu("currentPage",l,y,c.getShortPageName(J)):l.addItem(c.getShortPageName(c.pages[P]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[P])}),y);var z=c.pages[P].getId();p.setAttribute("title",c.pages[P].getName()+" ("+(P+1)+"/"+c.pages.length+")"+
(null!=z?" ["+z+"]":""));c.pages[P]==J&&l.addCheckmark(p,Editor.checkmarkImage)})(G)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;B=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();M=!M;c.alert(mxResources.get("restartForChangeRequired"))});B.setToggleAction(!0);B.setSelectedCallback(function(){return M});var S="1"==urlParams.enableStoreBkp;B=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();S=!S});B.setToggleAction(!0);B.setSelectedCallback(function(){return S});
c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var l=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"),null,null,null,null,null,null,50,250);c.showDialog(l.container,320,80,!0,!0);l.init()})}var U=this.get("language");this.put("extras",
new Menu(mxUtils.bind(this,function(l,y){if("simple"==Editor.currentTheme||"1"==urlParams.sketch||"min"==uiTheme){"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",l,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",l,y);l.addSeparator(y);null==U||"1"==urlParams.embed&&null!=urlParams.lang||
c.menus.addSubmenu("language",l,y);c.menus.addSubmenu("units",l,y);c.menus.addMenuItems(l,["-","copyConnect","collapseExpand","tooltips","-"],y);var J=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["showRemoteCursors"],y),c.menus.addMenuItems(l,["ruler","-"],y));EditorUi.isElectronApp&&c.menus.addMenuItems(l,["-","spellCheck","autoBkp","drafts","-"],y);this.addSubmenu("diagramLanguage",l,y);l.addSeparator(y);c.mode!=
App.MODE_ATLAS&&c.menus.addMenuItem(l,"configuration",y);l.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",l,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",l,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",l,y),l.addSeparator(y),"undefined"!==typeof MathJax&&(J=this.addMenuItem(l,"mathematicalTypesetting",
y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(l,["spellCheck","autoBkp","drafts","-"],y),this.addMenuItems(l,["copyConnect","collapseExpand","-"],y),"1"!=urlParams.embed&&(J=c.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["showRemoteCursors","shareCursor"],y),this.addMenuItems(l,["autosave"],y)),l.addSeparator(y),
!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(l,"plugins",y),this.addMenuItems(l,["-","editDiagram"],y),this.addSubmenu("diagramLanguage",l,y),l.addSeparator(y),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(l,["showStartScreen"],y),this.addMenuItems(l,["configuration"],y),l.addSeparator(y),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function G(p){return{id:p.id,isExt:!0,url:p.downloadUrl,title:p.title,imgUrl:p.thumbnailLink,changedBy:p.lastModifyingUserName,
lastModifiedOn:p.modifiedDate}}var P=new TemplatesDialog(c,function(p){console.log(arguments)},null,null,null,"user",function(p,z,I){var Q=new Date;Q.setDate(Q.getDate()-7);c.drive.listFiles(null,Q,I?!0:!1,function(N){for(var T=[],O=0;O<N.items.length;O++)T.push(G(N.items[O]));p(T)},z)},function(p,z,I,Q){c.drive.listFiles(p,null,Q?!0:!1,function(N){for(var T=[],O=0;O<N.items.length;O++)T.push(G(N.items[O]));z(T)},I)},function(p,z,I){c.drive.getFile(p.id,function(Q){z(Q.data)},I)},null,function(p){p({Test:[]},
1)},!0,!1);c.showDialog(P.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(l,"templates",y))})));this.put("movePage",new Menu(mxUtils.bind(this,function(l,y){var J=c.getSelectedPageIndex();if(null!=c.pages)for(var G=0;G<c.pages.length;G++)G!=J&&function(P){l.addItem(c.getShortPageName(c.pages[P]),null,function(){c.movePage(J,P)},y)}(G)})));this.put("share",new Menu(mxUtils.bind(this,function(l,y){if(!c.isStandaloneApp()){var J=c.isOffline(!0)?mxResources.get("offline"):
c.getNetworkStatus();null!=J&&(l.addItem(J,null,null,y,null,!1),l.addSeparator(y));c.menus.addMenuItems(l,["share"],y)}this.addMenuItem(l,"publishLink",y,null,null,mxResources.get("publish")+"...");null!=c.getMainUser()&&this.addMenuItems(l,["accounts"],y)})));this.put("diagram",new Menu(mxUtils.bind(this,function(l,y){var J=c.getCurrentFile();"simple"!=Editor.currentTheme&&(c.menus.addSubmenu("extras",l,y,mxResources.get("settings")),l.addSeparator(y));var G="simple"==Editor.currentTheme||"sketch"==
Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(l,"new open - synchronize properties - save saveAs -".split(" "),y);else if(c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(l,["-","save"],y);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(l,["saveAndExit"],y),null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["revisionHistory"],
y);l.addSeparator(y)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(l,["save","synchronize","-"],y):"1"!=urlParams.noFileMenu&&(c.menus.addSubmenu("file",l,y),l.addSeparator(y),"min"==Editor.currentTheme&&(c.menus.addMenuItems(l,"toggleShapes format layers tags - findReplace".split(" "),y),c.commentsSupported()&&c.menus.addMenuItems(l,["comments"],y),l.addSeparator(y)));c.menus.addSubmenu("exportAs",l,y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(l,["import"],y):"1"!=urlParams.noFileMenu&&
c.menus.addSubmenu("importFrom",l,y);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(c.menus.addMenuItems(l,["-","findReplace"],y),c.commentsSupported()&&c.menus.addMenuItems(l,["comments","-"],y),c.menus.addMenuItems(l,["toggleShapes","format","layers","tags","-"],y),c.menus.addMenuItems(l,["pageSetup"],y)):"min"!=Editor.currentTheme&&(this.addMenuItems(l,["-"],y),this.addSubmenu("newLibrary",l,y),this.addSubmenu("openLibraryFrom",l,y));l.addSeparator(y);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&
navigator.standalone||c.menus.addMenuItems(l,["print"],y);G||"min"==Editor.currentTheme||null==J||null==c.fileNode||"1"==urlParams.embedInline||(G=null!=J.getTitle()?J.getTitle():c.defaultFilename,/(\.html)$/i.test(G)||this.addMenuItems(l,["-","properties"]));l.addSeparator(y);"simple"==Editor.currentTheme&&(c.menus.addSubmenu("extras",l,y,mxResources.get("settings")),l.addSeparator(y));c.menus.addSubmenu("help",l,y);l.addSeparator(y);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
c.menus.addMenuItems(l,["save"],y),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(c.menus.addMenuItems(l,["saveAndExit"],y),null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["revisionHistory"],y));"1"!=urlParams.embed&&c.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&c.mode!=App.MODE_ATLAS||c.menus.addMenuItems(l,["exit"],y);"1"!=urlParams.embed&&null!=J&&c.menus.addMenuItems(l,["-","close"],y)})));this.put("save",new Menu(mxUtils.bind(this,function(l,
y){var J=c.getCurrentFile();null==J||J.constructor!=DriveFile&&J.constructor!=OneDriveFile?(c.menus.addMenuItems(l,["save","saveAs","-","rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],y):c.menus.addMenuItems(l,["makeCopy"],y)):c.menus.addMenuItems(l,["save","makeCopy","-","rename","moveToFolder"],y);c.menus.addMenuItems(l,["-","autosave"],y);null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["-","revisionHistory"],
y)})));this.put("file",new Menu(mxUtils.bind(this,function(l,y){var J="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",l,y),this.addSubmenu("exportAs",l,y),this.addSubmenu("embed",l,y),"1"==urlParams.libraries&&(this.addMenuItems(l,["-"],y),this.addSubmenu("newLibrary",l,y),this.addSubmenu("openLibraryFrom",l,y)),c.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],y),this.addMenuItems(l,
["-","pageSetup","print","-","rename"],y),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],y):(this.addMenuItems(l,["save"],y),"1"==urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],y))),"1"!=urlParams.noExitBtn&&this.addMenuItems(l,["exit"],y);else if(J){J=c.getCurrentFile();c.menus.addMenuItems(l,["new"],y);c.menus.addSubmenu("openFrom",l,y);isLocalStorage&&this.addSubmenu("openRecent",l,y);l.addSeparator(y);c.menus.addMenuItems(l,
["-","save"],y);null!=J&&J.constructor==DriveFile||c.menus.addMenuItems(l,["saveAs"],y);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==J||J.constructor==LocalFile&&null==J.fileHandle||c.menus.addMenuItems(l,["synchronize"],y);l.addSeparator(y);null!=J&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(l,"publishLink",y,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||J.constructor!=DriveFile&&J.constructor!=GitHubFile&&
J.constructor!=OneDriveFile||c.menus.addMenuItems(l,["share"],y));l.addSeparator(y);null!=J&&J.isRenamable()&&this.addMenuItems(l,["rename"],y);c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],y):(c.menus.addMenuItems(l,["makeCopy"],y),null!=J&&(J.constructor!=OneDriveFile&&J.constructor!=DriveFile||c.menus.addMenuItems(l,["moveToFolder"],y),l.addSeparator(y),null!=J.getFolderUrl()&&c.menus.addMenuItems(l,["openFolder"],y),null!=J.getFileUrl()&&
c.menus.addMenuItems(l,["openFile"],y)));l.addSeparator(y);null!=J&&J.isRevisionHistorySupported()&&c.menus.addMenuItems(l,["revisionHistory"],y);if(null!=J&&null!=c.fileNode&&"1"!=urlParams.embedInline){var G=null!=J.getTitle()?J.getTitle():c.defaultFilename;(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(l,["properties"],y)}"simple"==Editor.currentTheme&&c.menus.addMenuItems(l,["-","autosave"],y)}else J=this.editorUi.getCurrentFile(),null!=
J&&J.constructor==DriveFile?(J.isRestricted()&&this.addMenuItems(l,["exportOptionsDisabled"],y),this.addMenuItems(l,["save","-","share"],y),G=this.addMenuItem(l,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize"),l.addSeparator(y)):this.addMenuItems(l,["new"],y),this.addSubmenu("openFrom",l,y),isLocalStorage&&this.addSubmenu("openRecent",l,y),null!=J&&J.constructor==DriveFile?this.addMenuItems(l,"new - rename makeCopy openFolder moveToFolder".split(" "),
y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==J||J.constructor==LocalFile&&null==J.fileHandle||(l.addSeparator(y),G=this.addMenuItem(l,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(l,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==J||this.addMenuItems(l,["share","-"],y),null!=J&&J.isRenamable()&&
this.addMenuItems(l,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],y):(this.addMenuItems(l,["makeCopy"],y),null!=J&&(J.constructor==OneDriveFile&&this.addMenuItems(l,["moveToFolder"],y),null!=J.getFolderUrl()&&c.menus.addMenuItems(l,["openFolder"],y)))),l.addSeparator(y),this.addSubmenu("importFrom",l,y),this.addSubmenu("exportAs",l,y),l.addSeparator(y),this.addSubmenu("embed",l,y),this.addSubmenu("publish",l,y),l.addSeparator(y),
this.addSubmenu("newLibrary",l,y),this.addSubmenu("openLibraryFrom",l,y),c.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],y),null!=J&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(G=null!=J.getTitle()?J.getTitle():c.defaultFilename,(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G))&&this.addMenuItems(l,["-","properties"])),this.addMenuItems(l,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["print"],y),
this.addMenuItems(l,["-","close"])})));f.prototype.execute=function(){var l=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var y=l.extFonts,J=0;null!=y&&J<y.length;J++){var G=document.getElementById("extFont_"+y[J].name);null!=G&&G.parentNode.removeChild(G)}l.extFonts=[];for(J=0;null!=this.previousExtFonts&&J<this.previousExtFonts.length;J++)this.ui.editor.graph.addExtFont(this.previousExtFonts[J].name,
this.previousExtFonts[J].url);this.previousExtFonts=y};this.put("fontFamily",new Menu(mxUtils.bind(this,function(l,y){for(var J=mxUtils.bind(this,function(O,W,X,Z,Y){var ba=c.editor.graph;Z=this.styleChange(l,Z||O,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],null,y,function(){"1"!=urlParams["ext-fonts"]?ba.setFont(O,W):(document.execCommand("fontname",!1,O),
ba.addExtFont(O,W));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],"cells",[ba.cellEditor.getEditingCell()]))},function(){ba.updateLabelElements(ba.getSelectionCells(),function(fa){fa.removeAttribute("face");fa.style.fontFamily=null;"PRE"==fa.nodeName&&ba.replaceElement(fa,"div")});"1"==urlParams["ext-fonts"]&&
ba.addExtFont(O,W)});X&&(X=document.createElement("span"),X.className="geSprite geSprite-delete",X.style.cursor="pointer",X.style.display="inline-block",Z.firstChild.nextSibling.nextSibling.appendChild(X),mxEvent.addListener(X,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(fa){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[O.toLowerCase()];for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==O&&this.customFonts[aa].url==W){this.customFonts.splice(aa,
1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var da=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=da&&0<da.length)for(aa=0;aa<da.length;aa++)if(da[aa].name==O){da.splice(aa,1);break}var ra=mxUtils.clone(this.customFonts);for(aa=0;aa<ra.length;aa++)if(ra[aa].name==O){ra.splice(aa,1);break}aa=new f(this.editorUi,da,ra);this.editorUi.editor.graph.model.execute(aa)}this.editorUi.hideCurrentMenu();mxEvent.consume(fa)})));Graph.addFont(O,W);Z.firstChild.nextSibling.style.fontFamily=
O;null!=Y&&Z.setAttribute("title",Y)}),G={},P=0;P<this.defaultFonts.length;P++){var p=this.defaultFonts[P];"string"===typeof p?J(p):null!=p.fontFamily&&null!=p.fontUrl&&(G[encodeURIComponent(p.fontFamily)+"@"+encodeURIComponent(p.fontUrl)]=!0,J(p.fontFamily,p.fontUrl))}l.addSeparator(y);if("1"!=urlParams["ext-fonts"]){p=function(O){var W=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!G[W]){for(var X=O.name,Z=0;null!=I[X.toLowerCase()];)X=O.name+" ("+ ++Z+")";null==z[W]&&
(Q.push({name:O.name,url:O.url,label:X,title:O.url}),I[X.toLowerCase()]=O,z[W]=O)}};var z={},I={},Q=[];for(P=0;P<this.customFonts.length;P++)p(this.customFonts[P]);for(var N in Graph.recentCustomFonts)p(Graph.recentCustomFonts[N]);Q.sort(function(O,W){return O.label<W.label?-1:O.label>W.label?1:0});if(0<Q.length){for(P=0;P<Q.length;P++)J(Q[P].name,Q[P].url,!0,Q[P].label,Q[P].url);l.addSeparator(y)}l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=
[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);l.addSeparator(y)}else{N=this.editorUi.editor.graph.extFonts;if(null!=N&&0<N.length){p={};var T=!1;for(P=0;P<this.customFonts.length;P++)p[this.customFonts[P].name]=!0;for(P=0;P<N.length;P++)p[N[P].name]||(this.customFonts.push(N[P]),T=!0);T&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(P=0;P<this.customFonts.length;P++)N=this.customFonts[P].name,p=this.customFonts[P].url,
J(N,p,!0),this.editorUi.editor.graph.addExtFont(N,p,!0);l.addSeparator(y);l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var O=new f(this.editorUi,[],[]);c.editor.graph.model.execute(O)}),y);l.addSeparator(y)}}l.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,W=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],X="s",Z=null;if("1"!=urlParams["ext-fonts"]&&O.isEditing()){var Y=O.getSelectedEditingElement();
null!=Y&&(Y=mxUtils.getCurrentStyle(Y),null!=Y&&(W=Graph.stripQuotes(Y.fontFamily),Z=Graph.getFontUrl(W,null),null!=Z&&(Graph.isGoogleFontUrl(Z)?(Z=null,X="g"):X="w")))}else Y=O.getView().getState(O.getSelectionCell()),null!=Y&&(W=Y.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(Y=Y.style.fontSource,null!=Y&&(Y=decodeURIComponent(Y),Graph.isGoogleFontUrl(Y)?X="g":(X="w",Z=Y))):(X=Y.style.FType||X,"w"==X&&(Z=this.editorUi.editor.graph.extFonts,Y=null,null!=Z&&(Y=Z.find(function(fa){return fa.name==
W})),Z=null!=Y?Y.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=Z&&Z.substring(0,PROXY_URL.length)==PROXY_URL&&(Z=decodeURIComponent(Z.substr((PROXY_URL+"?url=").length)));var ba=null;document.activeElement==O.cellEditor.textarea&&(ba=O.cellEditor.saveSelection());X=new FontDialog(this.editorUi,W,Z,X,mxUtils.bind(this,function(fa,aa,da){null!=ba&&(O.cellEditor.restoreSelection(ba),ba=null);if(null!=fa&&0<fa.length)if("1"!=urlParams["ext-fonts"]&&O.isEditing())O.setFont(fa,aa);else{O.getModel().beginUpdate();
try{O.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),O.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),O.setCellStyles("FType",null)):(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),"s"!=da&&(O.setCellStyles("FType",da),0==aa.indexOf("http://")&&(aa=PROXY_URL+"?url="+encodeURIComponent(aa)),this.editorUi.editor.graph.addExtFont(fa,aa)));da=!0;for(var ra=0;ra<this.customFonts.length;ra++)if(this.customFonts[ra].name==fa){da=!1;break}da&&
(this.customFonts.push({name:fa,url:aa}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(X.container,380,Editor.enableWebFonts?250:180,!0,!0);X.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.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";u!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,v){u=v.getProperty("edit").changes;for(v=0;v<u.length;v++)if(u[v]instanceof RenamePage||u[v]instanceof ChangePage||u[v]instanceof mxRootChange){this.updateTabContainer();
			}), null, null, 360, 140, null, mxUtils.bind(this, function()
				var scrollState = this.saveScrollState();
	/**
	 * Saves scroll position
	 */
	EditorUi.prototype.saveScrollState = function()
	{
		var t = this.editor.graph.view.translate;
		var x = this.diagramContainer.scrollLeft;
		var y = this.diagramContainer.scrollTop;

		if (this.embedViewport != null)
		{
			if (!Editor.inlineFullscreen)
			{
				x += this.embedViewport.x;
				y += this.embedViewport.y;
			}
			else
			{
				x -= this.embedViewport.x;
				y -= this.embedViewport.y;
			}
		}

		return {x: x, y: y, tx: t.x, ty: t.y};
	};
   
	/**
	 * Dynamic change of dark mode.
	 */
	EditorUi.prototype.restoreScrollState = function(state)
	{
		var s = this.editor.graph.view.scale;
		var t = this.editor.graph.view.translate;
		
		this.diagramContainer.scrollLeft = state.x + (t.x - state.tx) * s;
		this.diagramContainer.scrollTop = state.y + (t.y - state.ty) * s;
	};

		editorUi.actions.put('about', new Action('v' + EditorUi.VERSION, function(arg1, evt)
			// do nothing
					changes[i] instanceof ChangePage ||
                    //console.log('layers', layers);
                function addEdgeSublabel(graph, edge, edgeShape, rotation, lblOffset)
                {
                    var label = edgeShape.createLabelSubShape(graph, edge);

                    if (label != null)
                    {
                        if (rotation !== 0) 
                        {
                            var lblRot = label.getStyle().match(/;rotation=(\d+\.*\d+)/);
                            
                            if (lblRot != null)
                            {
                                rotation += parseFloat(lblRot[1]);
                            }

                            label.setStyle(label.getStyle().replace(/;rotation=(\d+\.*\d+)/, '') + ";rotation=" + (rotation > 60 && rotation < 240 ? (rotation + 180) % 360 : rotation));
                        }

                        var geo = label.getGeometry();
                        geo.x = (0);
                        geo.y = (0);
                        geo.relative = (true);
                        lblOffset = lblOffset || new mxPoint(0, 0);
                        geo.offset = (new mxPoint(lblOffset.x - geo.width / 2, lblOffset.y - geo.height / 2));
                    }
                };

                    var textLabel = "";
                    var hasSubLabel = edgeShape.isDisplacedLabel() || edgeShape.isRotatedLabel() || rotation !== 0;
                    var lblOffset = edgeShape.getLblEdgeOffset(graph.getView(), points);

                    if (!hasSubLabel) 
                    {
                        textLabel = edgeShape.getTextLabel(true);

                    edge = graph.insertEdge(parent, null, textLabel, source, target, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                    
                    if (hasSubLabel) 
                    {
                        addEdgeSublabel(graph, edge, edgeShape, rotation, lblOffset);
                    else
                    {
                        edge.getGeometry().offset = lblOffset;
                    }

                    //add entry/exit points when edge, src, and trg are not rotated
                    if (fromConstraint != null)
                    {
                        graph.setConnectionConstraint(edge, source, true,
                                new mxConnectionConstraint(fromConstraint, false));
                    }
                    
                    if (removeFirstPt)
                    {
                        points.shift();
                    }
                    
                    if (toConstraint != null)
                    {
                        graph.setConnectionConstraint(edge, target, false,
                                new mxConnectionConstraint(toConstraint, false));
                    }
                    
                    if (removeLastPt)
                    {
                        points.pop();
                    }
                    
                    var textLabel = "";
                    var hasSubLabel = edgeShape.isDisplacedLabel() || edgeShape.isRotatedLabel() || rotation !== 0;
                    var lblOffset = edgeShape.getLblEdgeOffset(graph.getView(), points);
                    
                    if (!hasSubLabel) 
                    {
                        textLabel = edgeShape.getTextLabel(true);
                    }

                    if (edgeShape.getShapeIndex() === 0) {
                        edge = graph.insertEdge(parent, null, textLabel, null, null, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                        edge = graph.createEdge(parent, null, textLabel, null, null, com.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(styleMap, "="));
                        edge = graph.addEdge(edge, parent, null, null, edgeShape.getShapeIndex() + this.shapeIndexShift++);
                    }

                    if (hasSubLabel) 
                    {
                        addEdgeSublabel(graph, edge, edgeShape, rotation, lblOffset);
                    else
                    {
                        edge.getGeometry().offset = lblOffset;
                    }

		var cssTxt = 'margin: 0;padding: 0;background-image: ' + gridImage + ';background-position: ' + position
						+ ';background-color: ' + document.body.style.backgroundColor;
				preview.backgroundColor = gridColor? 'transparent' : bg;
(function(){function g(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var t=F[D];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[u]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:
""}if("Liberation Sans"!=u)return lb="fontFamily="+u+";","font-family: "+u+";"}}catch(t){}return""}function z(u){return Math.round(10*u)/10}function B(u,F,D){function t(la,Ma){var ya="",za=la.t,Qb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Qb.v)null==za&&(Na&&(ya+=O(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=O(!0));Na=za.v;Ka=Qb.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(Qb.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 ea=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=
Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(ea=Va.v),Va=aa[++Ma]}catch(Gb){console.log(Gb)}ea=T(ea);null!=ea&&(ea=ea.substring(0,7),ya+="color:"+ea+";");xb&&(ya+="font-size:"+z(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=ea=la.a?la.a.v:D.TextAlign||"center","left"==ea?xb="flex-start":"right"==ea&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+ea+"; 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="'+p(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=T(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 O(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 Qb=Ba.pop();la+="</"+Qb+">"}while(za&&0<Ba.length);return la}var q={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 q[la.n]});for(var U=[0],wa=0;0<(wa=u.indexOf("\n",wa));)wa++,U.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>U[wa])F.splice(ja,0,{s:U[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==U[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=U[wa]&&F.push({s:U[wa],n:"a",v:D.TextAlign||
"center"});U="";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=u.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},U+=r(u,La,Ia,!0),l=La=Ia,U+=O());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:u.length;U+=t(ma,na);ua&&(U+=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&&(U+=e(na)+r(u,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];U+=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);U+=r(u,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}U+=r(null,null,null,!0);ua&&(l!=Ia&&(U+=e({dummy:1})+r(u,l,Ia)),U+=O(!0));return U}function m(u,F){G=!1;var D=null!=u.Text&&u.Text.t?u.Text:null!=u.Value&&u.Value.t?u.Value:
null!=u.Lane_0&&u.Lane_0.t?u.Lane_0:null;null==D&&null!=u.State?u.State.t&&(D=u.State):null==D&&null!=u.Note?u.Note.t&&(D=u.Note):null==D&&null!=u.Title?u.Title.t&&(D=u.Title):u.t&&(D=u);null==D&&null!=u.TextAreas?null!=u.TextAreas.Text&&null!=u.TextAreas.Text.Value&&u.TextAreas.Text.Value.t&&(D=u.TextAreas.Text.Value):null==D&&null!=u.t0&&u.t0.t&&(D=u.t0);if(null!=D){if(null!=D.t){var t=D.t;t=t.replace(/\u2028/g,"\n");D=D.m;try{/   /.test(t)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<
D[e].s||null!=D[e].e&&D[e].e<t.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(t,D,u)}catch(O){console.log(O)}t=t.replace(/</g,"&lt;");return t=t.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(u){return null!=u.Action?u.Action:u}function c(u){if(null!=u.Text){if(null!=u.Text.m)return u.Text.m}else if(null!=u.TextAreas){if(null!=u.TextAreas.Text&&
null!=u.TextAreas.Text.Value&&null!=u.TextAreas.Text.Value.m)return u.TextAreas.Text.Value.m}else{if(null!=u.m)return u.m;if(null!=u.Title){if(null!=u.Title.m)return u.Title.m}else if(null!=u.State){if(null!=u.State.m)return u.State.m}else if(null!=u.Note&&null!=u.Note.m)return u.Note.m}return null}function a(u,F){u="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(u)+k(u)+n(u)+x(u)+C(u)+J(u)+M(u)+K(u)+P(u))+R(u)+H(u)+Zb(mxConstants.STYLE_ALIGN,u.TextAlign,"center");lb=
"";return u}function b(u,F,D,t,e,O){O=null==O?!1:O;var r="",q=!1,Z=!1;if(null!=u)if(O){O=u.split(";");u="";for(var aa=0;aa<O.length;aa++)"fillColor=none"==O[aa]?Z=!0:"strokeColor=none"==O[aa]?q=!0:""!=O[aa]&&(u+=O[aa]+";")}else""!=u&&";"!=u.charAt(u.length-1)&&(r=";");r+=(Xc(u,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(u,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(u,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,u,F,D,t)+d(mxConstants.STYLE_FONTFAMILY,u,F,D,t)+d(mxConstants.STYLE_FONTCOLOR,
u,F,D,t)+d(mxConstants.STYLE_FONTSTYLE,u,F,D,t)+d(mxConstants.STYLE_ALIGN,u,F,D,t)+d(mxConstants.STYLE_SPACING_LEFT,u,F,D,t)+d(mxConstants.STYLE_SPACING_RIGHT,u,F,D,t)+d(mxConstants.STYLE_SPACING_TOP,u,F,D,t)+d(mxConstants.STYLE_SPACING_BOTTOM,u,F,D,t))+d(mxConstants.STYLE_ALIGN+"Global",u,F,D,t)+d(mxConstants.STYLE_SPACING,u,F,D,t)+d(mxConstants.STYLE_VERTICAL_ALIGN,u,F,D,t)+d(mxConstants.STYLE_STROKECOLOR,u,F,D,t)+d(mxConstants.STYLE_OPACITY,u,F,D,t)+d(mxConstants.STYLE_ROUNDED,u,F,D,t)+d(mxConstants.STYLE_ROTATION,
u,F,D,t)+d(mxConstants.STYLE_FLIPH,u,F,D,t)+d(mxConstants.STYLE_FLIPV,u,F,D,t)+d(mxConstants.STYLE_SHADOW,u,F,D,t)+d(mxConstants.STYLE_FILLCOLOR,u,F,D,t)+d(mxConstants.STYLE_DASHED,u,F,D,t)+d(mxConstants.STYLE_STROKEWIDTH,u,F,D,t)+d(mxConstants.STYLE_IMAGE,u,F,D,t)+d(mxConstants.STYLE_POINTER_EVENTS,u,F,D,t);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");q&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(u,F,D,t,e){if(!Xc(F,u))switch(u){case mxConstants.STYLE_FONTSIZE:return f(D);
case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return n(D);case mxConstants.STYLE_FONTSTYLE:return x(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 J(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return P(D);case mxConstants.STYLE_SPACING:return R(D);
case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return I(D,t);case mxConstants.STYLE_OPACITY:return Q(D,t,e);case mxConstants.STYLE_ROUNDED:return u=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",u;case mxConstants.STYLE_ROTATION:return ha(D,t,e);case mxConstants.STYLE_FLIPH:return u=D.FlipX?"flipH=1;":"",u;case mxConstants.STYLE_FLIPV:return u=D.FlipY?"flipV=1;":"",u;case mxConstants.STYLE_SHADOW:return V(D);
case mxConstants.STYLE_FILLCOLOR:return ca(D,t);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,t);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(u){var F=c(u);if(null!=F)for(var D=
0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var t=F[D].v;break}!t&&u.Font&&(t=u.Font);y(t);return lb}function p(u){return"ext"==u.tp?u.url:"ml"==u.tp?"mailto:"+u.eml:"pg"==u.tp?"data:page/id,"+(LucidImporter.pageIdsMap[u.id]||0):"c"==u.tp?"data:confluence/id,"+u.ccid:null}function n(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("c"==D.n&&null!=D.v)return u=T(D.v).substring(0,7),"#000000"==u&&(u="default"),mxConstants.STYLE_FONTCOLOR+"="+u+";";F++}return""}function x(u){return A(c(u))}function A(u){if(null!=
u){var F=0,D=!1;if(null!=u)for(var t=0;!D&&t<u.length;){var e=u[t];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);t++}D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),t++;D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),t++;if(0<F)return"fontStyle="+F+";"}return""}function C(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function J(u){u=
c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function P(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+
z(.75*D.v)+";";F++}return""}function R(u){return"number"===typeof u.InsetMargin?"spacing="+Math.max(0,z(.75*u.InsetMargin))+";":""}function H(u){return null!=u.Text_VAlign&&"string"===typeof u.Text_VAlign?"verticalAlign="+u.Text_VAlign+";":null!=u.Title_VAlign&&"string"===typeof u.Title_VAlign?"verticalAlign="+u.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,u.TextVAlign,"middle")}function I(u,F){return 0==u.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,W(u.LineColor),
"#000000")}function L(u){return null!=u?mxConstants.STYLE_FILLCOLOR+"="+W(u)+";":""}function N(u){return null!=u?"swimlaneFillColor="+W(u)+";":""}function Q(u,F,D){F="";if("string"===typeof u.LineColor&&(u.LineColor=T(u.LineColor),7<u.LineColor.length)){var t="0x"+u.LineColor.substring(u.LineColor.length-2,u.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(t)/2.55)+";")}"string"===typeof u.FillColor&&(u.FillColor=T(u.FillColor),7<u.FillColor.length&&(u=
"0x"+u.FillColor.substring(u.FillColor.length-2,u.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(u)/2.55)+";")));return F}function ha(u,F,D){var t="";if(null!=u.Rotation){u=mxUtils.toDegree(parseFloat(u.Rotation));var e=!0;0!=u&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==u||270==u)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(u+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
F.Class)?(u-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(u+=180);0!=u&&(t+="rotation="+u+";");e||(t+="horizontal=0;")}return t}function V(u){return null!=u.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function T(u){if(u){if("object"===typeof u)try{u=u.cs[0].c}catch(F){console.log(F),u="#ffffff"}"rgb"==u.substring(0,3)?u="#"+u.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=u.charAt(0)&&(u="#"+u)}return u}function W(u){return(u=T(u))?
u.substring(0,7):null}function oa(u,F){return(u=T(u))&&7<u.length?F+"="+Math.round(parseInt("0x"+u.substr(7))/2.55)+";":""}function ca(u,F){if(null!=u.FillColor)if("object"===typeof u.FillColor){if(null!=u.FillColor.cs&&1<u.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,W(u.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,W(u.FillColor.cs[1].c))}else return"string"===typeof u.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,W(u.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
"dashed32"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=u.StrokeStyle&&"dashed"==u.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(u){return null!=u.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(u.LineWidth)),"1"):""}function Fa(u,F,D){var t="";u.FillColor&&u.FillColor.url?(D=u.FillColor.url,"fill"==u.FillColor.pos&&(t="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=u.URL:"UserImage2Block"==
F.Class&&null!=u.ImageFillProps&&null!=u.ImageFillProps.url&&(D=u.ImageFillProps.url);return null!=D?"image="+g(D)+";"+t:""}function ka(u,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(u,"link",p(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(u,"Notes",F.NoteHint.t);var t=[],e=D.convertValueToString(u),O=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var q=match[0];O=!0;if(2<q.length){var Z=q.substring(2,q.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":
match.index+q.length}}O&&(t.push(e.substring(r)),D.setAttributeForCell(u,"label",t.join("")),D.setAttributeForCell(u,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var U=F[aa],wa=mxUtils.trim(U.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(u,wa,U.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(u,F,D,t){for(var e=F,O=0;null!=t.getAttributeForCell(u,e);)O++,e=F+"_"+O;t.setAttributeForCell(u,
e,null!=D?D:"")}function yb(u,F,D,t,e,O){var r=h(F);if(null!=r){var q=Od[r.Class];null!=q?(u.style+=q,";"!=u.style.charAt(u.style.length-1)&&(u.style+=";")):u.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);q=null!=r.Properties?r.Properties:r;if(null!=q&&(u.value=O?"":m(q),u.style+=b(u.style,q,r,u,G,!0),u.style.includes("strokeColor")||(u.style+=I(q,r)),ka(u,q,D),q.Title&&q.Title.t&&q.Text&&q.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=u.geometry,D=new mxCell(m(q.Title),
new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,u.insert(D),D.style+=a(q.Title,G)),u.edge)){u.style=null!=q.Rounding&&"diagonal"!=q.Shape?u.style+("rounded=1;arcSize="+q.Rounding+";"):u.style+"rounded=0;";if(D="curve"==q.Shape)u.style+="curved=1;";else if("diagonal"!=q.Shape)if(null!=q.ElbowPoints&&0<q.ElbowPoints.length)for(u.geometry.points=[],r=0;r<q.ElbowPoints.length;r++)u.geometry.points.push(new mxPoint(Math.round(.75*q.ElbowPoints[r].x+wc),Math.round(.75*
q.ElbowPoints[r].y+xc)));else if("elbow"==q.Shape||null!=q.Endpoint1.Block&&null!=q.Endpoint2.Block)u.style+="edgeStyle=orthogonalEdgeStyle;";if(q.LineJumps||LucidImporter.globalProps.LineJumps)u.style+="jumpStyle=arc;";null!=q.Endpoint1.Style&&(O=Ee[q.Endpoint1.Style],null!=O?(O=O.replace(/xyz/g,"start"),u.style+="startArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint1.Style)));null!=q.Endpoint2.Style&&(O=Ee[q.Endpoint2.Style],null!=
O?(O=O.replace(/xyz/g,"end"),u.style+="endArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint2.Style)));O=null!=q.ElbowControlPoints&&0<q.ElbowControlPoints.length?q.ElbowControlPoints:q.Joints;if(D&&null!=q.BezierJoints&&0<q.BezierJoints.length){O=[];D=q.BezierJoints[q.BezierJoints.length-1];D.p.x=q.Endpoint2.x;D.p.y=q.Endpoint2.y;for(r=0;r<q.BezierJoints.length;r++)D=q.BezierJoints[r],O.push({x:D.p.x+D.nt.x*D.lcps*.75,y:D.p.y+D.nt.y*
D.lcps*.75}),O.push({x:D.p.x+D.nt.x*D.rcps*.75,y:D.p.y+D.nt.y*D.rcps*.75});O=O.slice(1,O.length-1)}else D&&(O=[],O.push({x:q.Endpoint1.x+(.1>q.Endpoint1.LinkX?-250:.9<q.Endpoint1.LinkX?250:0),y:q.Endpoint1.y+(.1>q.Endpoint1.LinkY?-250:.9<q.Endpoint1.LinkY?250:0)}),O.push({x:q.Endpoint2.x+(.1>q.Endpoint2.LinkX?-250:.9<q.Endpoint2.LinkX?250:0),y:q.Endpoint2.y+(.1>q.Endpoint2.LinkY?-250:.9<q.Endpoint2.LinkY?250:0)}));if(null!=O)for(u.geometry.points=[],r=0;r<O.length;r++)D=O[r].p?O[r].p:O[r],u.geometry.points.push(new mxPoint(Math.round(.75*
D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==u.geometry.points||0==u.geometry.points.length)&&null!=q.Endpoint1.Block&&q.Endpoint1.Block==q.Endpoint2.Block&&null!=t&&null!=e){D=new mxPoint(Math.round(t.geometry.x+t.geometry.width*q.Endpoint1.LinkX),Math.round(t.geometry.y+t.geometry.height*q.Endpoint1.LinkY));O=new mxPoint(Math.round(e.geometry.x+e.geometry.width*q.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*q.Endpoint2.LinkY));wc=D.x==O.x?Math.abs(D.x-t.geometry.x)<t.geometry.width/
2?-20:20:0;xc=D.y==O.y?Math.abs(D.y-t.geometry.y)<t.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(O.x+wc,O.y+xc);Z.generated=!0;aa.generated=!0;u.geometry.points=[Z,aa];D=D.x==O.x}null!=t&&t.geometry.isRotated||(Z=Fe(u,q.Endpoint1,!0,D,null,t));null!=t&&null!=Z&&(null==t.stylePoints&&(t.stylePoints=[]),t.stylePoints.push(Z),LucidImporter.stylePointsSet.add(t));null!=e&&e.geometry.isRotated||(aa=Fe(u,q.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&&(u.style+=";lucidId="+F.id+";");u.lucidchartObject=F}function vb(u,F){var D=h(u).Properties,t=D.BoundingBox;null==u.Class||"AWS"!==u.Class.substring(0,3)&&"Amazon"!==u.Class.substring(0,6)||u.Class.includes("AWS19")||(t.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*t.x+wc),Math.round(.75*t.y+xc),Math.round(.75*t.w),Math.round(.75*t.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;yb(v,u,F);
v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(u,F,D,t){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;yb(e,u,F,D,t,!0);var O=h(u).Properties,r=null!=O?O.TextAreas:u.TextAreas;if(null!=r){for(var q=0;void 0!==r["t"+q];){var Z=r["t"+q];null!=Z&&(e=Pd(Z,e,u,D,t,F));q++}for(q=0;void 0!==r["m"+q]||1>q;)Z=r["m"+q],null!=Z&&(e=Pd(Z,e,u,D,t,F)),q++;null!=r.Text&&(e=Pd(r.Text,e,u,D,t,F));r=null!=O?O.TextAreas:u.TextAreas;null!=
r.Message&&(e=Pd(r.Message,e,u,D,t,F))}u.Hidden&&(e.visible=!1);return e}function Pd(u,F,D,t,e,O){var r=2*(parseFloat(u.Location)-.5);isNaN(r)&&null!=u.Text&&null!=u.Text.Location&&(r=2*(parseFloat(u.Text.Location)-.5));O=m(u);var q=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var U="13",wa="";if(null!=u&&null!=u.Value&&null!=u.Value.m){wa=A(u.Value.m);for(var ja=0;ja<u.Value.m.length;ja++)if("s"==u.Value.m[ja].n&&u.Value.m[ja].v)U=z(.75*parseFloat(u.Value.m[ja].v));
else if("c"==u.Value.m[ja].n){var na=T(u.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="+U+";"}q=new q(O,r,Z+aa);q.geometry.relative=!0;q.vertex=!0;if(u.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=t&&null!=e){var ra=t.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(O.replace(/\n/g,"<br>"));q.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*u.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*u.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}q.lucidchartObject=u;F.insert(q);return F}function Zb(u,F,D,t){null!=F&&null!=t&&(F=t(F));return null!=F&&F!=D?u+"="+F+";":
""}function Fe(u,F,D,t,e,O){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!=O&&O.style&&-1<O.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=O&&O.style&&-1<O.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),u.style+=(t?"":(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(u,F,D,t,e){try{var O=function(ma,
Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)O(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,q=Math.min(q,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),U=Math.max(U,(ma.y+(ma.height?ma.height:0))*Ba)};null!=u.Action&&null!=u.Action.Properties&&(u=u.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=u.ZOrder;var q=Infinity,Z=Infinity,aa=-Infinity,U=-Infinity,wa=u.Members;e=[];for(var ja in wa){var na=
F[ja];null!=na?e.push(na):null!=t[ja]&&(e.push(t[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)O(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;O(ra.Endpoint1,!0);O(ra.Endpoint2,!0);O(ra.ElbowPoints,!0);O(ra.ElbowControlPoints,!0);O(ra.BezierJoints,!0);O(ra.Joints,!0)}r.geometry.x=q;r.geometry.y=Z;
r.geometry.width=aa-q;r.geometry.height=U-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=q;Aa.y-=Z}u.IsState?(r.lucidLayerInfo={name:u.Name,visible:!u.Hidden,locked:u.Restrictions.b&&u.Restrictions.p&&u.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):u.Hidden&&(r.visible=!1);r.lucidchartObject=u;return r}catch(ma){console.log(ma)}}function zf(u,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;u.getModel().beginUpdate();
try{var t=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?O[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?O[ua.Endpoint2.Block]:null,l=yf(Ca,u,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(u.addCell(l,Ca,null,Ka,La))},e=[],O={},r={},q={},Z=[];null!=F.Lines&&(q=F.Lines);if(null!=
F.Blocks){Object.assign(q,F.Blocks);for(var aa in F.Blocks){var U=F.Blocks[aa];U.id=aa;var wa=!1;null!=Od[U.Class]&&"mxCompositeShape"==Od[U.Class]&&(O[U.id]=Ie(U,e,u),Z.push(U),wa=!0);wa||(O[U.id]=vb(U,u),Z.push(U))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,u,O)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)U=F.Objects[ja],q[U.id]=U,null!=U.Action&&"mxCompositeShape"==
Od[U.Action.Class]?O[U.id]=Ie(U,e,u):U.IsBlock&&null!=U.Action&&null!=U.Action.Properties?O[U.id]=vb(U,u):U.IsGenerator&&U.GeneratorData&&U.GeneratorData.p&&("OrgChart2018"==U.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(U.GeneratorData.id,U.GeneratorData.p,U.GeneratorData.gs,u,O)):LucidImporter.hasUnknownShapes=!0),Z.push(U);for(ja=0;ja<F.Objects.length;ja++)if(U=F.Objects[ja],U.IsGroup){var na=He(U,O,r,q,u);na&&(O[U.id]=na,Z.push(U))}}if(null!=F.Groups)try{for(aa in F.Groups)if(U=
F.Groups[aa],U.id=aa,na=He(U,O,r,q,u))O[U.id]=na,Z.push(U)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)U=F.Lines[aa],U.id=aa,Z.push(U);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++){U=Z[ja];var ra=O[U.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;u.addCell(Aa,u.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
Pa),Cf(u,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),u),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||u.setSelectionCells(e)}finally{u.getModel().endUpdate()}}function Cf(u,F){if(u.model.contains(F)&&F.edge){var D=u.view.getState(F);if(null!=D&&null!=F.children){var t=mxRectangle.fromRectangle(D.paintBounds);t.grow(5);for(var e=0;e<F.children.length;e++){var O=u.view.getState(F.children[e]);
null==O||mxUtils.contains(t,O.paintBounds.x,O.paintBounds.y)||(O.cell.geometry.offset=new mxPoint(0,0))}}u=F.lucidchartObject;null!=u&&"elbow"==u.Shape&&null==u.ElbowControlPoints&&null==u.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(u,F){if(u.model.contains(F)&&null!=F.style&&""!=F.style){u=F.style.split(";");for(var D={},t=[],e=u.length-1;0<=e;e--){var O=u[e].split("=");if(2!=O.length||null==D[O[0]])D[O[0]]=O[1],""!=u[e]&&t.push(u[e])}F.style=t.reverse().join(";")+";"}}function Af(u,F){if(u.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,t=0;t<F.children.length;t++)if(F.children[t].vertex){var e=
F.children[t].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[t]}}F=D;if(null!=F&&(D=F.parent,""==u.convertValueToString(D))){if(null!=F.edges)for(t=0;t<F.edges.length;t++)F.edges[t].source==F&&F.edges[t].setTerminal(F.parent,!0),F.edges[t].target==F&&F.edges[t].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),t=0;t<e.length;t++)D.insert(e[t]);u.cellLabelChanged(D,u.convertValueToString(F));
D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var u=new Graph;u.setExtendParents(!1);u.setExtendParentsOnAdd(!1);u.setConstrainChildren(!1);u.setHtmlLabels(!0);u.getModel().maintainEdgeParent=!1;return u}function Qd(u,F,D,t,e,O,r,q){this.nurbsValues=[1,3,0,0,100*(u+D),100-100*(1-(F+t)),0,1,100*(e+r),100-100*(1-(O+q)),0,1]}function Ke(u,F){try{for(var D=[],t=F.BoundingBox.w,e=F.BoundingBox.h,O=0;O<F.Shapes.length;O++){var r=
F.Shapes[O],q=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,U=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=U[Aa.p1].x,Ba=U[Aa.p1].y;ma=100*ma/t;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=U[Aa.p2].x,Ca=U[Aa.p2].y,ua=t,Na=e,Ka=new Qd(U[Aa.p1].x/t,U[Aa.p1].y/e,Aa.n1.x/t,Aa.n1.y/e,U[Aa.p2].x/t,U[Aa.p2].y/
Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=U[Aa.p2].x,Ba=U[Aa.p2].y,ma=100*ma/t,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:q,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[u]={text:F.Text,w:t,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(u,F,D,t,e,O,r,q){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;r.insert(u);O=[u];D=D.clone();q.insertEdge(D,!1);u.insertEdge(D,!0);O.push(D);t.push(e.addCell(D,null,null,null,null))}function fb(u,F,D,t,e,O,r,q,Z){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;Z.insert(u);D=new mxCell("",new mxGeometry(D,t,0,0),"strokeColor=none;fillColor=none;");
D.vertex=!0;Z.insert(D);q=[D];e=e.clone();u.insertEdge(e,!0);D.insertEdge(e,!1);q.push(e);O.push(r.addCell(e,null,null,null,null))}function Sa(u,F,D,t,e,O){t.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";t.style+=b(t.style,e,O,t);F=m(e);t.vertex=!0;u=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+u+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
u.style+=b(u.style,e,O,u,G);u.geometry.relative=!0;u.geometry.offset=new mxPoint(5,-12);u.vertex=!0;t.insert(u)}function Wa(u,F,D,t,e,O,r,q){e="transparent"!=u?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";O.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";O.style+=b(O.style,r,q,O);O.value=m(r);O.vertex=!0;u=new mxCell(null,new mxGeometry(.5,0,.7*t*F,.7*t*D),e+u+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
u.geometry.relative=!0;u.geometry.offset=new mxPoint(-F*t*.35,10+(1-D)*t*.35);u.vertex=!0;u.style+=b(u.style,r,q,u,G);O.insert(u)}function Xc(u,F){return null!=u&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),u.includes(";"+F+"=")||u.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(u,F){function D(t){t=Math.round(parseInt("0x"+t)*F).toString(16);return 1==t.length?"0"+t:t}return"#"+D(u.substr(1,2))+D(u.substr(3,2))+D(u.substr(5,2))}function Ie(u,F,D){var t=h(u),e=t.Properties,
O=e.BoundingBox,r=Math.round(.75*O.w),q=Math.round(.75*O.h),Z=Math.round(.75*O.x+wc),aa=Math.round(.75*O.y+xc);null==u.Class||"GCPInputDatabase"!==u.Class&&"GCPInputRecord"!==u.Class&&"GCPInputPayment"!==u.Class&&"GCPInputGateway"!==u.Class&&"GCPInputLocalCompute"!==u.Class&&"GCPInputBeacon"!==u.Class&&"GCPInputStorage"!==u.Class&&"GCPInputList"!==u.Class&&"GCPInputStream"!==u.Class&&"GCPInputMobileDevices"!==u.Class&&"GCPInputCircuitBoard"!==u.Class&&"GCPInputLive"!==u.Class&&"GCPInputUsers"!==u.Class&&
new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"");v.style+=b(v.style,e,t,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+n(e[ma])+k(e[ma])+x(e[ma])+C(e[ma],v)+J(e[ma])+M(e[ma])+K(e[ma])+P(e[ma]))+R(e[ma])+H(e[ma]));for(var ya=0,za=[],Qb="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;":""),ea=e.Rotation=0;ea<Ka;ea++){if(null==Ba){var xb=parseFloat(e.Lanes[ea].p);
l=parseInt(e.Lanes[ea].tid)||ea;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[ea]/r,l=ea,Va=Ba[ea];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,q-vc,r*xb):new mxGeometry(rc,vc,r*xb,q-vc),Qb));za[ea].vertex=!0;v.insert(za[ea]);za[ea].value=m(e[Va]);za[ea].style+=b(za[ea].style,e,t,za[ea],G)+(G?"fontSize=13;":f(e[Va])+n(e[Va])+x(e[Va])+C(e[Va],za[ea])+J(e[Va])+M(e[Va])+K(e[Va])+P(e[Va]))+R(e[Va])+H(e[Va])+L(e[Pa+l])+N(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
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(ea=0;ea<Gb;ea++){if(null==Lb){var Sd=.75*parseInt(e.Rows[ea].height);l=parseInt(e.Rows[ea].id)||ea;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[ea],Sb=Lb[ea];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,t,Hc,G)+(G?"fontSize=13;":f(e[Sb])+n(e[Sb])+x(e[Sb])+C(e[Sb],
Hc)+J(e[Sb])+M(e[Sb])+K(e[Sb])+P(e[Sb]))+R(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(ea=Z=0;ea<Rb;ea++){if(null==$b){var Yc=.75*parseInt(e.Columns[ea].width);l=parseInt(e.Columns[ea].id)||ea;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[ea],Tb=$b[ea];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,q),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,t,Ic,G)+(G?"fontSize=13;":
f(e[Tb])+n(e[Tb])+x(e[Tb])+C(e[Tb],Ic)+J(e[Tb])+M(e[Tb])+K(e[Tb])+P(e[Tb]))+R(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,t,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,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");var zb=
new mxCell("",new mxGeometry(0,25,r,q-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=b(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb)}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,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,he,r,q-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
zb.value=m(e.Text,!0);zb.style+=b(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ha(e,t,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*q),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
!0,v.insert($c))}v.style+=b(v.style,e,t,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,q-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");
ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,t,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");ib.vertex=
hd.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,t,v);break;case "AndroidListItems":var Cb=q,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Cb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Cb/=bc);var X=[];Qa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",
new mxGeometry(0,zc+l*Cb,r,Cb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Cb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,t,v);
new mxCell("",new mxGeometry(e.Selected*Hb+2,q-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,t,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,
0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,t,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=b(v.style,e,
t,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,t,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";
new mxGeometry(20,5,2,q-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,t,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,t,v);
break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,q-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,t,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*
r,.15*q,.7*r,.7*q),"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,t,v);break;case "AndroidCheckBox":var ie=
null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-q,r,.8*q),"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,t,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,t,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,t,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),
"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,t):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,t,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,t,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),
Math.round(.5*q)),"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*q)),"strokeColor=none;"+ca(e,t));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,t,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,t,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,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=b(v.style,e,t,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*q,.4*q,.4*q),"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,t,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*
r,.2*q,.3*q,.5*q),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,t,v);0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),"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])+n(e["Tab_"+l])+x(e["Tab_"+l])+C(e["Tab_"+l])+J(e["Tab_"+l])+M(e["Tab_"+l])+K(e["Tab_"+l])+P(e["Tab_"+l])+R(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*q),"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,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*q),"strokeColor=none;fillColor=none;");
.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",
"strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+n(e.text)+x(e.text))+H(e.text);v.style+=b(v.style,e,t,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=
!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+n(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);
var cb=new mxCell("",new mxGeometry(0,.4*q,r,.6*q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+n(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=
new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+n(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=
Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+n(e.text)+x(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=
b(v.style,e,t,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+n(e.subtext)+x(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+
lb:f(e.text)+k(e.text)+n(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
Da=new mxCell("",new mxGeometry(0,0,r,.4*q),"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)+n(e.text)+x(e.text);Db=new mxCell("",new mxGeometry(0,.6*q,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Db.vertex=!0;v.insert(Db);Db.value=m(e["bottom-text"]);Db.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+n(e["bottom-text"])+x(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)+n(e.text)+x(e.text);v.style+=b(v.style,e,t,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var w=new mxCell("",new mxGeometry(0,0,.9*r,.9*q),"rounded=1;arcSize=3;part=1;");w.vertex=!0;v.insert(w);w.style+=I(e,t)+ca(e,t)+Q(e,t,w)+V(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*q,.9*r,.9*
q),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=I(e,t)+ca(e,t)+Q(e,t,E)+V(e)+sa(e)+a(e,G);e.Future&&(w.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+=I(e,t)+ca(e,t)+Q(e,t,v)+V(e)+sa(e)+a(e,G);v.style+=b(v.style,e,t,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":w=
!0;v.insert(w);w.value=m(e.Text);w.style+=a(e,G);v.style+=b(v.style,e,t,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(0,.1*q,.9*r,.9*q),"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,t,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*q,q),"shape=curlyBracket;rounded=1;");
Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*q,0,.25*q,q),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*q,0,r-.5*q,q),"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,t,v);Bc.style+=Q(e,t,Bc);Cc.style+=Q(e,t,Cc);na.style+=n(e,na);Bc.style+=b(Bc.style,e,t,Bc);Cc.style+=b(Cc.style,e,t,Cc);na.style+=b(na.style,e,t,na,G);break;case "UMLTextBlock":v.value=
m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,t,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ha(e,t,v);e.Rotatio=null;var Vb=b(v.style,e,t,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,q),"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,t,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=ha(e,t,v);e.Rotatio=null;Vb=b(v.style,e,t,v,
w.geometry.offset=new mxPoint(4,5);break;case 7:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),w.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,t);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");w.style+=Rc+Y+"part=1;"}else w.style+=ca(e,t)+I(e,t)+"part=1;";w.geometry.relative=!0;w.vertex=!0;v.insert(w)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
0!=e.bpmnActivityMarker2&&Bd++;var Eb=0;1==Bd?Eb=-7.5:2==Bd&&(Eb=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",
new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}2==Bd&&(Eb=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,
-20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);
Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}v.style+=b(v.style,e,t,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+=
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,t,v,G);break;case "BPMNChoreography":try{var ia=W(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,t,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,t,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,t,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&&(w=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),w.geometry.offset=new mxPoint(-6,-17),w.style+=ca(e,t)+I(e,t),w.geometry.relative=!0,w.vertex=!0,v.insert(w));v.style+=b(v.style,e,t,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,t,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:w=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(-6,-15);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);break;case 2:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");w.geometry.offset=new mxPoint(3,
3);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);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:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),w.geometry.offset=new mxPoint(3,3),w.style+=I(e,t),w.geometry.relative=
!0,w.vertex=!0,v.insert(w),Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),w.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,t,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,q),"fillColor=#000000;strokeColor=none;opacity=30;");
w.vertex=!0;v.insert(w);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,.95*r,.95*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.05*q,.95*r,.95*q),"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,t,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,t,v,G);w=new mxCell("",new mxGeometry(0,0,.2*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Number);w.style+=a(e.Number,G);w.style+=b(w.style,e,t,w,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,t,v,!0);break;case "DefaultTableBlock":try{Gb=
"fillOpacity")||If;r=Cd[ea];var cf=q;Yc=r;for(var Nb=l+1;Nb<l+Xd.h;Nb++)if(null!=Vd[Nb]){cf+=Vd[Nb];Dd[Nb+","+ea]=!0;for(var Tc=ea+1;Tc<ea+Xd.w;Tc++)Dd[Nb+","+Tc]=!0}for(Nb=ea+1;Nb<ea+Xd.w;Nb++)if(null!=Cd[Nb])for(Yc+=Cd[Nb],Dd[l+","+Nb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Nb]=!0;var pa=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,W($e),
W(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;":""));pa.vertex=!0;pa.value=m(qc);pa.style+=b(pa.style,e,t,pa,G)+(G?"fontSize=13;":f(qc)+n(qc)+x(qc)+C(qc,pa)+J(qc)+M(qc)+K(qc)+P(qc))+R(qc)+H(qc);v.insert(pa);Z+=r}}aa+=q}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
"VSMDedicatedProcessBlock"==u.Class?v.value=m(e.Text):"VSMProductionControlBlock"==u.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,t,v,G);"VSMDedicatedProcessBlock"==u.Class&&(w=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(4,-13),w.vertex=!0,v.insert(w),w.style+=b(w.style,e,t,w));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,t,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*q,.8*r,.6*q),"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,t,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,t,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=b("part=1;",e,t,v);0<bc&&(Cb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),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,t,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,t,v);0<bc&&(Cb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"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,t,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.17*r,.2*q,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");w.vertex=!0;v.insert(w);
w.style+=b(w.style,e,t,w);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.1*q,.9*r,.8*q),"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,t,E);var S=new mxCell("",new mxGeometry(0,.2*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);S.vertex=!0;v.insert(S);S.value=m(e.Text);S.style+=b(S.style,e,t,S,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,q),"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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=
!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=
new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,
0),E.vertex=!0,v.insert(E)):e.AWS?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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,t,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,t,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,t,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,t,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");pa.vertex=!0;v.insert(pa);var Oa=[pa];pa.style+=ca(e,t);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,pa);sc(.855*r,.145*q,va,F,D,Oa,v,pa);sc(r,.5*q,va,F,D,Oa,v,pa);sc(.855*r,.855*q,va,F,D,Oa,v,pa);sc(.5*r,q,va,F,D,Oa,v,pa);sc(.145*r,.855*q,va,F,D,Oa,v,pa);sc(0,.5*q,va,F,D,Oa,v,pa);sc(.145*r,.145*q,va,F,D,Oa,v,pa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(0,.5*q-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");
pa.vertex=!0;v.insert(pa);Oa=[pa];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=[pa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,pa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,q,va,F,D,Oa,v,pa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,t,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,t,v,G);"EIMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==
new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==u.Class&&(w=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(-10,-7));w.geometry.relative=!0;w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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*q,.85*r,.25*q,va,F,D,Oa,v,pa);break;
case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.07*q,.21*r,.86*q),"fillColor=#FFFF33;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.26*r,.09*q,.2*r,.82*q),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);S=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
S.geometry.relative=!0;S.geometry.offset=new mxPoint(.4*-r,-10);S.vertex=!0;v.insert(S);S.style+=b(S.style,e,t,S);da=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;");da.geometry.relative=!0;da.edge=!0;w.insertEdge(da,!0);E.insertEdge(da,!1);da.style+=I(e,t);F.push(D.addCell(da,null,null,null,null));ba=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;");
ba.geometry.relative=!0;ba.edge=!0;E.insertEdge(ba,!0);S.insertEdge(ba,!1);F.push(D.addCell(ba,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,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Fd=
e.Messages,oe=(q-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(u.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,t,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;w.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,t,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,t,v,G);w=new mxCell("",new mxGeometry(.45*r,.25*q,.3*r,.5*q),"part=1;fillColor=#ffffff");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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*q,.4*r,.5*q,va,F,D,Oa,v,pa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);var 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(.05*r,.5*q,.85*r,.5*q,da,F,D,Oa,v,pa);var ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.85*
r,.15*q,ba,F,D,Oa,v,pa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*q,.85*r,.85*q,xa,F,D,Oa,v,pa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
da.geometry.relative=!0;da.edge=!0;da.style+=I(e,t);fb(.05*r,.5*q,.95*r,.5*q,da,F,D,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ba.geometry.relative=!0;ba.edge=!0;ba.style+=I(e,t);fb(.3*r,.1*q,.3*r,.5*q,ba,F,D,Oa,v,pa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
xa.geometry.relative=!0;xa.edge=!0;xa.style+=I(e,t);fb(.7*r,.1*q,.7*r,.5*q,xa,F,D,Oa,v,pa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=I(e,t);fb(.5*r,.5*q,.5*r,.9*q,Ya,F,D,Oa,v,pa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,
e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.21*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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(.45*r,.33*q,.8*r,.33*q,da,F,D,Oa,v,pa);E=new mxCell("",new mxGeometry(.64*r,.55*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,
e,t,E);ba=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;");ba.geometry.relative=!0;ba.edge=!0;fb(.55*r,.67*q,.2*r,.67*q,ba,F,D,Oa,v,pa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.1*r,.15*q,.8*r,.7*q),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");w.vertex=!0;v.insert(w);
w.style+=b(w.style,e,t,w);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.04*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.2*r,.56*q,.2*r,.32*q),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";w.style+=b(w.style,e,t,w);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;w.insertEdge(da,!1);E.insertEdge(da,!0);da.style+=b(da.style,e,t,da);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*q));da.geometry.points=Kc;F.push(D.addCell(da,null,null,null,null));S=new mxCell("",new mxGeometry(.6*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");S.vertex=!0;v.insert(S);S.style+=I(e,t)+sa(e);S.style+=b(S.style,e,t,S);ta=new mxCell("",new mxGeometry(.76*
r,.56*q,.2*r,.32*q),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=I(e,t)+Q(e,t,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,t,ta);ba=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;");ba.geometry.relative=!0;ba.edge=!0;S.insertEdge(ba,!1);ta.insertEdge(ba,!0);ba.style+=b(ba.style,e,t,ba);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*q));ba.geometry.points=
df;F.push(D.addCell(ba,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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,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,t,v,G);w=new mxCell("1",new mxGeometry(.2*r,.4*q,.1*r,.19*q),
"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("2",new mxGeometry(.45*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);S=new mxCell("3",new mxGeometry(.7*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");S.vertex=!0;v.insert(S);S.style+=b(S.style,e,t,S);da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
w.insertEdge(da,!1);E.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.375*r,aa+.15*q)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,t,da);F.push(D.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.geometry.points=[new mxPoint(Z+.675*r,aa+.15*q)];ba.geometry.relative=!0;ba.edge=!0;ba.style+=b(ba.style,e,t,ba);F.push(D.addCell(ba,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.3*r,.2*q,.4*r,.6*q),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.38*r,.42*q,.24*r,.16*q),"part=1;fillColor=#aefe7d;");
w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*q),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);S=new mxCell("",new mxGeometry(.76*r,.23*q,.24*r,.16*q),"");S.vertex=!0;v.insert(S);S.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*q,.24*r,.16*q),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*q,.24*r,.16*q),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,
.61*q,.24*r,.16*q),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*q,.24*r,.16*q),"");$d.vertex=!0;v.insert($d);$d.style=E.style;da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(da,!1);E.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,t,da);F.push(D.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.edge=!0;ba.style+=b(ba.style,e,t,ba);
F.push(D.addCell(ba,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,t,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,t,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Lc,
!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,t,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,t,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,t,v,G);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*q,.6*r,.25*q,da,F,D,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.6*r,.75*q,ba,F,D,Oa,v,pa);w=new mxCell("",new mxGeometry(.7*r,.1*q,.15*r,.32*q),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"shape=mxgraph.eip.control_bus;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);S=new mxCell("",
new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");S.vertex=!0;v.insert(S);S.style+=b(S.style,e,t,S);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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,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,
q-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,t,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;w.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,t,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+q-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(q-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,t,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,S.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,t,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,t,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,t,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,t,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,t,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,r,.25*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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*q,ff,.75*q),"ellipse;part=1;"),
E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,t,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)w[l]=new mxCell("",new mxGeometry(gf*l,0,gf,q),"part=1;shape=mxgraph.floorplan.sink_2;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=.1*r/e.StallCount;w=new mxCell("",new mxGeometry(0,
0,Fb,q),"fillColor=#000000;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Ob=(r-Fb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=I(e,t);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=b(re,e,t,v);var se=b("",e,t,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,q),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),q-.92*(Ob-Fb),.9*(Ob-Fb),.92*(Ob-Fb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),
Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.2*(Ob-Fb),0,.6*(Ob-Fb),.8*(Ob-Fb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob,.42*q,.15*(Ob-Fb),.12*(Ob-Fb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=",
"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);da=new mxCell("",new mxGeometry(0,0,0,0),ae);da.geometry.relative=!0;da.edge=!0;fb(0,.5*q,.65*r,.5*q,da,F,D,Oa,v,pa);var fa=q/e.numLines;ba=[];var Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(.65*r,.5*q,.96*r,(l+.5)*fa,ba[l],F,D,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=
"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);fa=q/e.numLines;ba=[];Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(0,(l+.5)*fa,.96*r,(l+.5)*fa,ba[l],F,D,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),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,t,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,t,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,t,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.2*q,r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
w.vertex=!0;v.insert(w);w.style+=ia;w.style+=b(w.style,e,t,w);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(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,t,da),fb(0,0,0,.2*q,da,F,D,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=b(ba.style,e,t,ba),fb(r,.67*q,r,q,ba,F,D,Oa,v,pa)):(w.style+="flipH=1;",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,t,da),fb(0,0,0,.33*q,da,F,D,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=b(ba.style,e,t,ba),fb(r,.8*q,r,q,ba,F,D,Oa,v,pa));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,t,xa),fb(.2*r,.5*q,.8*r,.5*q,xa,F,D,Oa,v,pa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.2*q,.6*r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(u.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,t,v);"PEIndicator2Block"==u.Class||"PESharedIndicator2Block"==u.Class?(w=new mxCell("",
new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(w=new mxCell("",new mxGeometry(0,0,r,.5*q),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*q,r,.5*q),"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,t,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"==u.Class?1!=e.poweredHandOperated&&(te=!0):1!=
e.handOperated&&(te=!0);if(te){e=h(u).Properties;O=e.BoundingBox;var Sf=O.h;O.h="PEAngleValveBlock"==u.Class||"PEAngleGlobeValveBlock"==u.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.75*O.x+wc),Math.round(.75*(O.y+Sf-O.h)+xc),Math.round(.75*O.w),Math.round(.75*O.h)),"");v.vertex=!0;yb(v,u,D)}if("PEPoweredValveBlock"==u.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,t,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",
w=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*q),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),w.vertex=!0,v.insert(w),w.value=m(e.PoweredText),w.style+=(G?"":n(e.PoweredText)+x(e.PoweredText)+C(e.PoweredText)+J(e.PoweredText)+M(e.PoweredText)+P(e.PoweredText)+R(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),w.style+=b(w.style,e,t,w,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(u.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,t,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,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)+n(e.Title)+x(e.Title));1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,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;w.insert(E);1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(-20,30),S.vertex=!0,v.insert(S),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,t,v);e.Text=null;break;case "UI2AccordionBlock":w=[];fa=25;for(l=0;l<=e.Panels-1;l++)w[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"):
l==e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,q-(e.Panels-e.Selected)*fa+(l-e.Selected)*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Panel_"+(l+1)]),w[l].style+=a(e["Panel_"+(l+1)],G),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=5;");var Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?
new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-20-(e.Panels-e.Selected)*fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"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*fa),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,
e,t,E));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*fa),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=b(S.style,e,t,S));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-
20-(e.Panels-e.Selected)*fa),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"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,t,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];fa=25;var Ib=3,Ha=(r+Ib)/
(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=
!0,w[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,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,fa),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=
Ua,S.style+=b(S.style,e,t,S));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];fa=25;Ib=3;Ha=(r+Ib)/e.Tabs;hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=
b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,fa),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(S=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;"),
S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=b(S.style,e,t,S));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];Ib=3;fa=25+Ib;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,q),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),""),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,t,E[l],G)):(w[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,fa-Ib),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q),"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,t,E));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=b(S.style,e,t,S));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
fa=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,l*fa+.5*fa-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),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,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=
a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),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,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";fa=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,
l*fa+.5*fa-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=
b(E[l].style,e,t,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),
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,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,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"==u.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,t,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(0,0,.6*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Date);w.style+=a(e.Date,G);v.style+=b(v.style,e,t,v);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,q),"part=1;shape=mxgraph.gmdl.calendar;");
E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,t,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,t,v,G);break;case "UI2NumericStepperBlock":Y=I(e,t);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,t,v,G);break;case "UI2TableBlock":try{kb=W(e.FillColor);var Kd=W(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:W(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:W(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
e["Cell_"+l+"_"+ea],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?W(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[ea])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];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,q),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"strokeColor=none;"),
w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];E=[];fa=q/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),""),E[l].vertex=!0,v.insert(E[l])):
(w[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,fa),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=
l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,t,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"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,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)w[l]=new mxCell("",new mxGeometry(l*
Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Link_"+(l+1)]),w[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,t,v);w=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)w[l]=l!=e.Selected-
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,t,v);X=[];nb=[];var jd=[];fa=q/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+n(e["Item_"+(l+1)])+x(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*q/e.Lines,r,fa),"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=I(e,t),
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)])+n(e["Shortcut_"+(l+1)])+x(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*q/e.Lines,.4*r,fa),"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*q/e.Lines,.9*
r,fa),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=I(e,t));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,t,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,t,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,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;w.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);S=[];for(l=0;l<e.Buttons;l++)S[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),S[l].geometry.relative=!0,S[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),S[l].vertex=!0,v.insert(S[l]),S[l].value=m(e["Button_"+(l+1)]),S[l].style+=a(e["Button_"+(l+1)],G),S[l].style+=b(S[l].style,e,t,S[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,t);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,t,v,G);X=[];var ue=[],wb=db/q;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])),fa=0,0==e.Attributes?fa=l=1:l<e.Attributes?(fa=e["Text"+(l+1)+"Percent"],wb+=fa):fa=1-wb,pc=Math.round((q-db)*fa)+(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+Q(e,t,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,t,v,G);break;case "ERDEntityBlock":ia=ca(e,t);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,t,v,G);e.ShadedHeader?(ia=W(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,t);X=[];wb=db/q;Wb=db;for(l=0;l<e.Fields;l++)fa=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;"+Q(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,t);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,t);v.style+=b(v.style,e,t,v,G);X=[];var Ga=[];wb=db;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+Q(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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,t,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];wb=db;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+Q(e,t,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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;"+Q(e,t,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];var Kb=[];wb=db;Jb=30;var ce=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+Q(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-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;"+Q(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),Kb[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;"),
Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ia+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+Q(e,t,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=b(Kb[l].style,e,t,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,q,v,e,t);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,q,v,e,t);break;case "GCPServiceCardBlankBlock":Sa("blank",
1,.66,r,q,v,e,t);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,q,v,e,t);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,q,v,e,t);break;case "GCPInputRetail":Wa("retail",1,.89,r,q,v,e,t);break;case "GCPInputReport":Wa("report",1,1,r,q,v,e,t);break;case "GCPInputPhone":Wa("phone",.64,1,r,q,v,e,t);break;case "GCPInputBlank":Wa("transparent",1,1,r,q,v,e,t);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,t,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,q)*.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==U.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,t,v,G);mb=ha(e,t,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:q),100),xe=
new mxCell("",new mxGeometry(0,0,we,q),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,q),"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,t,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=
"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,q),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,t,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=ha(e,t,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
e.LineWidth);pa.style+=b(pa.style,ob,t,pa,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;pa.style+=b(pa.style,e,t,pa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;pa.vertex=!0;pa.geometry.relative=!0;v.insert(pa)}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,q),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=
b(ra.style,pf,t,ra,G);ra.style+=b(ra.style,e,t,ra,G);e.Rotation=mb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var eb=Pb.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,t,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Pb.w);eb.h&&(Yb.height*=eb.h/Pb.h);eb.x&&(Yb.x=eb.x/Pb.w);eb.y&&(Yb.y=eb.y/Pb.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/q);eb.fx&&(Yb.x=(0<
eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/q)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,q),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*q/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,
e,t,v,G);break;case "DoubleArrowBlock":ze=e.Head*q/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(U){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld=
30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,t,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(ea=0;ea<e.Vertices.length;ea++)Qa=e.Vertices[ea],0==ea?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,t,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="+W(od)+";"+oa(od,"fillOpacity");v.style+=b(v.style,e,t,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+W(kb)+";"+oa(kb,"fillOpacity"));ab.style+=b(ab.style,e,t,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="+W(kb)+";"+oa(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,t,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="+W(od)+";"+oa(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
W(od)+";"+oa(od,"fillOpacity"),v.style+=b(v.style,e,t,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,q),"strokeColor=none;fillColor="+W(kb)+";"+oa(kb,"fillOpacity")),ab.style+=b(ab.style,e,t,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,t,v,G);break;case "PersonRoleBlock":try{ia=ca(e,t);db=q/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,
e,t,v,G);var Ec=new mxCell("",new mxGeometry(0,q/2,r,q/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,t,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);ka(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(u,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&&u.value){var t=u.geometry.width,e=u.geometry.height,O=t,r=e,q=0,Z=0;if(-90==D||-270==D){O=e;r=t;var aa=(e-t)/2;q=-aa/t;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var U=u.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&
0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(u.value,new mxGeometry(q,Z,O,r),U+"fillColor=none;strokeColor=none;rotation="+D+";");u.value=null;wa.geometry.relative=!0;wa.vertex=!0;u.insert(wa)}}catch(ja){console.log(ja)}}function Je(u,F,D,t,e){function O(Lb,$b){var Xa="";try{for(var pb=0;pb<Lb.text.length;pb++){var Nc=Lb.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:"+T(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+T(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Lb,$b,Xa){Lb=Aa+Lb;ra[Lb]=$b;$b="";for(var pb=0;pb<U.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[U[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[Lb]=Xa;t.addCell(Xa,aa)},q=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;t.addCell(aa);var U=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||
{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(u||Date.now())+"_";4==q&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==q?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==q||2==q?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=q&&(Ca=!1);for(u=0;u<U.length;u++)ma.push(O(ja,U[u]));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(u=0;u<U.length;u++)U[u]=Ia.f[U[u]]||U[u]}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(u=0;u<U.length;u++)U[u]=l[Ka].nfs[U[u]]||U[u];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&&
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(u){return Math.round(100*this.nurbsValues[4*(u+1)])/100};Qd.prototype.getY=function(u){return Math.round(100*this.nurbsValues[4*(u+1)+1])/100};LucidImporter.importState=function(u,F,D){function t(q){null!=q.state&&EditorUi.debug("convertLucidChart addPages",
q);if(q.Properties){for(var Z in q.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),q.Properties[Z]);LucidImporter.globalProps=q.Properties}for(var aa in q.Pages)Z=q.Pages[aa],Z.id=aa,Z.Data=q.Data,e.push(Z);e.sort(function(U,wa){return U.Properties.Order<wa.Properties.Order?-1:U.Properties.Order>wa.Properties.Order?1:0});for(q=0;q<e.length;q++)LucidImporter.pageIdsMap[e[q].id]=q}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!=u.state?t(JSON.parse(u.state)):null==u.Page&&null!=u.Pages?t(u):e.push(u);u=Df();D=new mxCodec;for(var O=0;O<e.length;O++){F.push("<diagram");null!=e[O].Properties&&null!=e[O].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[O].Properties.Title)+'"');F.push(' id="'+O+'"');zf(u,e[O],!0);var r=D.encode(u.getModel());null!=e[O].Properties&&(e[O].Properties.FillColor&&"#ffffff"!=e[O].Properties.FillColor&&r.setAttribute("background",W(e[O].Properties.FillColor)),
e[O].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[O].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[O].Properties.Size.w),r.setAttribute("pageHeight",.75*e[O].Properties.Size.h)),null!=e[O].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[O].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);u.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,I){var L={"[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>",
N;for(N in L)if(1<I&&N==M.CONTENT_TYPES_XML){for(var Q=mxUtils.parseXml(L[N]),ha=Q.documentElement,V=ha.children,T=null,W=0;W<V.length;W++){var oa=V[W];"/visio/pages/page1.xml"==oa.getAttribute(M.PART_NAME)&&(T=oa)}for(W=2;W<=I;W++)V=T.cloneNode(),V.setAttribute(M.PART_NAME,"/visio/pages/page"+W+".xml"),ha.appendChild(V);A(H,N,Q,!0)}else H.file(N,L[N])}function z(H,I,L){return null!=H.createElementNS?H.createElementNS(I,L):H.createElement(L)}function B(H){var I=P[H];null==I&&(I=R++,P[H]=I);return I}
function m(H){var I={};try{var L=H.getGraphBounds().clone(),N=H.view.scale,Q=H.view.translate,ha=Math.round(L.x/N)-Q.x,V=Math.round(L.y/N)-Q.y,T=H.pageFormat.width,W=H.pageFormat.height;0>ha&&(ha+=Math.ceil((Q.x-L.x/N)/T)*T);0>V&&(V+=Math.ceil((Q.y-L.y/N)/W)*W);var oa=Math.max(1,Math.ceil((L.width/N+ha)/T)),ca=Math.max(1,Math.ceil((L.height/N+V)/W));I.gridEnabled=H.gridEnabled;I.gridSize=H.gridSize;I.guidesEnabled=H.graphHandler.guidesEnabled;I.pageVisible=H.pageVisible;I.pageScale=H.pageScale;I.pageWidth=
H.pageFormat.width*oa;I.pageHeight=H.pageFormat.height*ca;I.backgroundClr=H.background;I.mathEnabled=H.mathEnabled;I.shadowVisible=H.shadowVisible}catch(qa){}return I}function h(H,I,L,N){return c(H,I/M.CONVERSION_FACTOR,L,N)}function c(H,I,L,N){L=z(L,M.XMLNS,"Cell");L.setAttribute("N",H);L.setAttribute("V",I);N&&L.setAttribute("F",N);return L}function a(H,I,L,N,Q){var ha=z(Q,M.XMLNS,"Row");ha.setAttribute("T",H);ha.setAttribute("IX",I);ha.appendChild(h("X",L,Q));ha.appendChild(h("Y",N,Q));return ha}
function b(H,I,L){var N=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(N&&"none"!=N){if(I.appendChild(c("FillForegnd",N,L)),(N=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=N){I.appendChild(c("FillBkgnd",N,L));N=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var Q=28;if(N)switch(N){case mxConstants.DIRECTION_EAST:Q=25;break;case mxConstants.DIRECTION_WEST:Q=27;break;case mxConstants.DIRECTION_NORTH:Q=30}I.appendChild(c("FillPattern",Q,L))}}else I.appendChild(c("FillPattern",
0,L));(N=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=N?I.appendChild(c("LineColor",N,L)):I.appendChild(c("LinePattern",0,L));(N=H.style[mxConstants.STYLE_STROKEWIDTH])&&I.appendChild(h("LineWeight",N,L));(Q=H.style[mxConstants.STYLE_OPACITY])?N=Q:(N=H.style[mxConstants.STYLE_FILL_OPACITY],Q=H.style[mxConstants.STYLE_STROKE_OPACITY]);N&&I.appendChild(c("FillForegndTrans",1-parseInt(N)/100,L));Q&&I.appendChild(c("LineColorTrans",1-parseInt(Q)/100,L));if(1==H.style[mxConstants.STYLE_DASHED]){N=
H.style[mxConstants.STYLE_DASH_PATTERN];Q=9;if(N)switch(N){case "1 1":Q=10;break;case "1 2":Q=3;break;case "1 4":Q=17}I.appendChild(c("LinePattern",Q,L))}1==H.style[mxConstants.STYLE_SHADOW]&&(I.appendChild(c("ShdwPattern",1,L)),I.appendChild(c("ShdwForegnd","#000000",L)),I.appendChild(c("ShdwForegndTrans",.6,L)),I.appendChild(c("ShapeShdwType",1,L)),I.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",L)),I.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",L)),I.appendChild(c("ShapeShdwScaleFactor",
"1",L)),I.appendChild(c("ShapeShdwBlur","0.05555555555555555",L)),I.appendChild(c("ShapeShdwShow",2,L)));1==H.style[mxConstants.STYLE_FLIPH]&&I.appendChild(c("FlipX",1,L));1==H.style[mxConstants.STYLE_FLIPV]&&I.appendChild(c("FlipY",1,L));1==H.style[mxConstants.STYLE_ROUNDED]&&I.appendChild(h("Rounding",.1*H.cell.geometry.width,L));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&I.appendChild(c("TextBkgnd",H,L))}function d(H,I,L,N,Q,ha){var V=z(N,M.XMLNS,"Shape");V.setAttribute("ID",
H);V.setAttribute("NameU","Shape"+H);V.setAttribute("LineStyle","0");V.setAttribute("FillStyle","0");V.setAttribute("TextStyle","0");H=I.width/2;var T=I.height/2;V.appendChild(h("PinX",I.x+H+(ha?0:K.shiftX),N));V.appendChild(h("PinY",Q-I.y-T-(ha?0:K.shiftY),N));V.appendChild(h("Width",I.width,N));V.appendChild(h("Height",I.height,N));V.appendChild(h("LocPinX",H,N));V.appendChild(h("LocPinY",T,N));V.appendChild(c("LayerMember",L+"",N));return V}function f(H,I){H=M.ARROWS_MAP[(null==H?"none":H)+"|"+
(null==I?"1":I)];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 p(H,I,L,N,Q,ha){var V=L.view.getState(H,!0);if(null==V||null==V.absolutePoints||null==V.cellBounds)return null;L=z(N,M.XMLNS,"Shape");var T=B(H.id);L.setAttribute("ID",T);L.setAttribute("NameU","Dynamic connector."+T);L.setAttribute("Name","Dynamic connector."+T);L.setAttribute("Type","Shape");L.setAttribute("Master","4");var W=K.state;T=V.absolutePoints;var oa=V.cellBounds,ca=
oa.width/2,qa=oa.height/2;L.appendChild(h("PinX",oa.x+ca+(ha?0:K.shiftX),N));L.appendChild(h("PinY",Q-oa.y-qa-(ha?0:K.shiftY),N));L.appendChild(h("Width",oa.width,N));L.appendChild(h("Height",oa.height,N));L.appendChild(h("LocPinX",ca,N));L.appendChild(h("LocPinY",qa,N));K.newEdge(L,V,N);ca=function(sa,Fa,ka){var Za=sa.x;sa=sa.y;Za=Za*W.scale-oa.x+W.dx+(ka||ha?0:K.shiftX);sa=(Fa?0:oa.height)-sa*W.scale+oa.y-W.dy-(ka||ha?0:K.shiftY);return{x:Za,y:sa}};qa=ca(T[0],!0);L.appendChild(h("BeginX",oa.x+qa.x,
N,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));L.appendChild(h("BeginY",Q-oa.y+qa.y,N,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(T[T.length-1],!0);L.appendChild(h("EndX",oa.x+qa.x,N,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));L.appendChild(h("EndY",Q-oa.y+qa.y,N,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));L.appendChild(c("BegTrigger","2",N,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));L.appendChild(c("EndTrigger","2",N,H.target?"_XFTRIGGER(Sheet."+
B(H.target.id)+"!EventXFMod)":null));L.appendChild(c("ConFixedCode","6",N));L.appendChild(c("LayerMember",I+"",N));b(V,L,N);I=V.style[mxConstants.STYLE_STARTSIZE];H=f(V.style[mxConstants.STYLE_STARTARROW],V.style[mxConstants.STYLE_STARTFILL]);L.appendChild(c("BeginArrow",H,N));L.appendChild(c("BeginArrowSize",k(I),N));I=V.style[mxConstants.STYLE_ENDSIZE];H=f(V.style[mxConstants.STYLE_ENDARROW],V.style[mxConstants.STYLE_ENDFILL]);L.appendChild(c("EndArrow",H,N));L.appendChild(c("EndArrowSize",k(I),
N));null!=V.text&&V.text.checkBounds()&&(K.save(),V.text.paint(K),K.restore());V=z(N,M.XMLNS,"Section");V.setAttribute("N","Geometry");V.setAttribute("IX","0");for(H=0;H<T.length;H++)I=ca(T[H],!1,!0),V.appendChild(a(0==H?"MoveTo":"LineTo",H+1,I.x,I.y,N));V.appendChild(c("NoFill","1",N));V.appendChild(c("NoLine","0",N));L.appendChild(V);return L}function n(H,I,L,N,Q,ha,V){var T=H.geometry,W=T;if(null!=T)try{T.relative&&ha&&(W=T.clone(),T.x*=ha.width,T.y*=ha.height,H.vertex&&null!=T.offset&&(T.x+=T.offset.x,
T.y+=T.offset.y),T.relative=0);var oa=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(oa+"10000",T,I,N,Q,V);ca.setAttribute("Type","Group");var qa=z(N,M.XMLNS,"Shapes");K.save();K.translate(-T.x,-T.y);var sa=T.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=n(H,I,L,N,T.height,T,!0);delete H.treatAsSingle;H.setGeometry(T);null!=Fa&&qa.appendChild(Fa);for(Q=0;Q<H.getChildCount();Q++)Fa=n(H.children[Q],I,L,N,T.height,T,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);
K.restore();return ca}if(H.vertex){ca=d(oa,T,I,N,Q,V);var ka=L.view.getState(H,!0);null!=ka&&(b(ka,ca,N),K.newShape(ca,ka,N),null!=ka.text&&ka.text.checkBounds()&&(K.save(),ka.text.paint(K),K.restore()),null!=ka.shape&&ka.shape.checkBounds()&&(K.save(),ka.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return p(H,I,L,N,Q,V)}finally{H.geometry=W}else return null}function x(H,I){var L=mxUtils.createXmlDocument(),N=z(L,M.XMLNS,
"PageContents");N.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);N.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var Q=z(L,M.XMLNS,"Shapes");N.appendChild(Q);var ha=H.model,V=H.view.translate,T=H.view.scale,W=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(W.x/T<V.x||W.y/T<V.y)K.shiftX=Math.ceil((V.x-W.x/T)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((V.y-W.y/T)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-V.x,-V.y);K.scale(1/T);K.newPage();
T=H.model.getChildCells(H.model.root);V={};for(W=0;W<T.length;W++)V[T[W].id]=W;for(var oa in ha.cells)T=ha.cells[oa],W=null!=T.parent?V[T.parent.id]:null,null!=W&&(T=n(T,W,H,L,I.pageHeight),null!=T&&Q.appendChild(T));H=z(L,M.XMLNS,"Connects");N.appendChild(H);for(oa in ha.cells)T=ha.cells[oa],T.edge&&(T.source&&(I=z(L,M.XMLNS,"Connect"),I.setAttribute("FromSheet",B(T.id)),I.setAttribute("FromCell","BeginX"),I.setAttribute("ToSheet",B(T.source.id)),H.appendChild(I)),T.target&&(I=z(L,M.XMLNS,"Connect"),
I.setAttribute("FromSheet",B(T.id)),I.setAttribute("FromCell","EndX"),I.setAttribute("ToSheet",B(T.target.id)),H.appendChild(I)));L.appendChild(N);K.restore();return L}function A(H,I,L,N){H.file(I,(N?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(L,"\n"))}function C(H,I,L,N){var Q=mxUtils.createXmlDocument(),ha=mxUtils.createXmlDocument(),V=z(Q,M.XMLNS,"Pages");V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/",
"xmlns:r",M.XMLNS_R);var T=z(ha,M.RELS_XMLNS,"Relationships"),W=1,oa;for(oa in I){var ca="page"+W+".xml",qa=z(Q,M.XMLNS,"Page");qa.setAttribute("ID",W-1);qa.setAttribute("NameU",oa);qa.setAttribute("Name",oa);var sa=z(Q,M.XMLNS,"PageSheet"),Fa=N[oa];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,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+W);var ka=
z(Q,M.XMLNS,"Section");ka.setAttribute("N","Layer");for(var Za=L[oa],yb=0;yb<Za.length;yb++){var vb=z(Q,M.XMLNS,"Row");vb.setAttribute("IX",yb+"");ka.appendChild(vb);vb.appendChild(c("Name",Za[yb].name,Q));vb.appendChild(c("Color","255",Q));vb.appendChild(c("Status","0",Q));vb.appendChild(c("Visible",Za[yb].visible?"1":"0",Q));vb.appendChild(c("Print","1",Q));vb.appendChild(c("Active","0",Q));vb.appendChild(c("Lock",Za[yb].locked?"1":"0",Q));vb.appendChild(c("Snap","1",Q));vb.appendChild(c("Glue",
"1",Q));vb.appendChild(c("NameUniv",Za[yb].name,Q));vb.appendChild(c("ColorTrans","0",Q))}sa.appendChild(ka);qa.appendChild(sa);qa.appendChild(Fa);V.appendChild(qa);qa=z(ha,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+W);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);T.appendChild(qa);A(H,M.VISIO_PAGES+ca,I[oa]);W++}Q.appendChild(V);ha.appendChild(T);A(H,M.VISIO_PAGES+"pages.xml",Q);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ha)}function J(H,I){I=M.VISIO_PAGES_RELS+"page"+
I+".xml.rels";var L=mxUtils.createXmlDocument(),N=z(L,M.RELS_XMLNS,"Relationships"),Q=z(L,M.RELS_XMLNS,"Relationship");Q.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");Q.setAttribute("Id","rId1");Q.setAttribute("Target","../masters/master1.xml");N.appendChild(Q);var ha=K.images;if(0<ha.length)for(var V=0;V<ha.length;V++)Q=z(L,M.RELS_XMLNS,"Relationship"),Q.setAttribute("Type",M.XMLNS_R+"/image"),Q.setAttribute("Id","rId"+(V+2)),Q.setAttribute("Target","../media/"+
ha[V]),N.appendChild(Q);L.appendChild(N);A(H,I,L)}var M=this,K=new mxVsdxCanvas2D,P={},R=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var I=function(Fa,ka){Fa=Fa.model.getChildCells(Fa.model.root);Q[ka]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&Q[ka].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},L=new JSZip;K.init(L);P={};R=1;var N={},Q={},ha={},V=null!=
g.pages?g.pages.length:1;if(null!=g.pages){var T=function(Fa){Fa=Fa.getName();var ka=g.editor.graph,Za=null;null!=ka.themes&&"darkTheme"==ka.defaultThemeName&&(Za=ka.stylesheet,ka.stylesheet=ka.getDefaultStylesheet(),ka.refresh());try{var yb=m(ka);N[Fa]=x(ka,yb);I(ka,Fa);J(L,ca+1);ha[Fa]=yb}finally{null!=Za&&(ka.stylesheet=Za,ka.refresh())}},W=g.editor.graph.getSelectionCells(),oa=g.currentPage;if(H)T(oa);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,
!0);T(qa)}oa!=g.currentPage&&g.selectPage(oa,!0);g.editor.graph.setSelectionCells(W)}}else{T=g.editor.graph;var sa=m(T);N.Page1=x(T,sa);I(T,"Page1");J(L,1);ha.Page1=sa}y(L,V);C(L,N,Q,ha);H=function(){L.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var ka=g.getBaseFilename();g.saveData(ka+".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.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)};
mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var g=this.createElt("Section");g.setAttribute("N","Geometry");g.setAttribute("IX",this.geoIndex++);this.geoSec=g;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(g,y,z){this.geoIndex=0;this.shape=g;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=z;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};
mxVsdxCanvas2D.prototype.createCellElemScaled=function(g,y,z){return this.createCellElem(g,y/VsdxExport.prototype.CONVERSION_FACTOR,z)};mxVsdxCanvas2D.prototype.createCellElem=function(g,y,z){var B=this.createElt("Cell");B.setAttribute("N",g);B.setAttribute("V",y);z&&B.setAttribute("F",z);return B};
mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,p,n){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,p,n)};
mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,p,n){var x=this.createElt("Row");x.setAttribute("T",g);x.setAttribute("IX",y);x.appendChild(this.createCellElem("X",z,b));x.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&x.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&x.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&x.appendChild(this.createCellElem("C",c,p));null!=a&&isFinite(a)&&x.appendChild(this.createCellElem("D",a,n));
mxVsdxCanvas2D.prototype.rect=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,g,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,
g,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y))};mxVsdxCanvas2D.prototype.roundrect=function(g,y,z,B,m,h){this.rect(g,y,z,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};
mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=c+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/c,"Width*"+g/a,"Height*"+(y-B/2)/c,"Width*"+(g+z/2)/a,"Height*"+y/c))};
mxVsdxCanvas2D.prototype.moveTo=function(g,y){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=g;this.lastMoveToY=y;this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,g/z,y/m))};
mxVsdxCanvas2D.prototype.lineTo=function(g,y){this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,g/z,y/m))};
mxVsdxCanvas2D.prototype.quadTo=function(g,y,z,B){this.lastX=z;this.lastY=B;var m=this.state,h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;z=(z-h.x+m.dx)*m.scale;B=(h.height-B+h.y-m.dy)*m.scale;g/=a;y/=c;z/=a;B/=c;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,z,B,g,y))};
mxVsdxCanvas2D.prototype.curveTo=function(g,y,z,B,m,h){this.lastX=m;this.lastY=h;var c=this.state,a=this.xmGeo,b=a.height*c.scale,d=a.width*c.scale;g=(g-a.x+c.dx)*c.scale;y=(a.height-y+a.y-c.dy)*c.scale;z=(z-a.x+c.dx)*c.scale;B=(a.height-B+a.y-c.dy)*c.scale;m=(m-a.x+c.dx)*c.scale;h=(a.height-h+a.y-c.dy)*c.scale;g/=d;y/=b;z/=d;B/=b;m/=d;h/=b;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,h,g,y,z,B))};
mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(g,y){var z=this.createElt("ForeignData");z.setAttribute("ForeignType","Bitmap");g=g.toUpperCase();"BMP"!=g&&z.setAttribute("CompressionType",g);g=this.createElt("Rel");g.setAttribute("r:id","rId"+y);z.appendChild(g);this.shape.appendChild(z);this.shapeType="Foreign"};
mxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),h=m.getContext("2d");y||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));y="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;h.drawImage(this,0,0);try{z(m.toDataURL("image/png"))}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");
try{z(g)}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{z(g)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};
mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");h=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(h,!0,function(p){b.zip.file("visio/media/"+d,p.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,h,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);
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(p){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(n){b.zip.file("visio/media/"+d,n.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,p){var n=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,n.cellState.style.fontSize,n.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 x=this.createElt("Section");x.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),J=0,M=0,K=0,P=0,R=0,H=0,I=0,L=function(T,W,oa,ca,qa){var sa=T.fontSize,Fa=T.fontFamily,ka=mxUtils.getSizeForString(qa,sa,Fa);a&&ka.width>z&&(ka=mxUtils.getSizeForString(qa,sa,Fa,z));T.blockElem?(R+=ka.width,K=Math.min(Math.max(K,R),
z),R=0,H=Math.max(H,ka.height),P+=H+I,I=H,H=0):(R+=ka.width,K=Math.min(Math.max(K,R),z),H=Math.max(H,ka.height),P=Math.max(P,H));ka=n.createElt("Row");ka.setAttribute("IX",J);T.fontColor&&ka.appendChild(n.createCellElem("Color",mxUtils.rgba2hex(T.fontColor)));sa&&ka.appendChild(n.createCellElemScaled("Size",.97*sa));Fa&&ka.appendChild(n.createCellElem("Font",Fa));sa=0;T.bold&&(sa|=17);T.italic&&(sa|=34);T.underline&&(sa|=4);ka.appendChild(n.createCellElem("Style",sa));ka.appendChild(n.createCellElem("Case",
"0"));ka.appendChild(n.createCellElem("Pos","0"));ka.appendChild(n.createCellElem("FontScale","1"));ka.appendChild(n.createCellElem("Letterspace","0"));W.appendChild(ka);W=n.createElt("Row");W.setAttribute("IX",M);switch(T.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}W.appendChild(n.createCellElem("HorzAlign",sa));oa.appendChild(W);oa=n.createElt("cp");oa.setAttribute("IX",J++);ca.appendChild(oa);
T=n.xmlDoc.createTextNode(qa+(T.blockElem?"\n":""));ca.appendChild(T)},N=function(T,W){W=W||{};for(var oa=0;oa<T.length;oa++){var ca=T[oa];if(3==ca.nodeType){var qa=n.cellState.style.fontStyle;qa={fontColor:W.fontColor||n.cellState.style.fontColor,fontSize:W.fontSize||n.cellState.style.fontSize,fontFamily:W.fontFamily||n.cellState.style.fontFamily,align:W.align||n.cellState.style.align,bold:W.bold||qa&1,italic:W.italic||qa&2,underline:W.underline||qa&4};var sa=!1;oa+1<T.length&&"BR"==T[oa+1].nodeName.toUpperCase()&&
(sa=!0,oa++);L(qa,x,A,C,(W.OL?W.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")||W.bold,italic:"italic"==qa.getPropertyValue("font-style")||W.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||W.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:W.OL,LiIndex:W.LiIndex};if("UL"==sa){var ka=n.createElt("Row");ka.setAttribute("IX",M);ka.appendChild(n.createCellElem("HorzAlign","0"));ka.appendChild(n.createCellElem("Bullet","1"));A.appendChild(ka);ka=n.createElt("pp");ka.setAttribute("IX",M++);C.appendChild(ka)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=oa+1);0<Fa?(N(ca.childNodes,qa),"UL"==sa&&(ka=n.createElt("Row"),
ka.setAttribute("IX",M),ka.appendChild(n.createCellElem("Bullet","0")),A.appendChild(ka),ka=n.createElt("pp"),ka.setAttribute("IX",M++),C.appendChild(ka)),L(qa,x,A,C,"")):L(qa,x,A,C,(W.OL?W.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&N(m.childNodes,{})):L({fontColor:n.cellState.style.fontColor,fontSize:n.cellState.style.fontSize,fontFamily:n.cellState.style.fontFamily},x,A,C,m);b=m=0;B=Math.max(B,
P);z=Math.max(z,K);p=z/2;var Q=B/2,ha=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),V=ha*Math.PI/180;switch(h){case "right":0!=ha?(g-=p*Math.cos(V),y-=p*Math.sin(V)):m=K/2;break;case "left":0!=ha?(g+=p*Math.cos(V),y+=p*Math.sin(V)):m=-K/2}switch(c){case "top":0!=ha?(g+=Q*Math.sin(V),y+=Q*Math.cos(V)):b=P/2;break;case "bottom":0!=ha?(g-=Q*Math.sin(V),y-=Q*Math.cos(V)):b=-P/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",p+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",Q+b));k-=ha;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(x);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];
this.pos+=4;this.height=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.planes=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.bitPP=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.compress=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.rawSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.hr=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.vr=g[this.pos+3]<<24|g[this.pos+
2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.colors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.importantColors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){g=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(g);for(var y=0;y<g;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++];
this.palette[y]={red:m,green:B,blue:z,quad:h}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var g="bit"+this.bitPP,y=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=y;this.data=y.data;this[g]()}catch(z){console.log("bit decode error:"+z)}};
BmpDecoder.prototype.bit1=function(){for(var g=Math.ceil(this.width/8),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++)for(var m=this.buffer[this.pos++],h=z*this.width*4+32*B,c=0;8>c;c++)if(8*B+c<this.width){var a=this.palette[m>>7-c&1];this.data[h+4*c]=a.red;this.data[h+4*c+1]=a.green;this.data[h+4*c+2]=a.blue;this.data[h+4*c+3]=255}else break;0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit4=function(){for(var g=Math.ceil(this.width/2),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++){var m=this.buffer[this.pos++],h=z*this.width*4+8*B,c=m&15;m=this.palette[m>>4];this.data[h]=m.red;this.data[h+1]=m.green;this.data[h+2]=m.blue;this.data[h+3]=255;if(2*B+1>=this.width)break;m=this.palette[c];this.data[h+4]=m.red;this.data[h+4+1]=m.green;this.data[h+4+2]=m.blue;this.data[h+4+3]=255}0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit8=function(){for(var g=this.width%4,y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=y*this.width*4+4*z;B<this.palette.length?(B=this.palette[B],this.data[m]=B.red,this.data[m+1]=B.green,this.data[m+2]=B.blue):(this.data[m]=255,this.data[m+1]=255,this.data[m+2]=255);this.data[m+3]=255}0!=g&&(this.pos+=4-g)}};
BmpDecoder.prototype.bit15=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=B>>15?255:0,a=y*this.width*4+4*z;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=h;this.data[a+2]=m;this.data[a+3]=c}this.pos+=g}};
BmpDecoder.prototype.bit16=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=y*this.width*4+4*z;this.data[c]=(B>>10&31)/31*255|0;this.data[c+1]=h;this.data[c+2]=m;this.data[c+3]=255}this.pos+=g}};
BmpDecoder.prototype.bit24=function(){var g=3*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=y*this.width*4+4*z;this.data[c]=h;this.data[c+1]=m;this.data[c+2]=B;this.data[c+3]=255}this.pos+=g}};
BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y=0;y<this.width;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=g*this.width*4+4*y;this.data[c]=m;this.data[c+1]=B;this.data[c+2]=z;this.data[c+3]=h}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(g,y){function z(){this.constructor=g}for(var B in y)y.hasOwnProperty(B)&&(g[B]=y[B]);g.prototype=null===y?Object.create(y):(z.prototype=y.prototype,new z)},com;
(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){var f=this,k={},p={},n=function(){function J(){R=R.concat(f.RESPONSE_END);a&&a(R)}for(var M=m.vsdxPlaceholder+"/document.xml",K=k[M]?k[M]:null,P=K.firstChild;null!=P&&1!=P.nodeType;)P=P.nextSibling;if(null!=P&&1==P.nodeType)f.importNodes(K,P,M,k);else return null;
f.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(K,k,p);M=f.vsdxModel.getPages();var R=f.RESPONSE_HEADER;var H=function(N){null==N.entries&&(N.entries=[]);return N.entries}(M),I=function(N,Q){var ha=H[N].getValue(),V=L.createMxGraph();V.getModel().beginUpdate();L.importPage(ha,V,V.getDefaultParent(),!0);L.scaleGraph(V,ha.getPageScale()/ha.getDrawingScale());V.getModel().endUpdate();L.postImportPage(ha,V,function(){L.sanitiseGraph(V);R=R.concat(f.RESPONSE_DIAGRAM_START);R=R.concat(f.processPage(V,ha));
R=R.concat(f.RESPONSE_DIAGRAM_END);N<H.length-1?I(N+1,Q):Q()})},L=f;0<H.length?I(0,J):J()},x=0,A=0,C=function(){if(A==x)try{n()}catch(J){console.log(J),null!=d?d(J):a("")}};JSZip.loadAsync(c).then(function(J){0==Object.keys(J.files).length?null!=d&&d():J.forEach(function(M,K){var P=K.name,R=P.toLowerCase();M=R.length;R.indexOf(".xml")==M-4||R.indexOf(".rels")==M-5?(x++,K.async("string").then(function(H){if(0!==H.length){65279==H.charCodeAt(0)&&(H=H.substring(1));var I=m.parseXml(H);if(null==I)if(0===
H.charCodeAt(1)&&0===H.charCodeAt(3)&&0===H.charCodeAt(5))I=m.parseXml(m.decodeUTF16LE(H));else{for(I=0;I<m.incorrectXMLReqExp.length;I++)m.incorrectXMLReqExp[I].regExp.test(H)&&(H=H.replace(m.incorrectXMLReqExp[I].regExp,m.incorrectXMLReqExp[I].repl));I=m.parseXml(H)}null!=I&&(I.vsdxFileName=P,k[P]=I)}A++;C()})):0===R.indexOf(m.vsdxPlaceholder+"/media")&&(x++,function(H,I){var L=H.length-I.length;H=H.indexOf(I,L);return-1!==H&&H===L}(R,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?K.async("blob").then(function(H){var I=
new FormData;I.append("img",H,R);I.append("inputformat","emf");I.append("outputformat","png");var L=new XMLHttpRequest;L.open("POST",EMF_CONVERT_URL);L.responseType="blob";f.editorUi.addRemoteServiceSecurityCheck(L);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var N=new FileReader;N.readAsDataURL(L.response);N.onloadend=function(){var Q=N.result.indexOf(",")+1;p[P]=N.result.substr(Q);A++;C()}}catch(Q){console.log(Q),A++,C()}else A++,C()});
L.send(I)}):(A++,C()):function(H,I){var L=H.length-I.length;H=H.indexOf(I,L);return-1!==H&&H===L}(R,".bmp")?JSZip.support.uint8array&&K.async("uint8array").then(function(H){H=new BmpDecoder(H);var I=document.createElement("canvas");I.width=H.width;I.height=H.height;I.getContext("2d").putImageData(H.imageData,0,0);H=I.toDataURL("image/jpeg");p[P]=H.substr(23);A++;C()}):K.async("base64").then(function(H){p[P]=H;A++;C()}))})},function(J){null!=d&&d(J)})};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,p=b;if(-1!==f&&(k=b.substring(0,f),p=b.substring(f+1,b.length),b=function(C,J){return C[J]?C[J]:null}(d,k+"/_rels/"+p+".rels"),null!=b)){var n=b.getElementsByTagName("Relationship");b={};for(f=0;f<n.length;f++){p=n.item(f);var x=p.getAttribute("Id");p=p.getAttribute("Target");
b[x]=p}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(n=a.item(f),p=function(C,J){return C[J]?C[J]:null}(b,n.getAttribute("r:id")),p=k+"/"+p,null!=p&&(x=d[p]?d[p]:null,null!=x)){n=n.parentNode;for(x=x.firstChild;null!=x&&1!=x.nodeType;)x=x.nextSibling;if(null!=x&&1==x.nodeType)for(x=x.firstChild;null!=x;){if(null!=x&&1==x.nodeType){var A=n.appendChild(c.importNode(x,!0));this.importNodes(c,A,p,d)}x=x.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 p=c.getLayers();k=c.getShapes();f=[];for(var n=0;n<p.length;n++){var x=p[n],A=x.Name.replace(/\s/g,
"_");this.layerNames.push(A);0==x.Visible&&f.push(A)}x=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;for(n=c.getId();x.hasNext();)p=x.next(),p=p.getValue(),A=this.addShape(a,p,b,n,k),p=this.layerIndexToNames(p.layerMember),null!=A&&null!=p&&a.addTagsForCells([A],p);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},
hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)p=c.next(),p=this.addConnectedEdge(a,p.getValue(),n,k),null!=p&&function(C,J){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(J)||C.entries[M].key===J)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,p);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<
C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)p=c.next(),p.getKey().getPageNumber()===n&&(x=this.addUnconnectedEdge(a,function(C,J){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(J)||C.entries[M].key===J)return C.entries[M].value;return null}(this.parentsMap,p.getKey()),p.getValue(),k),p=this.layerIndexToNames(p.getValue().layerMember),null!=p&&a.addTagsForCells([x],
p));if(0<this.layerNames.length){c=a.getAllTags();n=!1;for(p=0;p<this.layerNames.length;p++)if(0>mxUtils.indexOf(c,this.layerNames[p])){n=!0;break}n&&(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(n){if(null!=n){n=n.entries||[];for(var x=0;x<n.length;x++){var A=n[x].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,
k=[];d(c.getShapes());if(0<k.length){var p=function(n,x){function A(){n<k.length-1?p(n+1,x):x()}var C=k[n],J=C.toBeCroppedImg,M=function(P,R){null==P.entries&&(P.entries=[]);for(var H=0;H<P.entries.length;H++)if(null!=P.entries[H].key.equals&&P.entries[H].key.equals(R)||P.entries[H].key===R)return P.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var P=J.iData,R=J.iType;try{var H=K.width/J.imgWidth,I=K.height/J.imgHeight,L=-J.imgOffsetX*
H,N=(J.imgHeight-J.height+J.imgOffsetY)*I,Q=document.createElement("canvas");Q.width=J.width*H;Q.height=J.height*I;var ha=Q.getContext("2d");ha.fillStyle="#FFFFFF";ha.fillRect(0,0,Q.width,Q.height);ha.drawImage(K,L,N,Q.width,Q.height,0,0,Q.width,Q.height);P=Q.toDataURL("image/jpeg").substr(23);R="jpg"}catch(V){console.log(V)}M.style+=";image=data:image/"+R+","+P;A()};K.src="data:image/"+J.iType+";base64,"+J.iData;K.onerror=function(){M.style+=";image=data:image/"+J.iType+","+J.iData;A()}};p(0,b)}else b()}catch(n){console.log(n),
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(n,x){return n&&n.equals?n.equals(x):n===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(n,x){return n&&n.equals?n.equals(x):n===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(n,x){return n&&n.equals?n.equals(x):n===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var p=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(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,p),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(n){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.setShapeIndex(c.getModel().getChildCount(b));(function(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},
getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,p),a);(function(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,p),b)}return null};m.prototype.addGroup=function(c,
a,b,d,f){var k=a.getDimensions(),p=a.getMaster(),n=a.getStyleFromShape(),x=a.getGeomList();x.isNoFill()&&(n[mxConstants.STYLE_FILLCOLOR]="none",n[mxConstants.STYLE_GRADIENTCOLOR]="none");x.isNoLine()&&(n[mxConstants.STYLE_STROKECOLOR]="none");n.html="1";n[mxConstants.STYLE_WHITE_SPACE]="wrap";var A=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=");n=null;var C=a.getChildShapes();n=null!=C&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(C);x=a.isDisplacedLabel()||a.isRotatedLabel()||
n;n=a.getOriginPoint(f,!0);if(x)n=c.insertVertex(b,null,null,Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),A);else{var J=a.getTextLabel();n=c.insertVertex(b,null,J,Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),A)}b=n.geometry.height;for(C=function(K){var P=0;return{next:function(){return P<K.length?K[P++]:
null},hasNext:function(){return P<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(C));C.hasNext();)if(A=C.next().getValue(),J=A.getId(),A.isVertex()){var M=g.mxgraph.io.vsdx.VsdxShape.getType(A.getShape());null!=M&&(function(K,P){return K&&K.equals?K.equals(P):K===P}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,P){return K&&K.equals?K.equals(P):K===P}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,P){return K&&K.equals?K.equals(P):K===P}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&
A.isVertex()&&(A.propagateRotation(a.getRotation()),(M=A.isGroup()?this.addGroup(c,A,n,d,k.y):this.addVertex(c,A,n,d,k.y))&&M.geometry&&(b=Math.max(M.geometry.height,b)));null==p&&function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,
new g.mxgraph.io.vsdx.ShapePageId(d,J),A)}else null==p?(function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),A),function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),n)):this.addUnconnectedEdge(c,n,A,f);if(n.children&&0==n.geometry.height&&0<b)for(n.geometry.height=b,f=0;f<n.children.length;f++)k=n.children[f],k.geometry&&(k.geometry.y+=b);x&&a.createLabelSubShape(c,n);c=a.getRotation();if(0!==c)for(f=
n.getGeometry(),p=f.width/2,x=f.height/2,f=0;f<n.getChildCount();f++)k=n.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(k.getGeometry(),c,p,x);(function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,
a.getId()),n);return n};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,p=c.y-d;c.x=Math.round(k*f-p*a+b);c.y=Math.round(p*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",p=a.isDisplacedLabel()||a.isRotatedLabel();p||(k=a.getTextLabel());var n=a.getDimensions(),x=a.getStyleFromShape();x.html="1";var A=x.hasOwnProperty(mxConstants.STYLE_SHAPE)||x.hasOwnProperty("stencil");x.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(x[mxConstants.STYLE_FILLCOLOR]=
"none");A||(x[mxConstants.STYLE_STROKECOLOR]="none");x.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(x[mxConstants.STYLE_GRADIENTCOLOR]="none");x[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(x=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,"="),A=null,A=p?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*n.x)/100),Math.floor(Math.round(100*n.y)/100),x):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*n.x)/100),Math.floor(Math.round(100*n.y)/100),x),function(C,J,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(J)||C.entries[K].key===J){C.entries[K].value=M;return}C.entries.push({key:J,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,
x),p&&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(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var p=function(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,
k.getId()));if(null!=p){var n=c.getModel().getGeometry(p);null!=n&&(d=n.height)}var x=k.getStartXY(d),A=k.getEndXY(d);n=k.getRoutingPoints(d,x,k.getRotation());this.rotateChildEdge(c.getModel(),p,x,A,n);var C=null,J=a.getSourceToSheet();J=null!=J?function(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,
J)):null;var M=!0;if(null==J||0==J.geometry.width||0==J.geometry.height)J=c.insertVertex(p,null,null,Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0);else if(J.style&&-1==J.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(J);var K=m.calculateAbsolutePoint(p),P=J.geometry;C=new mxPoint((K.x+x.x-C.x)/P.width,(K.y+x.y-C.y)/P.height)}else M=!1;x=null;a=a.getTargetToSheet();a=null!=a?function(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=
I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].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(p,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),x=m.calculateAbsolutePoint(p),P=a.geometry,x=new mxPoint((x.x+A.x-b.x)/P.width,(x.y+A.y-b.y)/
P.height)):K=!1;b=k.getStyleFromEdgeShape(d);P=k.getRotation();A="";var R=k.isDisplacedLabel()||k.isRotatedLabel()||0!==P,H=k.getLblEdgeOffset(c.getView(),n);R||(A=k.getTextLabel(!0));A=c.insertEdge(p,null,A,J,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));R?h(c,A,k,P,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,J,!0,new mxConnectionConstraint(C,!1));M&&n.shift();null!=x&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(x,!1));K&&n.pop();M=c.getModel().getGeometry(A);
if(J.parent!=a.parent&&null!=p&&1!=p.id&&1==J.parent.id){a=C=0;do x=p.geometry,null!=x&&(C+=x.x,a+=x.y),p=p.parent;while(null!=p);A.parent=J.parent;for(p=0;p<n.length;p++)n[p].x+=C,n[p].y+=a}M.points=n;b.hasOwnProperty("curved")&&function(I,L){return I&&I.equals?I.equals(L):I===L}(function(I,L){return I[L]?I[L]: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),p=b.getStyleFromEdgeShape(d),n=b.getRoutingPoints(d,f,b.getRotation()),x=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==x,J=b.getLblEdgeOffset(c.getView(),n);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(p,"=")):(A=c.createEdge(a,
null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(p,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,x,J):A.getGeometry().offset=J;this.rotateChildEdge(c.getModel(),a,f,k,n);a=c.getModel().getGeometry(A);n.pop();n.shift();a.points=n;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);p.hasOwnProperty("curved")&&function(M,K){return M&&M.equals?M.equals(K):M===K}(function(M,K){return M[K]?M[K]:null}(p,"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 p=b.getChildAt(a,k);this.sanitiseCell(c,p)&&f.push(p)}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(p){k=k.concat(p);var n=f.vsdxModel.getMasterShapes(),x=function(P){var R=0;return{next:function(){return R<P.length?P[R++]:null},hasNext:function(){return R<P.length}}}(function(P){var R=
[];null==P.entries&&(P.entries=[]);for(var H=0;H<P.entries.length;H++)R.push(P.entries[H].value);return R}(f.vsdxModel.getPages())).next();if(null!=n){var A={str:"",toString:function(){return this.str}},C=0===p.length?"":",",J=function(P){return Object.keys(P).map(function(R){return P[R]})}(n);p=function(P){P=J[P];var R=M.createMxGraph(),H=1;if(null!=P.pageSheet){var I=H=1,L=P.pageSheet.DrawingScale;null!=L&&(H=parseFloat(L.getAttribute("V"))||1);L=P.pageSheet.PageScale;null!=L&&(I=parseFloat(L.getAttribute("V"))||
1);H=I/H}I=!1;for(L=0;null!=P.firstLevelShapes&&L<P.firstLevelShapes.length;L++){var N=P.firstLevelShapes[L].getShape(),Q=new g.mxgraph.io.vsdx.VsdxShape(x,N,!x.isEdge(N),n,null,M.vsdxModel);N=null;if(Q.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];N=M.addShape(R,Q,R.getDefaultParent(),0,1169);Q=function(W){null==W.entries&&(W.entries=[]);return W.entries}(M.edgeShapeMap);for(var ha=0;ha<Q.length;ha++){var V=Q[ha],T=function(W,oa){null==W.entries&&(W.entries=[]);for(var ca=0;ca<W.entries.length;ca++)if(null!=
W.entries[ca].key.equals&&W.entries[ca].key.equals(oa)||W.entries[ca].key===oa)return W.entries[ca].value;return null}(M.parentsMap,V.getKey());M.addUnconnectedEdge(R,T,V.getValue(),1169)}}else N=M.addUnconnectedEdge(R,null,Q,1169);I|=null!=N}if(I){M.scaleGraph(R,H);H=M.normalizeGraph(R);M.sanitiseGraph(R);if(0===R.getModel().getChildCount(R.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');R=m.prototype.processPage.call(M,R,null);A.str=A.str.concat(R);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":');P=P.getName();null==P&&(P="");P=mxUtils.htmlEntities(JSON.stringify(P));A.str=A.str.concat(P);A.str=A.str.concat("}");C=","}};for(var M=f,K=0;K<J.length;K++)p(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(P){null!=d?d(P):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,p;for(p in c.model.cells){var n=c.model.cells[p],x=n.geometry;if(null!=x&&1==n.parent.id)if(n.vertex)a(x);
else for(a(x.sourcePoint),a(x.targetPoint),n=x.points,x=0;null!=n&&x<n.length;x++)a(n[x])}var A={x:b,y:d};for(p in c.model.cells)if(n=c.model.cells[p],x=n.geometry,null!=x&&1==n.parent.id&&(x.x-=b,x.y-=d,n.isEdge()))for(this.transPoint(x.sourcePoint,A),this.transPoint(x.targetPoint,A),this.transPoint(x.offset,A),n=x.points,x=0;null!=n&&x<n.length;x++)this.transPoint(n[x],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(n in b.cells){var k=b.cells[n];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var p=this.createMxGraph();p.addCell(k);this.sanitiseGraph(p);if(0===p.getModel().getChildCount(p.getDefaultParent()))return"continue";f=this.normalizeGeo(k);p=m.prototype.processPage.call(this,p,null);d=d.concat(p);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&&
(p=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=p)){p+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var n=parseInt(f.substring(p,f.indexOf(";",p)));a:{f=this.vertexShapeMap;p=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),n);null==f.entries&&(f.entries=[]);for(var x=0;x<f.entries.length;x++)if(null!=f.entries[x].key.equals&&f.entries[x].key.equals(p)||f.entries[x].key===p){f=f.entries[x].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=
0<d.length?",":"";return d};return h}(g.mxgraph.io.mxVsdxCodec);z.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(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(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 p=null;f<=b.length&&(p=b[f-1]);var n=k=b=null,x=null,
A=null,C=null,J=null,M=null;null!=p&&(b=p.x,k=p.y,n=p.getA(),x=p.getB(),A=p.getC(),C=p.getD(),M=p.getFormulaA(),J=p.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(p=0;p<a.length;p++){var K=a[p],P=K.getAttribute("N"),R=K.getAttribute("V");switch(P){case "X":b=c.getDoubleVal(R);break;case "Y":k=c.getDoubleVal(R);break;case "A":n=c.getDoubleVal(R);M=K.getAttribute("V");break;case "B":x=c.getDoubleVal(R);break;case "C":A=c.getDoubleVal(R);break;case "D":C=c.getDoubleVal(R);
break;case "E":J=R}}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,n);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,n,x,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,n,x,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,n,x);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,
b,k,n,x,A,C,J);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,n,x,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,n,x,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,n,x);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,
b,k,n);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,n,x,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";
h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(c,a){if(null!=c){a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),
d=b.length;for(a=0;a<d;a++){var f=b.item(a),k=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(c=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),b=c.length,a=0;a<b;a++)k=c.item(a),d=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),
this.fontElementMap[d]=k}};h.prototype.getColor=function(c){var a=function(b,d){return b[d]?b[d]:null}(this.colorElementMap,c);return null==a&&(a=function(b,d){return b[d]?b[d]:null}(h.defaultColors_$LI$(),c),null==a)?"":a};h.prototype.getFont=function(c){var a=this.fontElementMap;c=a[c]?a[c]:null;return null==c?"":c};return h}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||
(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)}h.prototype.addFromCell=function(c,a){var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=
!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=b&&0!==b.length?
parseFloat(b):-1,d=!1);this.findToPart(c,d)};h.prototype.findToPart=function(c,a){c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);c=null!=c&&0!==c.length?parseFloat(c):-1;a?this.sourceToPart=c:this.targetToPart=c};h.prototype.getFromSheet=function(){return this.fromSheet};h.prototype.getSourceToSheet=function(){return this.sourceToSheet};h.prototype.getTargetToSheet=function(){return this.targetToSheet};h.prototype.getSourceToPart=function(){return this.sourceToPart};h.prototype.getTargetToPart=
function(){return this.targetToPart};h.prototype.addConnect=function(c){this.endShape=c;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)};return h}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(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(){}h.SET_VALUES_$LI$=function(){null==h.SET_VALUES&&(h.SET_VALUES=["a","b"]);return h.SET_VALUES};h.MY_SET_$LI$=function(){null==h.MY_SET&&(h.MY_SET=h.SET_VALUES_$LI$().slice(0).slice(0));return h.MY_SET};return h}();m.ANGLE="Angle";m.ARC_TO="ArcTo";m.BACKGROUND="Background";m.BACK_PAGE="BackPage";m.BEGIN_ARROW="BeginArrow";m.BEGIN_ARROW_SIZE="BeginArrowSize";m.BEGIN_X="BeginX";m.BEGIN_Y="BeginY";m.BOTTOM_MARGIN="BottomMargin";
"HideText";m.VSDX_ID="vsdxID";m.CONNECT_TO_PART_WHOLE_SHAPE=3;B.mxVsdxConstants=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(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(c,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=c&&1==c.nodeType||null===c)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),
this.processGeoElem(c);else if((null!=c&&1==c.nodeType||null===c)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),this.processGeoElem(c);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(c){try{return parseInt(c.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(c){if(null!=c&&1==c.nodeType||
null===c)return this.getIndex$org_w3c_dom_Element(c);if(void 0===c)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(c){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell");c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Row");if(null==this.rows){this.rows=[];for(var b=0;b<c.length;b++)this.rows.push(null)}for(b=0;b<a.length;b++){var d=a[b],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=
function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoLine":this.noLine=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoShow":this.noShow=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoSnap":this.noSnap=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d)}}a=this.rows.length;b=!1;for(f=0;f<c.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(c[f],
this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,p){p.compare?k.sort(function(n,x){return p.compare(n,x)}):k.sort(p)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=
function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(c,a){if(this.noShow)return"";for(var b="",d=0;d<this.rows.length;d++){var f=this.rows[d];b=b.concat(null!=f?f.handle(c,a):"")}return b};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var c=
function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){b=null!=b?b.getIndex():0;d=null!=d?d.getIndex():0;return b-d};return a}();h.mxVsdxGeometry$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(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(c){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=c){this.parentGeomList=c.geomList;var a=this.geomList;a.push.apply(a,c.geomList)}}h.prototype.addGeometry=function(c){c=new g.mxgraph.io.vsdx.mxVsdxGeometry(c,this.parentGeomList);c.getIndex()<this.geomList.length?this.geomList[c.getIndex()]=c:(this.geomList.push(c),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(c,a){a.compare?
c.sort(function(b,d){return a.compare(b,d)}):c.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var c=0;c<this.geomList.length;c++)if(!this.geomList[c].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&
!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var p=this.geomList[k];if(!p.isNoShow()){p=p.getRows();for(var n=0;n<p.length;n++){var x=
p[n];if(0==n&&null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=x.x?x.x:0,f=null!=x.y?x.y:0;else if(null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=x.x?x.x:0;x=null!=x.y?x.y:0;var C=new mxPoint(A,x);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;x=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;x+=a.y;A=Math.round(100*A)/100;x=Math.round(100*x)/100;
C.x=A;C.y=x;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),p="";0<k&&(p=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+
'" ');for(k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(f!==n.isNoFill()){var x=n.getPathXML(a,c);0!==x.length&&(n=this.getGeoStyle(n),-1===d?b.str=b.str.concat("<path"+p+">"):d!==n&&(this.closePath(b,d),b.str=b.str.concat("<path"+p+">")),b.str=b.str.concat(x),d=n)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):
2===a?c.str=c.str.concat("<fill/>"):3===a&&(c.str=c.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){return b.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(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(c,a){this.masterShape=this.Id=null;this.childShapes={};this.master=c;this.Id=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(c){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,p){return k&&k.equals?k.equals(p):k===p}(a.nodeName,"Rel")){var b=c.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),
d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,p){var n=k.length-p.length;k=k.indexOf(p,n);return-1!==k&&k===n}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,p){return k&&k.equals?k.equals(p):k===p}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},
d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(n,x){return n&&n.equals?n.equals(x):n===x}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(n,x){return n&&n.equals?n.equals(x):n===x}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),
p=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?p:this.masterShape;this.childShapes[k]=p;b||this.firstLevelShapes.push(p);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=c&&1==c.nodeType&&"Connects"==c.nodeName)for(this.connects={},d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;c=c.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};
h.prototype.getSubShape=function(c){var a=this.childShapes;return a[c]?a[c]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var c="";this.master.hasAttribute("UniqueID")&&(c=this.master.getAttribute("UniqueID"));return c};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=
m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(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(c,a,b){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=b;for(c=c.firstChild;null!=c;){if(a=null!=c&&1==c.nodeType)a=c.tagName.toLowerCase(),b=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(b):a===b;if(a){this.rootElement=c;break}c=c.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;
this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var c=!0,a=1;c;){var b=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"a:theme")){b=new g.mxgraph.io.vsdx.mxVsdxTheme(b);0>
b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var p=0;p<f.entries.length;p++)if(null!=f.entries[p].key.equals&&f.entries[p].key.equals(k)||f.entries[p].key===k)return f.entries[p].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,p){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k){f.entries[n].value=p;return}f.entries.push({key:k,
value:p,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,b.getThemeIndex(),b);break}b=b.nextSibling}a++}else c=!1}};h.prototype.initStylesheets=function(){var c=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<c.length){c=c.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=c.length,b=0;b<a;b++){var d=c.item(b),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,
this);this.stylesheets[f]=d}}for(c=function(k){var p=0;return{next:function(){return p<k.length?k[p++]:null},hasNext:function(){return p<k.length}}}(function(k){return Object.keys(k).map(function(p){return k[p]})}(this.stylesheets));c.hasNext();)d=c.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var c=function(b,d){return b[d]?b[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=
c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(c,this);this.masters[a.getId()]=a}c=c.nextSibling}break}c=c.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var c=function(k,p){return k[p]?k[p]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+
"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,p){return k&&k.equals?k.equals(p):k===p}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,p,n){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&
k.entries[x].key.equals(p)||k.entries[x].key===p){k.entries[x].value=n;return}k.entries.push({key:p,value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,p,n){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&k.entries[x].key.equals(p)||k.entries[x].key===p){k.entries[x].value=n;return}k.entries.push({key:p,value:n,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,
f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,p){null==k.entries&&(k.entries=[]);for(var n=0;n<k.entries.length;n++)if(null!=k.entries[n].key.equals&&k.entries[n].key.equals(p)||k.entries[n].key===p)return k.entries[n].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};
h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(c,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==c||0===c.length)return null;a=a.getElementsByTagName("Relationship");for(var b=0;b<a.length;b++){var d=a.item(b);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),
c))return d}return null};h.prototype.getMaster=function(c){var a=this.masters;return a[c]?a[c]:null};h.prototype.createPage=function(c){return new g.mxgraph.io.vsdx.mxVsdxPage(c,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(c){this.pm=c};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(c){this.masters=c};h.prototype.getStylesheet=function(c){var a=this.stylesheets;return a[c]?a[c]:null};
h.prototype.getXmlDoc=function(c){var a=this.xmlDocs;return a[c]?a[c]:null};h.prototype.getMedia=function(c){var a=this.media;return a[c]?a[c]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(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(c,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=c;this.layers=[];var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=b)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=b&&b.equals?b.equals(d):b===d;this.__isBackground=
d?!0:!1;b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=b&&0<b.length&&(this.backPageId=parseFloat(b));this.Id=parseFloat(c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"PageSheet");if(0<b.length){b=b[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,
"Cell");for(var f=0;f<d.length;f++){var k=d[f],p=k.getAttribute("N");this.cellElements[p]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],p=f.getAttribute("N"),"Layer"==p)for(p=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<p.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(p[f],"Cell");for(var n={},x=0;x<k.length;x++)n[k[x].getAttribute("N")]=k[x].getAttribute("V");null==n.Name&&(n.Name="Layer "+
f);this.layers[parseInt(p[f].getAttribute("IX"))]=n}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var p=new g.mxgraph.io.vsdx.mxVsdxConnect(k),n=p.getFromSheet();this.connectsMap[n]=
!0;n=null!=n&&-1<n?function(x,A){null==x.entries&&(x.entries=[]);for(var C=0;C<x.entries.length;C++)if(null!=x.entries[C].key.equals&&x.entries[C].key.equals(A)||x.entries[C].key===A)return x.entries[C].value;return null}(this.connects,n):null;null!=n?n.addConnect(k):function(x,A,C){null==x.entries&&(x.entries=[]);for(var J=0;J<x.entries.length;J++)if(null!=x.entries[J].key.equals&&x.entries[J].key.equals(A)||x.entries[J].key===A){x.entries[J].value=C;return}x.entries.push({key:A,value:C,getKey:function(){return this.key},
getValue:function(){return this.value}})}(this.connects,p.getFromSheet(),p)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Rel")?this.resolveRel(f,a,b):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};h.prototype.resolveRel=function(c,
a,b){b=a.getRelationship(c.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+b+".xml.rels");c=b.getAttribute("Target");b=b.getAttribute("Type");if(function(f,k){var p=f.length-k.length;f=f.indexOf(k,p);return-1!==f&&f===p}((new String(b)).toString(),"page")){var d=null;null!=b&&function(f,k){var p=f.length-k.length;f=f.indexOf(k,p);return-1!==f&&f===p}(b,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+c));if(null!=d)for(b=d.firstChild;null!=b;){if(null!=
b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"PageContents")){d=c.indexOf(".");-1!==d&&this.parseNodes(b,a,c.substring(0,d));break}b=b.nextSibling}}};h.prototype.parseShapes=function(c,a,b){b={};c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(c=null!=c&&0<c.length?c.item(0):null;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==k||function(n,x){return n&&n.equals?
n.equals(x):n===x}(k,"")||(f=this.model.getMaster(k))}var p=this.isEdge(d);p||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),p=f.getMasterElement(),null==k||function(n,x){return n&&n.equals?n.equals(x):n===x}(k,"")||(k=f.getSubShape(k),p=null!=k?k.getShape():p),p=this.isEdge(p));d=this.createCell(d,!p,f);(function(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=
A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),
function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginX")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndX")))return!0}c=c.nextSibling}return!1};h.prototype.getPageDimensions=function(){var c=0,a=0,b=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageWidth");null!=b&&(c=parseFloat(b.getAttribute("V"))*
g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=Math.round(100*c)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,c)};h.prototype.getDrawingScale=function(){var c=this.cellElements;c=c.DrawingScale?c.DrawingScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=function(){var c=this.cellElements;c=c.PageScale?
c.PageScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(c){var a=this.cellElements;c=a[c]?a[c]:null;return null!=c?c.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(c,a){c=this.getCellValue(c);return null!=c?parseInt(c):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=function(){return this.pageNameU};h.prototype.getShapes=
function(){return this.shapes};h.prototype.getLayers=function(){return this.layers};h.prototype.getConnects=function(){return this.connects};h.prototype.isBackground=function(){return this.__isBackground};h.prototype.getBackPageId=function(){return this.backPageId};h.prototype.setBackPage=function(c){this.backPage=c};h.prototype.getBackPage=function(){return this.backPage};return h}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(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(c){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var b=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f}};return b(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new g.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new g.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new g.mxgraph.io.vsdx.theme.LineStyle;this.fillStyles=
[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantLineIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));
return f};return b(a)}([4,4]);this.variantEffectIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantFontIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=c;this.name=c.getAttribute("name")||"";c=function(a,b){return a[b]?a[b]:
null}(h.themesIds_$LI$(),this.name);null!=c&&(this.themeIndex=c)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.themesIds_$LI$=function(){h.__static_initialize();null==h.themesIds&&(h.themesIds={});return h.themesIds};h.__static_initializer_0=function(){h.themesIds_$LI$().Office=33;h.themesIds_$LI$().Linear=34;h.themesIds_$LI$().Zephyr=35;h.themesIds_$LI$().Integral=36;h.themesIds_$LI$().Simple=37;h.themesIds_$LI$().Whisp=
38;h.themesIds_$LI$().Daybreak=39;h.themesIds_$LI$().Parallel=40;h.themesIds_$LI$().Sequence=41;h.themesIds_$LI$().Slice=42;h.themesIds_$LI$().Ion=43;h.themesIds_$LI$().Retrospect=44;h.themesIds_$LI$().Organic=45;h.themesIds_$LI$().Bubble=46;h.themesIds_$LI$().Clouds=47;h.themesIds_$LI$().Gemstone=48;h.themesIds_$LI$().Lines=49;h.themesIds_$LI$().Facet=50;h.themesIds_$LI$().Prominence=51;h.themesIds_$LI$().Smoke=52;h.themesIds_$LI$().Radiance=53;h.themesIds_$LI$().Shade=54;h.themesIds_$LI$().Pencil=
55;h.themesIds_$LI$().Pen=56;h.themesIds_$LI$().Marker=57;h.themesIds_$LI$().Whiteboard=58};h.colorIds_$LI$=function(){h.__static_initialize();null==h.colorIds&&(h.colorIds={});return h.colorIds};h.__static_initializer_1=function(){(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),
0,"dk1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),1,"lt1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===
a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),2,"accent1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),3,"accent2");
(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),4,"accent3");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=
b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),5,"accent4");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),6,"accent5");(function(c,a,b){null==
c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),7,"accent6")};h.prototype.getThemeIndex=function(){return this.themeIndex};h.prototype.setVariant=function(c){this.themeVariant=c};h.prototype.isPure=function(){return this.__isPure};h.prototype.processTheme=
function(){if(!this.isProcessed){try{for(var c=this.theme.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.nodeName,"a:themeElements"))for(var a=c.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var b=a,d=b.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processColors(b)):function(f,k){return f&&f.equals?
f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFonts(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFormats(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(b)}a=a.nextSibling}c=c.nextSibling}}catch(f){}this.isProcessed=
!0}};h.prototype.processExtras=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c[a]);switch(b.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=b.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);
break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var p=0,n=0;n<k.length;n++){var x=k[n];this.variantFillIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,
"fillIdx");this.variantLineIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"lineIdx");this.variantEffectIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"effectIdx");this.variantFontIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"fontIdx");p++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=
c[d];b.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=c[a];switch(b.nodeName){case "a:fillStyleLst":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);
for(var d=0;d<b.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(b[d]));break;case "a:lnStyleLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),d=0;d<b.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(b[d]))}}};h.prototype.processFonts=function(c){};h.prototype.processColors=function(c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var a=c,b=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=
(d=b)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(b=b.substring(2),0<a.length&&this.addBasicColor(b,a[0]))}c=c.nextSibling}};h.prototype.addVariantColors=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);if(null!=c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0,b=0;b<c.length;b++){var d=c[b];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=
function(c,a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[c]=a.hasAttribute("monotone");for(a=0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[c][0]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[c][1]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor3":this.variantsColors[c][2]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[c][3]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[c][4]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor6":this.variantsColors[c][5]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[c][6]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};h.prototype.addBkgndColor=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.bkgndColor=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c)))};
h.prototype.extractThemeIndex=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.themeIndex=parseInt(c.getAttribute("schemeEnum")))};h.prototype.addBasicColor=function(c,a){this.baseColors[c]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};h.prototype.getSchemeColor=function(c){this.processTheme();var a=this.baseColors;c=a[c]?a[c]:null;return null!=c?c.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};h.prototype.getStyleColor=function(c){this.processTheme();
if(8>c){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(h.colorIds_$LI$(),c));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===c){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var b=0;200<=c?b=c-200:
100<=c&&(b=c-100);0<=b&&6>=b&&(a=this.variantsColors[this.themeVariant][b]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};h.prototype.getFillGraientColor=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!0)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!1)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=
function(c,a){this.processTheme();var b=c.getQuickStyleFillColor(),d=null;switch(c.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[c.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(b=100),d=c.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof g.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(b,this).getGradientClr():null:
d.applyStyle(b,this):a?null:this.getStyleColor(b);b=c.getQuickStyleVariation();if(null!=a&&0<(b&8)){b=this.getStyleColor(8).toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);d=c.toHsl();var f=a.toHsl();.1666<=Math.abs(b.getLum()-f.getLum())||(.7292>=b.getLum()?a=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(b.getLum()-d.getLum())>Math.abs(b.getLum()-f.getLum())&&(a=c))}return a};h.prototype.getFillColor=function(c,a){if(!(null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||
null===c)||"boolean"!==typeof a&&null!==a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,a)};h.prototype.getLineStyle=function(c,a){this.processTheme();var b=null;switch(c){case 1:case 2:case 3:case 4:case 5:case 6:b=a[c-1];break;case 100:case 101:case 102:case 103:b=a===this.lineStyles?
this.lineStyles[this.variantLineIdx[this.themeVariant][c-100]-1]:this.defaultLineStyle}return b};h.prototype.getLineStyleExt=function(c,a){this.processTheme();var b=null;switch(c){case 0:case 1:case 2:case 3:case 4:case 5:case 6:b=a[c]}return b};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleLineColor();a=this.getLineStyle(c.getQuickStyleLineMatrix(),a);switch(c.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(b=100)}b=null!=a?a.getLineColor(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();c=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var d=c.toHsl(),f=b.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(b=c))}return b};h.prototype.getLineColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||
null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};
h.prototype.getConnLineColor=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};h.prototype.getDefaultLineClr=function(){return this.defaultLineClr};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.isDashed():
!1};h.prototype.isLineDashed=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");
};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.isConnLineDashed=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=
function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.getLineDashPattern():null};h.prototype.getLineDashPattern=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,
a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnLineDashPattern=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,
this.connLineStylesExt,this.connLineStyles)};h.prototype.getArrowSize=function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStartSize():b.getEndSize();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStartSize():c.getEndSize():4};h.prototype.getStartSize=function(c){return this.getArrowSize(c,!0,this.lineStylesExt,this.lineStyles)};h.prototype.getConnStartSize=function(c){return this.getArrowSize(c,!0,this.connLineStylesExt,this.connLineStyles)};
h.prototype.getEndSize=function(c){return this.getArrowSize(c,!1,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEndSize=function(c){return this.getArrowSize(c,!1,this.connLineStylesExt,this.connLineStyles)};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleFontColor(),d=null;switch(c.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[c.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(b=100),d=c.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}b=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=b.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var k=a.toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var p=c.toHsl();.1666<=Math.abs(d.getLum()-
f.getLum())||(.7292>=d.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):(p=Math.abs(d.getLum()-p.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(p,k,d),d==p?b=c:d==k&&(b=a)))}return b};h.prototype.getFontColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof
g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.fontColors)};h.prototype.getConnFontColor=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connFontColors)};h.prototype.getArrowType=
function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStart():b.getEnd();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStart():c.getEnd():0};h.prototype.getEdgeMarker=function(c,a){return this.getArrowType(a,c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEdgeMarker=function(c,a){return this.getArrowType(a,c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=
function(c,a){c=this.getLineStyle(c.getQuickStyleLineMatrix(),a);return null!=c?c.getLineWidth():0};h.prototype.getLineWidth=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);
throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};h.prototype.getConnLineWidth=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};return h}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(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(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(c,a){var b=[];for(c=c.firstChild;null!=c;c=c.nextSibling){var d;if(d=null!=c&&1==c.nodeType){d=a;var f=c.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&b.push(c)}return b};h.getDirectChildElements=function(c){var a=[];for(c=
c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&a.push(c);return a};h.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(c,a,b){try{var d=c.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return b};h.getIntAttr=function(c,a,b){if((null==c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||"number"!==typeof b&&null!==b){if((null==
c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(n){var x=0;return{next:function(){return x<
n.length?n[x++]:null},hasNext:function(){return x<n.length}}}(function(n){return Object.keys(n).map(function(x){return n[x]})}(c)),f=function(n){var x=0;return{next:function(){return x<n.length?n[x++]:null},hasNext:function(){return x<n.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),p=d.next();if(!function(n,x){return n&&n.equals?n.equals(x):n===x}(k,mxConstants.STYLE_SHAPE)||!function(n,x,A){void 0===A&&(A=0);return n.substr(A,x.length)===x}(c[k]?c[k]:null,"image")&&!function(n,x,A){void 0===
A&&(A=0);return n.substr(A,x.length)===x}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(n){}b=b+p+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&amp;").replace(RegExp('"',"g"),"&quot;").replace(RegExp("'","g"),"&prime;").replace(RegExp("<","g"),"&lt;").replace(RegExp(">","g"),"&gt;")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,
1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(c,a){var b="",d=b;if(a&&a.equals?a.equals(d):a===d)b=c;else for(c=c.split(""),d=0;d<c.length;d++){var f=c[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),b+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):b+=f}return b};h.getStyleMap=function(c,
a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),p=f.substring(0,k);f=f.substring(k+1);b[p]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,p,n){var x=(c-f)*(d-k)-(b-f)*(a-k);f=(c-p)*(k-n)-(f-p)*(a-n);c=(c-b)*(n-d)-(p-b)*(a-d);return!((0>x||0>f||0>c)&&(0<x||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(c);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=b}h.prototype.addText=function(c,a,b){this.values.push(c);this.charIndices.push(a);this.fields.push(b)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(c){return this.values[c]};h.prototype.numValues=
function(){return this.values.length};h.prototype.getChar=function(c){return this.charIndices[c]};h.prototype.getField=function(c){return this.fields[c]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(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(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var p=0;p<f.length;p++){var n=f[p];k=n.getAttribute("N");if(function(x,A){return x&&
x.equals?x.equals(A):x===A}(k,a))return n}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(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(c,a){this.pageNumber=0;this.pageNumber=c;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(c){return null==c||this.constructor!==c.constructor||this.pageNumber!==c.pageNumber||this.Id!==c.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(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(a,b,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=d}c.NONE_$LI$=function(){null==c.NONE&&(c.NONE=new c(-1,-1,-1));return c.NONE};c.prototype.getRed=function(){return this.red};c.prototype.setRed=function(a){this.red=a};c.prototype.getGreen=function(){return this.green};c.prototype.setGreen=function(a){this.green=a};c.prototype.getBlue=function(){return this.blue};
c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),p=(f+k)/2;if(f===k)a=k=0;else{var n=f-k;k=.5<p?n/(2-f-k):n/(f+k);a=(f===a?(b-d)/n+(b<d?6:0):f===b?(d-a)/n+2:(a-b)/n+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,p)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,
Math.min(b,d)),p=f-k;a=f===k?0:(f===a?(b-d)/p+(b<d?6:0):f===b?(d-a)/p+2:(a-b)/p+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:p/f,f)};c.decodeColorHex=function(a){a=parseInt(a,16);return new c(a>>16&255,a>>8&255,a&255)};c.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var b=this.green.toString(16);b=1==b.length?"0"+b:b;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+b+d};c.prototype.getGradientClr=function(){return this.gradientClr};c.prototype.setGradientClr=
function(a){this.gradientClr=a};return c}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(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.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new g.mxgraph.io.vsdx.theme.GradFill(a)}return b};return c}();m.FillStyleFactory=
h;h.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(B.theme||(B.theme={}))})(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(a){this.color2=this.color1=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-
1]))));null==this.color1&&(this.color1=this.color2=new g.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}c.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return c}();m.GradFill=h;h.__class="com.mxgraph.io.vsdx.theme.GradFill";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=d}c.prototype.getHue=function(){return this.hue};c.prototype.setHue=function(a){this.hue=a};c.prototype.getSat=function(){return this.sat};c.prototype.setSat=function(a){this.sat=a};c.prototype.getLum=function(){return this.lum};c.prototype.setLum=function(a){this.lum=a};c.prototype.hue2rgb=function(a,b,d){0>d&&(d+=1);1<d&&--d;return d<1/6?
a+6*(b-a)*d:.5>d?b:d<2/3?a+(b-a)*(2/3-d)*6:a};c.prototype.toRgb=function(){var a=this.hue;var b=this.sat;var d=this.lum;if(0===b)d=b=a=d;else{var f=.5>d?d*(1+b):d+b-d*b,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);b=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new g.mxgraph.io.vsdx.theme.Color(255*d|0,255*b|0,255*a|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.shade=function(a){this.lum*=
a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};c.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return c}();m.HSLColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(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(a,b,d){this.h=a;this.s=b;this.v=d}c.prototype.toRgb=function(){var a=6*this.h,b=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-b);var k=this.v*(1-f*b);b=this.v*(1-(1-f)*b);d=(d|0)%6;return new g.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,b,this.v][d]|0,255*[b,this.v,this.v,k,a,a][d]|0,255*[a,a,b,this.v,this.v,k][d]|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.v*=
1+a/100;this.v=this.clamp01(this.v);return this};c.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};c.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return c}();m.HSVColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(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(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=
this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var b=a.getAttribute("cap");if(null!=b)switch(b){case "rnd":this.lineCap=c.LineCapType.ROUND;break;case "sq":this.lineCap=c.LineCapType.SQUARE;break;case "flat":this.lineCap=c.LineCapType.FLAT}b=
a.getAttribute("cmpd");if(null!=b)switch(b){case "sng":this.lineComp=c.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=c.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=c.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=c.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=c.CompoundLineType.THIN_THICK_THIN_TRIPLE}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=
g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);
this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var p=f[k],n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,
"d");p=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"sp");this.lineDashPattern.push(n/1E4);this.lineDashPattern.push(p/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,
"w");this.headEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=
null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}c.prototype.getLineEndType=function(a){var b=null;switch(a.getAttribute("type")){case "none":b=
c.LineEndType.NONE;break;case "triangle":b=c.LineEndType.TRIANGLE;break;case "stealth":b=c.LineEndType.STEALTH;break;case "diamond":b=c.LineEndType.DIAMOND;break;case "oval":b=c.LineEndType.OVAL;break;case "arrow":b=c.LineEndType.ARROW}return b};c.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};c.prototype.isDashed=function(){return this.isLineDashed};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};c.prototype.getStartSize=
function(){return 4};c.prototype.getEndSize=function(){return 4};c.prototype.getStart=function(){return 0};c.prototype.getEnd=function(){return 0};c.prototype.getLineWidth=function(){return this.lineWidth};return c}();m.LineStyle=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(c){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(c.LineCapType||(c.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";
a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(c.CompoundLineType||(c.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(c.LineEndType||(c.LineEndType={}))})(h=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(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(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,
"startSize");this.end=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=g.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}c.prototype.getRndg=function(){return this.rndg};c.prototype.getStart=function(){return this.start};c.prototype.getStartSize=
function(){return this.startSize};c.prototype.getEnd=function(){return this.end};c.prototype.getEndSize=function(){return this.endSize};c.prototype.isDashed=function(){return 1<this.pattern};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};return c}();m.LineStyleExt=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(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.prototype.applyStyle=function(a,b){return g.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return c}();m.NoFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(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(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}c.prototype.calcColor=
function(a,b){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};c.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,b){if(this.isDynamic||!this.isInitialized)this.calcColor(a,b),this.isInitialized=!0;return this.color};c.prototype.getColor=function(a,b){if("number"!==typeof a&&null!==a||
!(null!=b&&b instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===b)){if((null!=a&&a instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===b)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};c.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};c.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};c.prototype.setShade=
function(a){this.shade=a;this.hasEffects=!0};c.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};c.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};c.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};c.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};c.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};c.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};c.prototype.setHue=function(a){this.hue=a;this.hasEffects=
!0};c.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};c.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};c.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};c.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};c.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};c.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};c.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};c.prototype.setLumMod=function(a){this.lumMod=
a;this.hasEffects=!0};c.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};c.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};c.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};c.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};c.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};c.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};c.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};c.prototype.setBlueOff=
function(a){this.blueOff=a;this.hasEffects=!0};c.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};c.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};c.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return c}();m.OoxmlColor=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(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.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),
parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":b.setTint(k);break;
case "a:shade":b.setShade(k);break;case "a:satMod":b.setSatMod(k);break;case "a:lumMod":b.setLumMod(k);break;case "a:hueMod":b.setHueMod(k)}}return b};return c}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(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(a,b,d,f,k,p,n,x,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=
p;this.quickStyleLineMatrix=n;this.quickStyleShadowColor=x;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};
c.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};c.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};c.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};c.prototype.getQuickStyleType=function(){return this.quickStyleType};c.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};c.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};c.prototype.setQuickStyleFillColor=
function(a){this.quickStyleFillColor=a};c.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};c.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};c.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};c.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};c.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};c.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};c.prototype.setQuickStyleType=
function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return c}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(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(a){this.color=null;this.color=a}c.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return c}();m.SolidFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";z.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,c,a,b){var d=h.x-b.x;h=h.y-b.y;return new mxPoint(d*c-h*a+b.x,h*c+d*a+b.y)};m.rotatedGeometry=function(h,c,a,b){c=c*Math.PI/180;var d=Math.cos(c);c=Math.sin(c);var f=h.getCenterX()-a,k=h.getCenterY()-b;h.x=Math.round(f*d-k*c+a-h.width/2);h.y=Math.round(k*d+f*c+b-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(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){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),p=Math.floor(Math.round(d.getLastX()*k)/100),n=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var x=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();x=f-x;var A=
this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=Math.abs(b-p);n=Math.abs(x-n);p=n=.5*A+(p*p+n*n)/(8*A);var C=Math.abs(n);n=Math.round(100*n/k*100)/100;p=Math.round(100*p/f*100)/100;b=Math.round(100*b/k*100)/100;x=Math.round(100*x/f*100)/100;A=Math.round(100*A)/100;n=Math.abs(n);p=Math.abs(p);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(x);return'<arc rx="'+(new String(n)).toString()+'" ry="'+(new String(p)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(x)).toString()+
'" x-axis-rotation="0" large-arc-flag="'+A+'" sweep-flag="'+f+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.ArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(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){return c.call(this,b,null,null)||this}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var p=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
n=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=b-n;var x=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=Math.abs(p-k);n=Math.abs(n-d);n=Math.sqrt(p*p+n*n);x=Math.abs(x-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(x*x+A*A)/b/2*100)/100;f=Math.round(100*n/f/2*100)/100;x=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(x)).toString()+
'" 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(x)).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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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 p=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=f-p;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
x=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;p=100*p/f;var J=d.getLastX()*k/100,M=d.getLastY()*f/100,K=b*k/100,P=p*f/100,R=f-x,H=-A;A=Math.sqrt(J*J+M*M)*Math.cos(Math.atan2(M,J)-H);x=Math.sqrt(J*J+M*M)*Math.sin(Math.atan2(M,J)-H);var I=Math.sqrt(K*K+P*P)*Math.cos(Math.atan2(P,K)-H),L=Math.sqrt(K*K+P*P)*Math.sin(Math.atan2(P,K)-H),N=Math.sqrt(n*n+R*R)*Math.cos(Math.atan2(R,n)-H),Q=Math.sqrt(n*n+R*R)*Math.sin(Math.atan2(R,n)-H),ha=((A-I)*(A+I)*(L-Q)-(I-
N)*(I+N)*(x-L)+C*C*(x-L)*(L-Q)*(x-Q))/(2*((A-I)*(L-Q)-(I-N)*(x-L))),V=((A-I)*(I-N)*(A-N)/(C*C)+(I-N)*(x-L)*(x+L)-(A-I)*(L-Q)*(L+Q))/(2*((I-N)*(x-L)-(A-I)*(L-Q))),T=A-ha,W=x-V;T=Math.sqrt(T*T+W*W*C*C);C=T/C;H=180*H/Math.PI;b=Math.round(100*b)/100;p=Math.round(100*p)/100;T=Math.round(100*T/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-J)*(R-M)-(P-M)*(n-J)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ha,V,A,x,I,L,N,Q)&&(k="1");d.setLastX(b);d.setLastY(p);return'<arc rx="'+
(new String(T)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(p)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,p,n,x,A){f-=b;k-=d;n-=d;p=x-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;p=180*(Math.atan2(n,p)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,x)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;p=(p-b)%360;180<f?f-=
360:-180>f&&(f+=360);180<p?p-=360:-180>p&&(p+=360);return(0<f&&0>p||0>f&&0<p)&&180<Math.abs(f-p)?!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,p){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;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={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,p=d.getHeight(),n=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/n*100)/100;k=Math.round(100*(100-100*k/p))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+
(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.LineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(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){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,p=d.getHeight(),n=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/n*100)/100;k=Math.round(100*(100-100*k/p))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);
d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.MoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(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,p,n,x,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var p=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.formulaE.split("NURBS(").join("");n=n.split(")").join("");
n=new a.Nurbs(this,n,k,f);if(2<=n.getSize()){var x=n.getX(0),A=n.getY(0),C=n.getX(1),J=n.getY(1);b=Math.round(100*b/k*100)/100;p=Math.round(100*(100-100*p/f))/100;x=Math.round(100*x)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;J=Math.round(100*J)/100;d.setLastX(b);d.setLastY(p);if(3===n.getDegree()&&n.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=n.getSize();for(x=0;x<A-1;x+=3)d.push(new mxPoint(n.getX(x),n.getY(x))),f.push(new mxPoint(n.getX(x+1),n.getY(x+1))),x<A-2?k.push(new mxPoint(n.getX(x+
2),n.getY(x+2))):k.push(new mxPoint(b,p));b="";for(x=0;x<d.length;x++)b+='<curve x1="'+d[x].x+'" y1="'+d[x].y+'" x2="'+f[x].x+'" y2="'+f[x].y+'" x3="'+k[x].x+'" y3="'+k[x].y+'"/>\n';return b}return'<curve x1="'+(new String(x)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(J)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(p)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";
(function(c){var a=function(){function b(d,f,k,p){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,p=Math.round(100*this.getKnot(f+1))/100,n=Math.round(100*this.getKnot(f+2))/100;if(k!==
p||k!==n||p!==n)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=
function(d){return this.nurbsValues[4*(d+1)]};b.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};b.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};b.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return b}();c.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(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){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),p=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=Math.round(100*p/k*100)/100;n=Math.round(100*(100-100*n/f))/100;var x=this.formulaA.replace(RegExp("\\s",
"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=x&&x.equals?x.equals("inh"):"inh"===x;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});x=x.split(",").slice(0).slice(0);A=parseFloat(x.splice(0,1));parseFloat(x.splice(0,1));for(var C,J;0<x.length;)C=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
J=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(J=100*J/f),J=100-J,C=Math.round(100*C)/100,J=Math.round(100*J)/100,d.setLastX(C),d.setLastY(J),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(J)).toString()+'"/>';b+='<line x="'+(new String(p)).toString()+'" y="'+(new String(n)).toString()+'"/>';d.getLastMoveX()===p&&d.getLastMoveY()===n&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class=
"com.mxgraph.io.vsdx.geometry.PolylineTo"})(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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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){b=100*this.x;var f=100-100*this.y,k=100*this.a,p=100-100*this.b,n=100*this.c,x=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;p=Math.round(100*p)/100;n=Math.round(100*
n)/100;x=Math.round(100*x)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(p)).toString()+'" x2="'+(new String(n)).toString()+'" y2="'+(new String(x)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(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){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);
m.RelMoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(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,p){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){b=100*this.x;var f=100-100*this.y,k=100*this.a,p=100-100*this.b;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;p=Math.round(100*p)/100;d.setLastX(b);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'+
(new String(p)).toString()+'" x2="'+(new String(b)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(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){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.setLastX(b);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);
m.SplineKnot=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/
100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(b);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(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(c,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=c;this.pm=a.getPropertiesManager();c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=c&&0!==c.length?parseFloat(c):-1}catch(b){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),
h.__static_initializer_1())};h.styleTypes_$LI$=function(){h.__static_initialize();null==h.styleTypes&&(h.styleTypes={});return h.styleTypes};h.__static_initializer_0=function(){h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;
h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillColor=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]=
g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineColor=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineMatrix=
g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;
h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]=
g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontColor=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};h.prototype.getTheme=function(){return null};h.prototype.getQuickStyleVals=function(){return null};h.prototype.isVertex=function(){return!1};h.prototype.styleDebug=function(c){h.vsdxStyleDebug&&console.info(c)};h.prototype.stylesheetRefs=function(c){this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=c.getStylesheet("0")};h.prototype.cacheCells=function(c){if(null!=this.shape){var a=this.shape.childNodes;
if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,c),a=a.nextSibling}};h.prototype.parseShapeElem=function(c,a){a=c.nodeName;(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"Cell")?this.cellElements[c.getAttribute("N")]=c:function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Section")&&this.parseSection(c)};h.prototype.parseSection=function(c){var a=new g.mxgraph.io.vsdx.Section(c);this.sections[c.getAttribute("N")]=a};h.prototype.hasProperty=function(c,a){return this.cellElements.hasOwnProperty(a)};
h.prototype.getValue=function(c,a){return null!=c?c.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(c,a){if(null!=c){var b=c.getAttribute("V");if(null!=b){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(b,"Themed"))return 0;try{var d=parseFloat(b);(function(f,k){return f&&f.equals?f.equals(k):f===k})(c.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=
function(c,a){if(null!=c&&(c=c.getAttribute("V"),null!=c))try{var b=parseFloat(c);return this.getScreenNumericalValue$double(b)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(c,a){if((null==c||1!=c.nodeType)&&null!==c||"number"!==typeof a&&null!==a){if("number"!==typeof c&&null!==c||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(c)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(c,a)};h.prototype.getScreenNumericalValue$double=
function(c){return c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(c,a,b){var d=this.cellElements;c=d[c]?d[c]:null;null!=c&&(b=c.getAttribute(a)||"");return b};h.prototype.getChildValues=function(c,a){var b={};for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var p=a[f]?a[f]:null;null!=
p&&(k=d.getAttribute(p)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(n,x){return n[x]?n[x]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var p=f.getAttribute("V");if(null!=d&&null!=p)if(function(n,x){return n&&n.equals?n.equals(x):n===x}(d,"Inh")&&function(n,x){return n&&n.equals?n.equals(x):n===x}(p,"Themed"))k=!0;else if(function(n,x){return n&&
n.equals?n.equals(x):n===x}(d,"THEMEVAL()")&&function(n,x){return n&&n.equals?n.equals(x):n===x}(p,"Themed")&&null!=this.style){if(function(n,x){return n&&n.equals?n.equals(x):n===x}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(n,x){return n[x]?n[x]:null}(h.styleTypes_$LI$(),b),k=function(n,x){return n[x]?n[x]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,
a,b),null!=c))return c;return f};h.prototype.getCellElement=function(c,a,b){if("string"!==typeof c&&null!==c||"string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b){if("string"!==typeof c&&null!==c||void 0!==a||void 0!==b)throw Error("invalid overload");return this.getCellElement$java_lang_String(c)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b)};h.prototype.getCellElement$java_lang_String=function(c){var a=function(k,p){return k[p]?k[p]:null}(this.cellElements,
c),b=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,p){return k&&k.equals?k.equals(p):k===p}(d,"Inh")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(f,"Themed"))b=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(f,"Themed")&&null!=this.style){if(function(k,p){return k&&k.equals?k.equals(p):k===p}("FillForegnd",c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,
c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,
c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,c))return a;d=this.style.getCellElement$java_lang_String(c);if(null!=d)return d}}if(null==a||b)if(b=function(k,p){return k[p]?k[p]:null}(h.styleTypes_$LI$(),c),b=function(k,p){return k[p]?k[p]:null}(this.styleParents,b),null!=b&&(c=b.getCellElement$java_lang_String(c),null!=c))return c;return a};h.prototype.getStrokeColor=function(){var c="";(function(a,b){return a&&a.equals?a.equals(b):a===b})(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),
"1"),"0")?c="none":(c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,b){return a&&a.equals?a.equals(b):a===b}("Themed",c)&&(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return c};h.prototype.getFillColor=function(){if(function(b,d){return b&&b.equals?b.equals(d):b===d}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),
"0"))){var c=function(b,d){return b[d]?b[d]:null}(this.sections,"FillGradient");if(null!=c&&(c=this.getColor(c.getIndexedCell("0","GradientStopColor")),null!=c&&0!==c.length))return c}c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(b,d){return b&&b.equals?b.equals(d):b===d})("Themed",c)&&(c=this.getTheme(),null!=c?(c=c.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),c=c.toHexStr()):c="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),
"0");return null!=a&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?"none":c};h.prototype.getColor=function(c){c=this.getValue(c,"");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextBkgndColor=function(c){c=this.getValue(c,"");return function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")?c:function(a,b){return a&&a.equals?
a.equals(b):a===b}(c,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"255")||0===c.length?"none":this.pm.getColor((new String(parseInt(c)-1)).toString())};h.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};h.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),
0)};h.prototype.getNameU=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};h.prototype.getName=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};h.prototype.getUniqueID=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};h.prototype.getId=function(){return this.Id};h.prototype.getTextColor=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,
c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=this.getValue(c,"#000000");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)?(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),
0)};h.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN),0)};h.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};h.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),
0)};h.prototype.getTextStyle=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextFont=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FONT,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextPos=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.POS,
c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextStrike=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=(c=this.getValue(c,""))&&c.equals?c.equals("1"):"1"===c;return c};h.prototype.getTextCase=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.CASE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
return this.getValue(c,"")};h.prototype.getHorizontalAlign=function(c,a){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(c,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};h.prototype.getIndentFirst=
function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getIndentLeft=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,
0))|0)).toString()};h.prototype.getIndentRight=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpBefore=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);
return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpAfter=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpLine=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,
c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);c=this.getValue(c,"");var a=c&&c.equals?c.equals(""):""===c;return a?0:parseFloat(c)};h.prototype.getFlags=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getLetterSpace=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,
c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getBullet=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BULLET,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getShape=function(){return this.shape};h.prototype.setShape=function(c){this.shape=c};h.lineDashPatterns_$LI$=function(){h.__static_initialize();
null==h.lineDashPatterns&&(h.lineDashPatterns=[]);return h.lineDashPatterns};h.__static_initializer_1=function(){h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);var c=[];c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);
c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.SHORT_SPACE);
h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);
c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);
c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);
c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XSHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c)};h.getLineDashPattern=function(c){return 0<=c&&23>=c?h.lineDashPatterns_$LI$()[c]:h.lineDashPatterns_$LI$()[0]};return h}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(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){var k=c.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=b/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new g.mxgraph.io.vsdx.theme.HSLColor(b,d,f)).toRgb();return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=h;h.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(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){var d=c.call(this)||this;d.val=b;d.color=new g.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=h;h.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(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){var d=c.call(this)||this;d.isDynamic=!0;d.val=b;return d}__extends(a,c);a.prototype.calcColor=function(b,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(b):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);c.prototype.calcColor.call(this,b,d)};return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=h;h.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||
(B.theme={}))})(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){var k=c.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=b;k.g=d;k.b=f;k.color=new g.mxgraph.io.vsdx.theme.Color(b,d,f);return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(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){var d=c.call(this)||this;d.hexVal=null;d.hexVal=b;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(b);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(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){var f=c.call(this)||this;f.lastClr=null;f.val=b;f.lastClr=d;if(null==d)switch(b){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(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,p,n,x){return c.call(this,b,d,f,k,p,n,x)||this}__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()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,
b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(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(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 J=A;if("rel"==J.nodeName.toLowerCase()&&(J=J.getAttribute("r:id"),null!=J&&0!==J.length)){A=C.lastIndexOf("/");var M="",K="";try{M=C.substring(0,A),K=C.substring(A,C.length)}catch(P){break}A=b.getRelationship(J,M+"/_rels"+K+".rels");
if(null!=A){C=A.getAttribute("Target")||"";J=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(P){break}return{type:J,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),p=a.getAttribute("CompressionType")||"",n=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))p=p.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))p="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"))p="png";else if("Object"==k){if(n=d(a,f),0<n.type.indexOf("/oleObject"))if(p=b.getRelationship("rId1","visio/embeddings/_rels/"+n.target+".rels"),null!=p){n=p.getAttribute("Target");k=p.getAttribute("Type");try{var x=n.lastIndexOf("/");n=n.substring(x+1,n.length)}catch(A){return}p="png";n={type:k,target:n}}else return}else return;null==n&&(n=d(a,f));k=n.type;n=n.target;null!=k&&function(A,
C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+n))?(this.imageData.iData=a,function(A,C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(n.toLowerCase(),".bmp")&&(p="jpg"),this.imageData.iType=p):(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(J,M){return J&&J.equals?J.equals(M):J===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(J,M){return J&&J.equals?J.equals(M):J===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(J,M){return J&&J.equals?J.equals(M):J===M}("1",
b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),p="",n="",x=0;x<k.length;x++){var A=k[x];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":p=A;break;case "Format":n=A}}if("esc(0)"==n)this.fields[f]=p;else if(0!==p.length){try{var C=isNaN(p)?new Date(p):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(p)));n="c"==n?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":
"m/d/yyyy h:MM:ss tt":"ddddd"==n?"m/d/yyyy":"dddddd"==n?"dddd, mmmm dd, yyyy":"C"==n?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==n?"h:MM:ss tt":n.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");p=Graph.prototype.formatDate(C,"UTC:"+n.replace(RegExp("\\{|\\}","g"),""))}catch(J){}this.fields[f]=p}}}}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)+";",p="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",n="line-height:"+this.getSpcLine(this.pp),x=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(J,M){return J&&J.equals?J.equals(M):
J===M})(C,"1")?a=a.toUpperCase():function(J,M){return J&&J.equals?J.equals(M):J===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(J,M){return J&&J.equals?J.equals(M):J===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(J,M){return J&&J.equals?J.equals(M):J===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,
"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+p+n+x+'">'+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,
"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};c.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};c.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&
d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};c.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};c.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};c.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};c.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),
"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};c.prototype.getGeomList=function(){return this.geomList};c.prototype.getLastX=function(){return this.lastX};c.prototype.getLastY=function(){return this.lastY};c.prototype.getLastMoveX=function(){return this.lastMoveX};c.prototype.getLastMoveY=function(){return this.lastMoveY};c.prototype.getLastKnot=function(){return this.lastKnot};c.prototype.setLastX=function(a){this.lastX=a};c.prototype.setLastY=function(a){this.lastY=
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 p=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),n,x,A=0;A<p.length;A++){var C=
p[A],J=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==J?n=mxUtils.format(C/d):"Y"==J&&(x=mxUtils.format(1-C/b))}null!=n&&null!=x&&a.push({x:n,y:x})}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=
(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,p){var n=this;n.masterShape=null;n.master=null;n.parentHeight=0;n=h.call(this,b,p)||this;n.htmlLabels=!0;n.rootShape=n;n.shapeName=null;n.shapeIndex=0;n.vertex=!0;n.childShapes={};var x=n.getMasterId(),A=n.getShapeMasterId();n.master=null!=x?f[x]?f[x]:null:k;null!=n.master&&(n.masterShape=null==x&&null!=A?n.master.getSubShape(A):n.master.getMasterShape());f=n.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,
k));n.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),n.childShapes=a.parseShapes(b,n.master,!1));b=n.calcRotation();n.rotation=100*b/100;n.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(n.getValue(n.getCellElement$java_lang_String("ThemeIndex"),"0")));b=function(C,J){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(J)||C.entries[M].key===
J)return C.entries[M].value;return null}(p.getThemes(),b);null==b&&(b=p.getDefaultTheme());p=a.getCellIntValue("VariationColorIndex",0);n.setThemeAndVariant(b,p);f=function(C){null==C.entries&&(C.entries=[]);return C.entries}(n.childShapes);for(k=0;k<f.length;k++)x=f[k].getValue(),x.setRootShape(n),null==x.theme&&x.setThemeAndVariant(b,p);n.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=n.masterShape?(n.masterShape.processGeomList(null),n.processGeomList(n.masterShape.getGeomList()),0===n.width&&(n.width=n.getScreenNumericalValue$org_w3c_dom_Element$double(n.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===n.height&&(n.height=n.getScreenNumericalValue$org_w3c_dom_Element$double(n.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
0))):n.processGeomList(null);n.vertex=d||!a.connectsMap[n.Id]&&null!=n.childShapes&&!function(C){null==C.entries&&(C.entries=[]);return 0==C.entries.length}(n.childShapes)||null!=n.geomList&&(!n.geomList.isNoFill()||1<n.geomList.getGeoCount());n.layerMember=n.getValue(n.getCellElement$java_lang_String("LayerMember"));n.layerMember&&(n.layerMember=n.layerMember.split(";"));return n}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};
c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=
0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===
b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
16,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==
a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===
b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
33,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<
a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:
null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),
this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow="width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var p=a.item(k);switch(p.nodeName){case "cp":b=this.getIndex(p);break;case "tp":this.getIndex(p);
break;case "pp":d=this.getIndex(p);break;case "fld":f=this.getIndex(p);break;case "#text":p=p.textContent;var n=this.paragraphs;n=n[d]?n[d]:null;null==n?(n=new g.mxgraph.io.vsdx.Paragraph(p,b,d,f),this.paragraphs[d]=n):n.addText(p,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(n,x){return n[x]?n[x]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=
0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var p=b.getField(f);null!=p&&(k=function(n,x){return n[x]?n[x]:null}(this.fields,p),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(n,x){return n[x]?n[x]:null}(this.masterShape.fields,p)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);
p&&(A="<li>"+A,p=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),p=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,p=!1;if(null!=a&&0<a.length)for(var n=0;n<a.length;n++){var x=a.item(n);(function(A,C){return A&&A.equals?A.equals(C):A===C})(x.nodeName,"cp")?this.cp=this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"tp")?this.tp=
this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"pp")?(this.pp=this.getIndex(x),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),x=this.getPPList(this.pp),p=k=null!=x,d+=k?x:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"fld")?(this.fld=this.getIndex(x),x=null,null!=this.fields&&(x=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(A,
C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=b.call(this,x))):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"#text")&&(x=x.textContent,d+=b.call(this,x))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,
d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree  tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree  tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===
f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};
c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),p=this.getLocPinX(),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=p;a-=f+(x-k);return!b||k===x/2&&p===n/2||0===this.rotation?new mxPoint(d,a):(b=n/2-p,k-=
x/2,x=Math.cos((360-this.rotation)*Math.PI/180),p=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+b-(b*x-k*p),b*p+k*x+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),
0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=
function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,
"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=
function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=
function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*
(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",
null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N");f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var p=0;p<f.length;p++){var n=f[p];if("Value"==n.getAttribute("N")){a.push({key:k,val:n.getAttribute("V")});break}}}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(p,n){return p&&p.equals?p.equals(n):p===n})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=
"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(p,n){return p&&p.equals?p.equals(n):p===n})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(p,n){return p&&p.equals?p.equals(n):p===n}(a,"")||function(p,n){return p&&p.equals?p.equals(n):p===n}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=
a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(p,n,x){void 0===x&&(x=0);return p.substr(x,n.length)===n}(function(p,n){return p[n]?p[n]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=
"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(p,n){return p&&p.equals?p.equals(n):p===n})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=
""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=
this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(p,n){return p&&p.equals?p.equals(n):p===n})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(p,n){return p&&p.equals?p.equals(n):p===n})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]=
"1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(p){console.log(p)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
a.isConnLineDashed(this.getQuickStyleVals())}else if(!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,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=
parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=
function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=
function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=
function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};
c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};
c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));
if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(d,"Organizational unit")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(f,"Organizational unit")){var 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.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
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 p="",n=0;n<b.length;n++){var x=b[n];x=x.trim();(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C})(x,"tabHeight=")&&
(p=x.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(p,"")&&(p="20");b=parseFloat(p);d=parseFloat(d);f=parseFloat(f);p=k.height;d=.1*k.width+100*d;d=new mxPoint(d,p-p*f-b/2);a.getGeometry().offset=d}else if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(d,"Domain 3D")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,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);p=k.height;d=.1*k.width+100*d;d=new mxPoint(d,p-p*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(P,R){return P&&P.equals?P.equals(R):P===R}(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(P,R){return P[R]?P[R]:null}(d,"iType"),k=function(P,R){return P[R]?P[R]:null}(d,"iData"),p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),x=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")),J=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=p||0!=n||x!=C||A!=J?this.toBeCroppedImg={imgOffsetX:p,imgOffsetY:n,imgWidth:x,imgHeight:A,width:C,height:J,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(P,R){return P&&P.equals?P.equals(R):P===R}(M,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(M);a[mxConstants.STYLE_SHAPE]=
"stencil("+K+")"}catch(P){}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,p){return k&&k.equals?k.equals(p):k===p}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,p){return k&&k.equals?k.equals(p):k===p}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,p){return k&&k.equals?k.equals(p):
k===p}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,p){return k&&k.equals?k.equals(p):k===p}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,p){return k&&k.equals?k.equals(p):k===p}(a.toLowerCase(),"width*0.5")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(b.toLowerCase(),"height*0.5")&&function(k,p){return k&&k.equals?k.equals(p):
k===p}(d.toLowerCase(),"width*1")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(f.toLowerCase(),"height*1")||!(function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(a.toLowerCase(),"width*")&&function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(b.toLowerCase(),"height*")&&function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(d.toLowerCase(),"width*")&&function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(f.toLowerCase(),"height*")||function(k,
p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(a.toLowerCase(),"controls.row_")||function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,
"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return 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,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=
function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),
0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);
if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,p=[];0<k--;)p.push(0);for(k=0;k<f.length;k++)p[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var n=new mxPoint,x=p[k+3];n.x=Math.floor(Math.round(100*(b.x+
Math.min(100,Math.abs(a.x-b.x))*p[k+2]))/100);n.y=Math.floor(Math.round(100*(b.y-100*x))/100);d.push(n)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=
b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=
b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);
this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+
b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),
"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,p){return k&&k.equals?k.equals(p):k===p}(b,"Themed")){var f=
this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,p){null==k.entries&&(k.entries=[]);for(var n=0;n<k.entries.length;n++)if(null!=k.entries[n].key.equals&&k.entries[n].key.equals(p)||k.entries[n].key===p)return k.entries[n].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,p){null==k.entries&&(k.entries=[]);for(var n=0;n<k.entries.length;n++)if(null!=
k.entries[n].key.equals&&k.entries[n].key.equals(p)||k.entries[n].key===p)return k.entries[n].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,
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),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),
f/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),p),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 J=mxUtils.clone(this.getStyleMap())||{};J[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;J[mxConstants.STYLE_STROKECOLOR]=
mxConstants.NONE;J[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;J.hasOwnProperty("align")||(J.align="center");J.hasOwnProperty("verticalAlign")||(J.verticalAlign="middle");J.hasOwnProperty("whiteSpace")||(J.whiteSpace="wrap");delete J.shape;delete J.image;this.isVerticalLabel()&&(A+=Math.PI+.01,J.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(J.rotation=""+A));J="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(J,"=");p=b.getGeometry().height-
(x+f-p);k=n-k;0<M&&(n=new mxGeometry(k,p,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(n,M,k.width/2,k.height/2),k=n.x,p=n.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*p)/100,Math.round(100*d)/100,Math.round(100*f)/100,J+";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()),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),x=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-n+k/2);a=x-p+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={}));
(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,c=[];0<h--;)c.push(0);m.IA=c}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),
c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),p=c,n=0,x=0;p<d+c;){var A=(h[p++]&255)<<16|(h[p++]&255)<<8|h[p++]&255;k[n++]=m.CA_$LI$()[A>>>18&63];k[n++]=m.CA_$LI$()[A>>>12&63];k[n++]=m.CA_$LI$()[A>>>6&63];k[n++]=m.CA_$LI$()[A&63];a&&19===++x&&n<f-2&&(k[n++]="\r",k[n++]=
"\n",x=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(n){return null==n.charCodeAt?n:n.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(n){for(var x=
[];0<n--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var p=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=p?b|=p<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);
if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<b&&0>m.IA_$LI$()[h[b].charCodeAt(0)];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b-1])?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?
C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var p=0,n=0,x=3*(f/3|0);p<x;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[p++]=A>>16|0;c[p++]=A>>8|0;c[p++]=A|0;0<k&&19===++n&&(a+=2,n=0)}if(p<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;p<f;h-=8)c[p++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=
h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,c){var a=null!=h?h.length:0;if(0===a)return[];for(var b=3*(a/
3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var p=0,n=0,x=0;p<b;)f=(h[p++]&255)<<16|(h[p++]&255)<<8|h[p++]&255,k[n++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[n++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[n++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[n++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++x&&n<d-2&&(k[n++]=13,k[n++]=10,x=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=
2===c?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var c=h.length,a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b]&255]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b]&255];)61==h[b]&&d++;b=c=(6*(c-a)>>3)-d;for(a=[];0<b--;)a.push(0);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var p=m.IA_$LI$()[h[d++]&255];0<=p?b|=p<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$byte_A=function(h){var c=h.length;if(0===
c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,p=f=(6*(f-k)>>3)-d;for(c=[];0<p--;)c.push(0);for(var n=p=0,x=3*(f/3|0);p<x;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[p++]=A>>16|0;c[p++]=A>>8|0;c[p++]=A|0;0<k&&19===++n&&(a+=2,n=0)}if(p<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;p<f;h-=8)c[p++]=A>>
h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(n){return null==n.charCodeAt?n:n.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(n){for(var x=[];0<n--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=
b=0;4>k;k++){var p=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=p?b|=p<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$java_lang_String=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))&255];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))?
61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var p=0,n=0,x=3*(f/3|0);p<x;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[p++]=A>>16|0;c[p++]=A>>
8|0;c[p++]=A|0;0<k&&19===++n&&(a+=2,n=0)}if(p<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;p<f;h-=8)c[p++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$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,p=b.dy,
n=0;n<d.length;n++)this.importEdge(d[n],c,f,k,p)}catch(V){throw console.log(V),V;}finally{a.endUpdate()}a.beginUpdate();try{var x=c.getModel().cells,A;for(A in x){var C=x[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var J=C.children[B].geometry;if(J.adjustIt){var M=c.view.getState(C),K=M.absolutePoints,P=K[0],R=K[K.length-1],H=J.x,I=J.y;k=R.x-P.x;p=R.y-P.y;var L=P.x+H*k,N=P.y+H*p,Q=Math.sqrt(k*k+p*p);k/=Q;p/=Q;L-=I*p;N+=I*k;var ha=c.view.getRelativePoint(M,L,N);J.x=ha.x;J.y=
ha.y}}}}catch(V){throw console.log(V),V;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(V){z&&z(V)}};
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=
this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[h]=a[m];else for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<c.length;y++)for(a=this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[h]=a[m]};
mxGraphMlCodec.prototype.parseAttributes=function(g,y){if(g=g.attributes)for(var z=0;z<g.length;z++){var B=g[z].nodeValue,m=this.refRegexp.exec(B),h=this.staticRegexp.exec(B);m?(B=m[1],m=this.cachedRefObj[B],m||(m={},m[this.sharedData[B].nodeName]=this.dataElem2Obj(this.sharedData[B]),this.cachedRefObj[B]=m),y[g[z].nodeName]=m):h?(y[g[z].nodeName]={},y[g[z].nodeName][h[1]]=h[2]):y[g[z].nodeName]=B}};
mxGraphMlCodec.prototype.dataElem2Obj=function(g){var y=this.getDirectFirstChildNamedElements(g,mxGraphMlConstants.GRAPHML_REFERENCE)||g.getAttribute(mxGraphMlConstants.REFID),z=null,B=g,m={};if(y){z="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[z])return this.parseAttributes(g,y),y;g=this.sharedData[z]}this.parseAttributes(g,m);for(y=0;y<g.childNodes.length;y++){var h=g.childNodes[y];if(1==h.nodeType){var c=h.nodeName;if(c==mxGraphMlConstants.X_LIST){var a=
[];h=this.getDirectChildElements(h);for(var b=0;b<h.length;b++)c=h[b].nodeName,a.push(this.dataElem2Obj(h[b]));m[c]=a}else c==mxGraphMlConstants.X_STATIC?(c=h.getAttribute(mxGraphMlConstants.MEMBER),a=c.lastIndexOf("."),m[c.substr(0,a)]=c.substr(a+1)):(a=c.lastIndexOf("."),0<a&&(c=c.substr(a+1)),null!=m[c]?(m[c]instanceof Array||(m[c]=[m[c]]),m[c].push(this.dataElem2Obj(h))):m[c]=this.dataElem2Obj(h))}else 3!=h.nodeType&&4!=h.nodeType||!h.textContent.trim()||(m["#text"]=h.textContent)}return z?(g=
{},this.parseAttributes(B,g),g[this.sharedData[z].nodeName]=m,this.cachedRefObj[z]=g):m};mxGraphMlCodec.prototype.mapArray=function(g,y,z){for(var B={},m=0;m<g.length;m++)g[m].name&&(B[g[m].name]=g[m].value||g[m]);this.mapObject(B,y,z)};
mxGraphMlCodec.prototype.mapObject=function(g,y,z){if(y.defaults)for(var B in y.defaults)z[B]=y.defaults[B];for(B in y){for(var m=B.split("."),h=g,c=0;c<m.length&&h;c++)h=h[m[c]];null==h&&g&&(h=g[B]);if(null!=h)if(m=y[B],"string"===typeof h)if("string"===typeof m)z[m]=h.toLowerCase();else if("object"===typeof m){c=h.toLowerCase();switch(m.mod){case "color":0==h.indexOf("#")&&9==h.length?c="#"+h.substr(3)+h.substr(1,2):"TRANSPARENT"==h&&(c="none");break;case "shape":c=mxGraphMlShapesMap[h.toLowerCase()];
break;case "bpmnOutline":c=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];break;case "bpmnSymbol":c=mxGraphMlShapesMap.bpmnSymbol[h.toLowerCase()];break;case "bool":c="true"==h?"1":"0";break;case "scale":try{c=parseFloat(h)*m.scale}catch(a){}break;case "arrow":c=mxGraphMlArrowsMap[h]}null!=c&&(z[m.key]=c)}else m(h,z);else h instanceof Array?this.mapArray(h,m,z):null!=h.name&&null!=h.value?this.mapArray([h],m,z):this.mapObject(h,m,z)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};
mxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,c=0;m&&m.geometry;)h+=m.geometry.x,c+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,c);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:c})};
mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(c,a){c=c.split(",");a.pos={x:c[0],y:c[1]}}},B)}y[z]=B};
mxGraphMlCodec.prototype.styleMap2Str=function(g){var y="",z="",B;for(B in g)z+=y+B+"="+g[B],y=";";return z};
mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,p=0;p<h.length;p++){var n=this.dataElem2Obj(h[p]);if(n.key)if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,n,B,m);else if(n.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=
n;else if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=n,n["yjs:StringTemplateNodeStyle"]?d=n["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,n,z);else if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=n;else if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var x=b=null;for(x in n)if("key"!=x&&"#text"!=x){if("y:ProxyAutoBoundsNode"==x){if(x=n[x]["y:Realizers"])for(var A in x)if("active"!=A&&"#text"!=A){b=x[A][x.active];n={};n[A]=b;break}}else b=
n[x];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=n;this.addNodeStyle(a,n,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(p=0;p<m.length;p++)this.importPort(m[p],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,
mxGraphMlConstants.GRAPH);for(p=0;p<g.length;p++)this.importGraph(g[p],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[c]={node:a,ports:B}};
mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(H,I){if("line"!=H){I.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),I.dashPattern=H)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",
mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,I){"true"==H&&(I.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,I){"false"==H&&(I.strokeColor="none")},
type:g},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"}};var B=mxUtils.clone(g);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(g);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var h=mxUtils.clone(g);h.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};
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 p=mxUtils.clone(g);p.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};p.inset="strokeWidth";p.radius="arcSize";p.drawShadow={key:"shadow",mod:"bool"};p.color={key:"fillColor",mod:"color",addGradient:"north"};p["color.yjs:Color.value"]=p.color;var n=mxUtils.clone(g);n.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};n.drawShadow={key:"shadow",mod:"bool"};var x=mxUtils.clone(g);x.defaults={shape:"swimlane",
startSize:20,strokeWidth:4,spacingLeft:10};x.isCollapsible={key:"collapsible",mod:"bool"};x.borderColor={key:"strokeColor",mod:"color"};x.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 J=mxUtils.clone(g);J.defaults={shape:"image"};J.image=function(H,I){I.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,I){I.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,I){"roundrectangle"==H&&(I.rounded=1,I.arcSize=5)};var P=mxUtils.clone(g);P.defaults={shape:"js:table2"};
var R=mxUtils.clone(g);R.defaults={gradientDirection:"east"};R["y:Fill"].color2={key:"gradientColor",mod:"color"};R["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":p,"yjs:ShinyPlateNodeStyle":n,"demostyle:DemoGroupStyle":x,"yjs:CollapsibleNodeStyleDecorator":A,
"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":J,"y:ShapeNode":g,"y:GenericNode":R,"y:GenericGroupNode":R,"y:TableNode":P,"y:SVGNode":M,"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))}};
mxGraphMlCodec.prototype.handleCompoundShape=function(g,y,z,B){var m=y.shape;if(m&&0==m.indexOf("js:")){switch(m){case "js:bpmnArtifactShadow":y.shadow="1";case "js:bpmnArtifact":y.shape=y.symbol;delete y.fillColor;delete y.strokeColor;delete y.gradientColor;this.handleCompoundShape(g,y,z,B);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":y.shape="note;size=16";z=z["bpmn:DataObjectNodeStyle"]||z["y:GenericNode"]||z["y:GenericGroupNode"];B={};this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType",
"com.yworks.bpmn.marker1":"marker1"}},B);if("true"==z.collection||"bpmn_marker_parallel"==B.marker1){var h=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-5,-10);g.insert(h)}if("INPUT"==z.type||"data_object_type_input"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,
2),g.insert(h);else if("OUTPUT"==z.type||"data_object_type_output"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,2),g.insert(h);break;case "js:BpmnChoreography":this.mapObject(z,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},y);h=g.geometry;h=new mxCell("",new mxGeometry(0,h.height-
20,h.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");h.vertex=!0;g.insert(h);B&&B.lblTxts&&(g.value=B.lblTxts[0],h.value=B.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":y.shape="ext;rounded=1";B={};z=z["y:GenericNode"]||z["y:GenericGroupNode"];this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3",
"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_user":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");
c.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":c=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":c=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_service":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");c.geometry.offset=new mxPoint(4,5);break;case "task_type_script":c=
new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),c.geometry.offset=new mxPoint(4,5)}c&&(c.vertex=!0,c.geometry.relative=!0,g.insert(c),c=null);var a=0;for(h=1;4>=h;h++)B["marker"+h]&&a++;z=-7.5*a-2*(a-1);for(h=1;h<=a;h++){switch(B["marker"+h]){case "bpmn_marker_closed":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_open":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");c.geometry.offset=
new mxPoint(z,-20);var b=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");b.geometry.offset=new mxPoint(-4,-1);b.geometry.relative=!0;b.vertex=!0;c.insert(b);break;case "bpmn_marker_loop":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_parallel":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_sequential":c=new mxCell("",
new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_ad_hoc":c=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");c.geometry.offset=new mxPoint(z,-17);break;case "bpmn_marker_compensation":c=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),c.geometry.offset=new mxPoint(z,-18)}c.geometry.relative=!0;c.vertex=!0;g.insert(c);
z+=20}break;case "js:table":y.shape="swimlane;collapsible=0;swimlaneLine=0";B=z["yjs:TableNodeStyle"]||z["demotablestyle:DemoTableStyle"];!B&&z["bpmn:PoolNodeStyle"]&&(B=z["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(B,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",
mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},y);y.swimlaneFillColor=y.fillColor;B=B.table["y:Table"];var d=a=0,f={x:0};z=0;(h=B.Insets)?(h=h.split(","),"0"!=h[0]?(y.startSize=h[0],f.x=parseFloat(h[0]),y.horizontal="0"):"0"!=h[1]&&(y.startSize=h[1],z=parseFloat(h[1]),d+=z)):y.startSize="0";var k={},p={Insets:function(A,C){C.startSize=A.split(",")[0]},
mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":p},k);c={};b={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",
"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var n=f.x,x=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=x,f.lx=x,d=this.addRow(a[h],g,h&1,d,f,p,k),n=Math.max(f.x,n);B=B.Columns["y:Column"];a=n;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",
POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;p=c=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?p=parseFloat(B.tblHWidth):c=parseFloat(B.tblHHeight);
y.startSize=c?c:p;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];b=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);b instanceof Array||(b=[b]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<b.length;h++)b[h]["y:Insets"]&&(k=Math.max(k,parseFloat(b[h]["y:Insets"].top)+
parseFloat(b[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,c,p,f,k,d,B),this.addTbl2Cols(g,b,c,p,f,k,d,B)):(this.addTbl2Cols(g,b,c,p,f,k,d,B),this.addTbl2Rows(g,a,c,p,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow=
mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var p={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(p.startSize)&&(p.fillColor="none",p.swimlaneLine="0");if(c){var n=f?a.headerColorAlt:a.headerColor;p.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;p.fillColor=n?n:p.swimlaneFillColor}f=parseFloat(y[d].height);n=b&&0==d?h:0;
k.geometry=new mxGeometry(B,z-n,g.geometry.width-B,f+n);z+=f;k.style=this.styleMap2Str(p);g.insert(k)}};
mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var p={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(p.startSize)&&(p.fillColor="none");if(!c){var n=f?a.headerColorAlt:a.headerColor;p.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;p.fillColor=n?n:p.swimlaneFillColor}f=parseFloat(y[d].width);n=b&&0==d?m:0;k.geometry=new mxGeometry(B-n,
z,f+n,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(p);g.insert(k)}};
mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Row"];m.lx=0;b.startSize&&
(m.lx=parseFloat(b.startSize),m.x+=m.lx);y=b=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=b,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,c),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};
mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof
Array||(g=[g]),b=0;b<g.length;b++)y=this.addColumn(g[b],a,b&1,y,m,h,c);z=Math.max(z,y);a.geometry.width=z;return B+=z};mxGraphMlCodec.prototype.handleFixedRatio=function(g,y){y=y.shape;g=g.geometry;if(y&&g)if(0<y.indexOf(";aspect=fixed"))y=Math.min(g.height,g.width),y==g.height&&(g.x+=(g.width-y)/2),g.height=y,g.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=g.height;var z=g.width;g.height=z;g.width=y;y=(y-z)/2;g.x-=y;g.y+=y}};
mxGraphMlCodec.prototype.addNodeGeo=function(g,y,z,B){var m=y[mxGraphMlConstants.RECT],h=0,c=0,a=30,b=30;m?(h=m[mxGraphMlConstants.X],c=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],b=m[mxGraphMlConstants.HEIGHT]):(h=y[mxGraphMlConstants.X_L]||h,c=y[mxGraphMlConstants.Y_L]||c,a=y[mxGraphMlConstants.WIDTH_L]||a,b=y[mxGraphMlConstants.HEIGHT_L]||b);g=g.geometry;g.x=parseFloat(h)-z;g.y=parseFloat(c)-B;g.width=parseFloat(a);g.height=parseFloat(b)};
mxGraphMlCodec.prototype.importEdge=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE),b=g.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);g=g.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];b=this.nodesMap[b];z=y.insertEdge(z,null,"",a.node,b.node,"graphMLId="+c);c={graphMlID:c};for(var f=0;f<h.length;f++){var k=
this.dataElem2Obj(h[f]),p=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(z,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(z,k,c):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(z,k,c,y):p&&(this.addEdgeStyle(z,k,c),k=this.addEdgePath(z,p["y:Path"],c,B,m),p["y:EdgeLabel"]&&this.addLabels(z,p["y:EdgeLabel"],
c,y,k),null!=c.shape&&0==c.shape.indexOf("link")&&(c.width=c.strokeWidth,c.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(c.exitX=y.pos.x,c.exitY=y.pos.y));b.ports&&g&&(y=b.ports[g],y.pos&&(c.entryX=y.pos.x,c.entryY=y.pos.y));z.style=this.styleMap2Str(c);return z};
mxGraphMlCodec.prototype.addEdgeGeo=function(g,y,z,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],h=0;h<y.length;h++){var c=y[h][mxGraphMlConstants.LOCATION];c&&(c=c.split(","),m.push(new mxPoint(parseFloat(c[0])-z,parseFloat(c[1])-B)))}g.geometry.points=m}};
mxGraphMlCodec.prototype.addEdgePath=function(g,y,z,B,m){var h=[];if(y){var c=parseFloat(y.sx),a=parseFloat(y.sy),b=parseFloat(y.tx),d=parseFloat(y.ty),f=g.source.geometry;0!=c||0!=a?(z.exitX=(c+f.width/2)/f.width,z.exitY=(a+f.height/2)/f.height,h.push(new mxPoint(f.x+z.exitX*f.width-B,f.y+z.exitY*f.height-m))):h.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));c=g.target.geometry;0!=b||0!=d?(z.entryX=(b+c.width/2)/c.width,z.entryY=(d+c.height/2)/c.height,z=new mxPoint(c.x+z.entryX*c.width-B,c.y+
z.entryY*c.height-m)):z=new mxPoint(c.x+c.width/2-B,c.y+c.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);b=[];for(d=0;d<y.length;d++)c=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),b.push(c),h.push(c);g.geometry.points=b}h.push(z)}return h};
mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),b.dashPattern=a)};var B=function(a,b){b.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,b){b.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"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 p=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},n=function(K,P){K&&(K=K.toUpperCase());var R=P.fontStyle||0;switch(K){case "ITALIC":R|=2;break;case "BOLD":R|=1;break;case "UNDERLINE":R|=4}P.fontStyle=R};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,P){K&&(P.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
fontSize:"fontSize",fontStyle:n,fontWeight:n,textDecoration:n}},"Style.y:VoidLabelStyle":function(K,P){P.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:n,underlinedText:function(K,P){var R=P.fontStyle||0;"true"==K&&(R|=4);P.fontStyle=R},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(p))}}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/>");p=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,p.width,p.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"])p=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=p.width,h.height=p.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=p.height,h.height=p.width,h.y=p.height/2-p.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=p.height,h.height=p.width,h.y=p.height/2-p.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=p.height,h.height=p.width,h.y=p.height/2-p.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;p=a[b]["y:FreeEdgeLabelModelParameter"];
d=p.Ratio;n=p.Distance;var x=p.Angle;d&&(h.x=parseFloat(d));n&&(h.y=parseFloat(n));x&&(f.style+=";rotation="+parseFloat(x)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;p=a[b]["y:EdgePathLabelModelParameter"];k=p.SideOfEdge;d=p.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(p=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"]){p=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];x=parseFloat(p.angle);n=parseFloat(p.distance);var A=p.position;d=parseFloat(p.ratio);p=parseFloat(p.segment);var C=
new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var J="left"==A?1:-1;if(-1==p&&6.283185307179586==x)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,J*n);else{-1==p&&(p=0);for(var M=x=0;M<p;M++)x+=C.segments[M];x+=C.segments[p]*d;h.x=x/C.length*2-1;h.y=(("center"==A?0:n)+h.height/2*J*(Math.abs(f)>Math.abs(k)?1:-1))*J}}else isNaN(p)||isNaN(d)||(h.offset=new mxPoint(p+f/2+(0<f?-h.width:h.width),d));else h.x=p||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,
y){return"string"===typeof g&&17<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):g},"orgchartconverters.overviewconverter":function(g,y){return"string"===typeof g&&0<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open",
EditorUi.prototype.doImportGraphML=function(g,y,z){(new mxGraphMlCodec).decode(g,y,z)};/*!
	this.actions.get('group').setEnabled((ss.cells.length > 1 ||
		(ss.vertices.length == 1 && graph.model.getChildCount(ss.cells[0]) == 0 &&
		keyHandler.bindAction(90, true, 'redo', true); // Ctrl+Shift+Z
		keyHandler.bindAction(89, true, 'redo'); // Ctrl+Y
	var count = this.addActions(div, ['group', 'ungroup']) +
		this.addActions(div, ['removeFromGroup']);

		count += this.addActions(div, ['copySize', 'pasteSize', 'swap']);
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.3",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b,c){b=null!=b?b:!1;var d=null;if(null!=a)for(var e=0;e<a.length;e++)if(b||this.model.isVertex(a[e])){var f=this.getCellGeometry(a[e]);if(null!=f){var g=null;if(this.model.isEdge(a[e])){g=function(m){null!=m&&(null==k?k=new mxRectangle(m.x,m.y,0,0):k.add(new mxRectangle(m.x,m.y,0,0)))};null==this.model.getTerminal(a[e],!0)&&g(f.getTerminalPoint(!0));null==this.model.getTerminal(a[e],!1)&&g(f.getTerminalPoint(!1));f=f.points;if(null!=f&&0<f.length)for(var k=
new mxRectangle(f[0].x,f[0].y,0,0),l=1;l<f.length;l++)g(f[l]);g=k}else l=this.model.getParent(a[e]),f.relative?this.model.isVertex(l)&&l!=this.view.currentRoot&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g=new mxRectangle(f.x*k.width,f.y*k.height,f.width,f.height),0<=mxUtils.indexOf(null!=c?c:a,l)&&(g.x+=k.x,g.y+=k.y))):(g=mxRectangle.fromRectangle(f),this.model.isVertex(l)&&0<=mxUtils.indexOf(null!=c?c:a,l)&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g.x+=
k.x,g.y+=k.y))),null!=g&&null!=f.offset&&(g.x+=f.offset.x,g.y+=f.offset.y),f=this.getCurrentCellStyle(a[e]),null!=g&&(f=mxUtils.getValue(f,mxConstants.STYLE_ROTATION,0),0!=f&&(g=mxUtils.getBoundingBox(g,f)));null!=g&&(null==d?d=mxRectangle.fromRectangle(g):d.add(g))}}return d};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};
mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();a=b.getEvent();var c=mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)&&!this.graph.isSelectionEmpty();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null!=b.getState()||c)&&!mxEvent.isMultiTouchEvent(a)){var d=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(d,b);this.cell=null;null==d&&c&&(d=this.graph.getSelectionCell());this.isSelectEnabled()&&!this.delayedSelection&&
this.graph.selectCellForEvent(d,a);this.isMoveEnabled()&&(this.delayedSelection?this.cell=d:this.start(d,b.getX(),b.getY()),this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b))}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
b.cells.length);this.actions.get("group").setEnabled(1<b.cells.length||1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0]));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&
(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("copyData").setEnabled(1==b.cells.length);this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("editStyle").setEnabled(1==b.cells.length);this.actions.get("editTooltip").setEnabled(1==
!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(90,!0,"redo",!0),g.bindAction(89,!0,"redo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,
!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"format",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(109,!0,"decreaseFontSize",!0),g.bindAction(107,!0,"increaseFontSize",!0),g.bindAction(219,!0,"decreaseFontSize",!0),g.bindAction(221,!0,"increaseFontSize",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),
g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){f.isEnabled()&&f.startEditingAtCell()});return g};
ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var e=this.addActions(a,["group","ungroup"])+this.addActions(a,["removeFromGroup"]);b.cell||b.row||(e+=this.addActions(a,["copySize","pasteSize","swap"]));b=this.addAction(a,"clearWaypoints");null!=b&&(mxUtils.br(a),b.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),
e++);e+=this.addActions(a,["lockUnlock"]);0==e&&(a.style.display="none");return a};
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,m,d){d.ui=g.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.6.3";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
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,l){function p(A){return"simple"==A||0==e&&"sketch"==A}e=null!=e?e:150;var n=Editor.currentTheme,t=p(n)&&this.isDefaultTheme(c)||this.isDefaultTheme(n)&&p(c),y=t&&"sketch"!=c&&"sketch"!=n;t&&!this.themeSwitching&&(Editor.currentTheme=
c,this.themeSwitching=!0,mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms ease-in-out"),0==e&&(this.container.style.opacity="0"),window.setTimeout(mxUtils.bind(this,function(){var A=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){p(n)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",this.tabContainer.style.display="flex",this.hsplit.style.display=
this.editor.graph.refresh();this.restoreScrollState(A);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&p(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=l&&l()}),e)}),e)}),e)}),0));return y};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,e=this.diagramContainer.scrollLeft,
l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(e-=this.embedViewport.x,l-=this.embedViewport.y):(e+=this.embedViewport.x,l+=this.embedViewport.y));return{x:e,y:l,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var e=this.editor.graph.view.scale,l=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*e;this.diagramContainer.scrollTop=c.y+(l.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&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||e||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var p=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?
this.statusContainer.firstChild:null;e=null!=p&&null!=p.getAttribute("class");if(!e&&null!=p){p=p.getAttribute("title");var n=this.getCurrentFile();n=null!=n?n.savingStatusKey:DrawioFile.prototype.savingStatusKey;p==mxResources.get(n)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(n))+'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";p=32>=c.clientWidth;c.style.visibility=p&&""==this.editor.getStatus()?"hidden":
"";if(p||e)this.statusContainer.style.display="inline-flex",e=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);
this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display="";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var e=Editor.enableCustomLibraries&&("1"!=urlParams.embed||
"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px";this.sidebarContainer.style.bottom=e?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,
this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.setVisible(!1)};
EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=
this.menus&&(null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var e=this.editor.graph;e.defaultEdgeLength=
Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=Graph.prototype.defaultGridEnabled;e.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);"simple"==c||"sketch"==c?(Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):Editor.fitWindowBorders=null};EditorUi.prototype.switchCssForTheme=function(c){"simple"==c||
"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"simple"==c||"sketch"==c?(null==this.sketchWrapperElt&&
(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),"sketch"==c&&(this.sketchWrapperElt.className="geSketch"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),
this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.style.cssText="position:absolute;padding:9px 12px;overflow:hidden;white-space:nowrap;user-select:none;box-sizing:border-box;";var e=this.createMenu("simple"==c?"view":"diagram","simple"==c?Editor.thinViewImage:Editor.menuImage);this.sketchMainMenuElt.appendChild(e);
"simple"==c?(this.sketchMainMenuElt.className="geToolbarContainer geSimpleMainMenu",this.sketchMainMenuElt.style.display="flex",this.sketchMainMenuElt.style.height="52px",this.sketchMainMenuElt.style.justifyContent="start",this.sketchMainMenuElt.style.alignItems="center",this.sketchMainMenuElt.style.top="0px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.sketchMainMenuElt.style.gap="10px",e.style.flexShrink="0",e.style.opacity="0.7"):(this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",
Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.borderRadius="4px",this.sketchMainMenuElt.style.height="44px",this.sketchMainMenuElt.style.left="10px",this.sketchMainMenuElt.style.top="10px",this.sketchMainMenuElt.style.zIndex="1");this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};
EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.createFooterMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";var e=this.sketchFooterMenuElt;if("simple"!=c){var l=this.createPageMenuTab(!1,"simple"!=c);l.className="geToolbarButton geAdaptiveAsset";
l.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px 16px 4px 4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;background-position:right 0px top 8px;background-repeat:no-repeat;background-size:13px;background-image:url("+mxWindow.prototype.minimizeImage+");";e.appendChild(l);var p=mxUtils.bind(this,function(){l.innerText="";if(null!=this.currentPage){mxUtils.write(l,this.currentPage.getName());var C=null!=this.pages?this.pages.length:1,V=this.getPageIndex(this.currentPage);
V=null!=V?V+1:1;var O=this.currentPage.getId();l.setAttribute("title",this.currentPage.getName()+" ("+V+"/"+C+")"+(null!=O?" ["+O+"]":""))}});this.editor.addListener("pagesPatched",p);this.editor.addListener("pageSelected",p);this.editor.addListener("pageRenamed",p);this.editor.addListener("fileLoaded",p);p();var n=mxUtils.bind(this,function(){l.style.display=this.isPageMenuVisible()?"inline-block":"none"});this.addListener("editInlineStart",mxUtils.bind(this,function(){n();p()}));this.addListener("fileDescriptorChanged",
n);this.addListener("pagesVisibleChanged",n);this.editor.addListener("pagesPatched",n);n();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage))}var t=this.createMenu("viewZoom",null,"geToolbarButton geAdaptiveAsset");t.setAttribute("title",mxResources.get("zoom"));t.innerHTML="100%";t.style.cssText="display:inline-flex;align-items:center;position:relative;padding:4px;box-shadow:none;width:40px;justify-content:center;cursor:pointer;";"simple"==c?(t.style.borderStyle="solid",t.style.borderWidth=
"1px",t.style.borderRadius="4px",t.style.fontSize="11px",t.style.fontWeight="500",t.style.paddingTop="4px",t.style.paddingRight="14px",t.style.backgroundImage="url("+Editor.thinExpandImage+")",t.style.backgroundPosition="right 0px center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="18px",t.style.opacity="0.7",t.style.height="12px"):(t.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")",t.style.backgroundPosition="right 0px top 8px",t.style.backgroundRepeat="no-repeat",
t.style.backgroundSize="13px",t.style.paddingRight="16px",t.style.marginRight="-4px");e.appendChild(t);if("simple"==c){var y=this.createMenu("pages",Editor.thinNoteImage);y.style.backgroundSize="24px";y.style.display="inline-block";y.style.width="24px";y.style.height="30px";y.style.opacity="0.7";e.appendChild(y);var A=this.createMenuItem("undo",Editor.thinUndoImage);A.style.marginLeft="auto";A.style.flexShrink="0";A.style.opacity="0.7";e.appendChild(A);A=this.createMenuItem("redo",Editor.thinRedoImage);
A.style.marginLeft="0px";A.style.flexShrink="0";A.style.opacity="0.7";e.appendChild(A);A=mxUtils.bind(this,function(){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;y.style.display=480>C?"none":"";t.style.display=750>C?"none":"inline-flex"});mxEvent.addListener(window,"resize",A);A()}mxUtils.bind(this,function(C){mxEvent.addListener(C,"click",mxUtils.bind(this,function(O){mxEvent.isAltDown(O)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
mxEvent.consume(O)):mxEvent.isShiftDown(O)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(O))}));var V=mxUtils.bind(this,function(O,L,P){C.innerText="";mxUtils.write(C,Math.round(100*this.editor.graph.view.scale*(null!=P?P:1))+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,V);this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",V);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(O,L){V(O,L,L.getProperty("factor"))}))})(t);
"simple"!=c&&e.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var G=this.createMenuItem("fullscreen",Editor.fullscreenImage);e.appendChild(G);A=mxUtils.bind(this,function(){G.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",mxUtils.bind(this,function(){G.style.backgroundImage="url("+(Editor.inlineFullscreen?
Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",A);e.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==c?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;display:flex;text-align:right;user-select:none;box-sizing:border-box;",
this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt))}};EditorUi.prototype.createPickerMenuForTheme=function(c){if(("simple"==c||"sketch"==c)&&null==this.sketchPickerMenuElt){var e=this.editor.graph;this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";var l=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(l.style,"transition","transform .3s ease-out");var p=document.createElement("a");p.style.padding="0px";p.style.boxShadow="none";
p.className="geMenuItem geAdaptiveAsset";p.style.display="simple"==c?"inline-block":"block";p.style.width="100%";p.style.height="14px";p.style.margin="4px 0 2px 0";p.style.backgroundImage="url("+Editor.expandMoreImage+")";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="22px";mxUtils.setOpacity(p,40);p.setAttribute("title",mxResources.get("collapseExpand"));var n=p.style.margin,t=this.createMenuItem("insertFreehand","simple"==c?Editor.thinGestureImage:
Editor.freehandImage,!0);t.style.paddingLeft="simple"==c?"0px":"12px";t.style.backgroundSize="24px";t.style.width="26px";t.style.height="30px";t.style.opacity="0.7";var y=this.createMenu("insert","simple"==c?Editor.thinAddCircleImage:Editor.addBoxImage);y.style.backgroundSize="24px";y.style.display="simple"==c?"inline-block":"block";y.style.flexShrink="0";y.style.width="30px";y.style.height="30px";y.style.padding="simple"==c?"0px":"4px 4px 0px 4px";y.style.opacity="0.7";var A=this.createMenu("table",
Editor.thinTableImage);A.style.backgroundSize="24px";A.style.padding="simple"==c?"0px":"4px 4px 0px 4px";A.style.display="inline-block";A.style.width="30px";A.style.height="30px";A.style.opacity="0.7";var G=y.cloneNode(!0);G.style.backgroundImage="url("+("simple"==c?Editor.thinShapesImage:Editor.shapesImage)+")";G.style.backgroundSize="24px";G.setAttribute("title",mxResources.get("shapes"));mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){if(this.isShapePickerVisible())this.hideShapePicker();
else{var T=mxUtils.getOffset(G);Editor.inlineFullscreen||null==this.embedViewport?"simple"==c?(T.x-=this.diagramContainer.offsetLeft+30,T.y+=G.offsetHeight-19):(T.x+=G.offsetWidth+28,T.y+=20):(T.x=0,T.y=G.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,T.x)),this.diagramContainer.scrollTop+T.y,null,null,null,null,mxUtils.bind(this,function(f){return e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(f,!0))}),"simple"==c,!1)}mxEvent.consume(P)}));y.style.backgroundSize=
"24px";"simple"==c?y.style.flexShrink="0":y.style.marginBottom="4px";var C=!1,V=mxUtils.bind(this,function(P){if(P||document.body.contains(l)){P=function(D,E,M,k,x,F){null!=E&&D.setAttribute("title",E);D.style.cursor="pointer";D.style.margin="simple"==c?"0px":"8px 0px 8px 2px";D.style.display="simple"==c?"inline-block":"block";l.appendChild(D);"simple"==c?D.style.opacity="0.7":null!=k&&(E=x,E=null!=E?E:30,F=null!=F?F:26,D.style.position="relative",D.style.overflow="visible",M=document.createElement("div"),
M.style.position="absolute",M.style.fontSize="8px",M.style.left=E+"px",M.style.top=F+"px",mxUtils.write(M,k),D.appendChild(M));return D};l.innerText="";if(!C){var T=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==c&&(this.sidebar.graph.cellRenderer.minSvgStrokeWidth=.9);var f="simple"==c?"0px":"4px 0px 6px 2px";if("simple"!=c||660<=T){var u=this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,"simple"!=c,null,38,38,"simple"==c?Editor.thinTextImage:null,!0);"simple"==c&&(u.className="geToolbarButton",u.style.opacity="0.7");P(u,mxResources.get("text")+" (A)",null,"A",32).style.margin="simple"==c?"0 -8px 0 0":"0 0 0 -2px"}u=this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=c,null,28,28,"simple"==c?Editor.thinRectangleImage:null);"simple"==c?(600<=T&&
(u.className="geToolbarButton",u.style.opacity="0.7",P(u,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=T&&this.sketchPickerMenuElt.appendChild(G),440<=T&&P(t,mxResources.get("freehand")+" (X)",null,"X"),500<=T&&this.sketchPickerMenuElt.appendChild(A)):(P(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0,null,28,28),mxResources.get("note")+" (S)",null,"S").style.margin=f,P(u,mxResources.get("rectangle")+" (D)",null,"D").style.margin=f,P(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0,null,28,28),mxResources.get("ellipse")+" (F)",null,"F").style.margin=f,f=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),
f.geometry.setTerminalPoint(new mxPoint(0,0),!0),f.geometry.setTerminalPoint(new mxPoint(f.geometry.width,0),!1),f.geometry.points=[],f.geometry.relative=!0,f.edge=!0,P(this.sidebar.createEdgeTemplateFromCells([f],f.geometry.width,f.geometry.height,mxResources.get("line")+" (C)",!0,null,"simple"!=c,!1,null,28,28),mxResources.get("line")+" (C)",null,"C").margin="1px 0px 1px 2px",f=f.clone(),f.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;",
f.geometry.width=this.editor.graph.defaultEdgeLength+20,f.geometry.setTerminalPoint(new mxPoint(0,20),!0),f.geometry.setTerminalPoint(new mxPoint(f.geometry.width,20),!1),P(this.sidebar.createEdgeTemplateFromCells([f],f.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1,null,28,28),mxResources.get("arrow")).style.margin="1px 0px 1px 2px",P(t,mxResources.get("freehand")+" (X)",null,"X"),this.sketchPickerMenuElt.appendChild(G));("simple"!=c||320<T)&&this.sketchPickerMenuElt.appendChild(y)}"simple"!=
c&&"1"!=urlParams.embedInline&&l.appendChild(p);this.sidebar.graph.cellRenderer.minSvgStrokeWidth=this.sidebar.minThumbStrokeWidth}});mxEvent.addListener(p,"click",mxUtils.bind(this,function(){C?(mxUtils.setPrefixedStyle(l.style,"transform","translate(0, -50%)"),l.style.padding="0px 4px 4px",l.style.width="48px",l.style.top="50%",l.style.bottom="",l.style.height="",p.style.backgroundImage="url("+Editor.expandMoreImage+")",p.style.width="100%",p.style.height="14px",p.style.margin=n,C=!1,V()):(l.innerText=
"",l.appendChild(p),mxUtils.setPrefixedStyle(l.style,"transform","translate(0, 0)"),l.style.width="auto",l.style.bottom="12px",l.style.padding="0px",l.style.top="",p.style.backgroundImage="url("+Editor.expandLessImage+")",p.style.width="24px",p.style.height="24px",p.style.margin="0px",C=!0)}));var O=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,L=null;mxEvent.addListener(window,"resize",function(){var P=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth;P!=O&&(O=P,null!=L&&window.clearTimeout(L),L=window.setTimeout(function(){L=null;V()},200))});this.editor.addListener("fileLoaded",V);this.addListener("sketchModeChanged",V);this.addListener("currentThemeChanged",V);Editor.enableCssDarkMode||this.addListener("darkModeChanged",V);V(!0);"simple"==c?(this.sketchPickerMenuElt.style.cssText="position:relative;white-space:nowrap;user-select:none;display:flex;align-items:center;justify-content:flex-end;flex-grow:1;gap:6px;flex-shrink:0;",
this.sketchMainMenuElt.appendChild(this.sketchPickerMenuElt)):(this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;z-index:1;width:48px;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;",this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt));mxClient.IS_POINTER&&(this.sketchPickerMenuElt.style.touchAction="none")}};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=
mxResources.get("offline");else{var e=this.getCurrentFile();null!=e&&(e.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==e.sync||e.sync.enabled&&e.sync.isRealtimeActive()?null==e.sync||e.sync.isConnected()?e.isRealtimeEnabled()&&e.isRealtimeSupported()&&1<e.getRealtimeState()&&(c=e.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+
": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){if("simple"==c||"sketch"==c){if(null==this.sketchMenubarElt){this.sketchMenubarElt=document.createElement("div");this.sketchMenubarElt.className="geToolbarContainer";if("simple"==c){this.sketchMenubarElt.style.cssText="position:relative;flex-grow:0.5;overflow:visible;"+("1"!=urlParams.embed?"flex-shrink:0;":"min-width:0;")+"display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;";
null==this.commentElt&&(this.commentElt=this.createMenuItem("comments",Editor.thinCommentImage,!0),this.commentElt.style.paddingLeft="0px",this.commentElt.style.backgroundSize="24px",this.commentElt.style.width="26px",this.commentElt.style.height="30px",this.commentElt.style.opacity="0.7");if(null==this.shareElt&&"1"!=urlParams.embed&&"draw.io"==this.getServiceName())if(this.shareElt=this.createMenu("share",Editor.thinUserAddImage),this.shareElt.style.backgroundSize="24px",this.shareElt.style.display=
"inline-block",this.shareElt.style.flexShrink="0",this.shareElt.style.width="24px",this.shareElt.style.height="30px",this.shareElt.style.opacity="0.7",this.isStandaloneApp())this.shareElt.style.backgroundImage="url("+Editor.thinShareImage+")";else{var e=mxUtils.bind(this,function(){var p=mxResources.get("share"),n=Editor.thinUserAddImage,t=this.getNetworkStatus();null!=t&&(p=p+" ("+t+")",n=Editor.thinUserFlashImage);this.shareElt.style.backgroundImage="url("+n+")";this.shareElt.setAttribute("title",
p)});this.addListener("realtimeStateChanged",e);this.editor.addListener("statusChanged",e);mxEvent.addListener(window,"offline",e);mxEvent.addListener(window,"online",e);e()}null==this.mainMenuElt&&(this.mainMenuElt=this.createMenu("diagram",Editor.thinMenuImage),this.mainMenuElt.style.backgroundSize="24px",this.mainMenuElt.style.display="inline-block",this.mainMenuElt.style.flexShrink="0",this.mainMenuElt.style.width="24px",this.mainMenuElt.style.height="30px",this.mainMenuElt.style.opacity="0.7");
if(null==this.formatElt){this.formatElt=this.createMenuItem("format",Editor.thinDesignImage,!0);this.formatElt.style.backgroundSize="24px";this.formatElt.style.marginLeft="1"!=urlParams.embed?"auto":"0";this.formatElt.style.flexShrink="0";this.formatElt.style.width="20px";this.formatElt.style.opacity="0.7";var l=this.formatElt.className+" geToggleItem";this.formatElt.className=l+(0==this.formatWidth?"":" geActiveItem");this.addListener("formatWidthChanged",function(){this.formatElt.className=l+(0==
this.formatWidth?"":" geActiveItem")})}}else this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;overflow:hidden;user-select:none;max-width:calc(100% - 170px);box-sizing:border-box;justify-content:flex-end;z-index:1;padding:7px 12px;display:flex;white-space:nowrap;user-select:none;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;",this.sketchWrapperElt.appendChild(this.sketchMenubarElt);"1"!=urlParams.embedInline&&(e=mxUtils.bind(this,
function(){if("sketch"==Editor.currentTheme){var p=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=p?"70px":"10px";this.sketchMenubarElt.style.maxWidth=p?"calc(100% - 230px)":"calc(100% - 170px)"}else"simple"==Editor.currentTheme&&(p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,null!=this.commentElt&&(this.commentElt.style.display=560<p&&this.commentsSupported()?"":"none"),null!=this.shareElt&&(this.shareElt.style.display=
360<p?"":"none"))}),e(),mxEvent.addListener(window,"resize",e),this.editor.addListener("fileLoaded",e));"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)}"simple"==c&&(null!=this.buttonContainer&&(this.buttonContainer.style.padding="0px",this.sketchMenubarElt.appendChild(this.buttonContainer),null!=this.formatElt&&"1"==urlParams.embed&&(this.formatElt.style.marginLeft="")),null!=this.commentElt&&this.sketchMenubarElt.appendChild(this.commentElt),
null!=this.shareElt&&this.sketchMenubarElt.appendChild(this.shareElt),this.sketchMenubarElt.appendChild(this.mainMenuElt),this.sketchMenubarElt.appendChild(this.formatElt));null!=this.statusContainer&&(this.statusContainer.style.flexGrow="1",this.statusContainer.style.flexShrink="1",this.statusContainer.style.marginTop="0px","simple"!=c?this.sketchMenubarElt.appendChild(this.statusContainer):(this.statusContainer.style.justifyContent="center",this.statusContainer.style.width="22%"));"simple"!=c&&
null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement));e=this.menubar.langIcon;null!=e&&(e.style.position="",e.style.height="21px",e.style.width="21px",e.style.flexShrink="0",e.style.opacity="0.7",this.sketchMenubarElt.appendChild(e));"simple"==c?(this.sketchMainMenuElt.appendChild(this.statusContainer),this.sketchMainMenuElt.appendChild(this.sketchMenubarElt)):null!=this.buttonContainer&&(this.buttonContainer.style.padding=
"0px",this.sketchMenubarElt.appendChild(this.buttonContainer))}else null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="",this.menubar.container.appendChild(this.statusContainer)),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&
(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.flexShrink="",e.style.opacity="",this.menubarContainer.parentNode.insertBefore(e,this.menubarContainer)),null!=this.buttonContainer&&(this.buttonContainer.style.display="",this.buttonContainer.style.padding="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,e,l,p){l=null!=l?l:"geToolbarButton";var n=this.menus.get(c);p=this.menubar.addMenu(mxResources.get(c),n.funct,
null,p);p.className=l;p.style.display="inline-block";p.style.cursor="pointer";p.style.height="24px";p.setAttribute("title",mxResources.get(c));this.menus.menuCreated(n,p,l);null!=e&&(p.style.backgroundImage="url("+e+")",p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="100% 100%",p.style.width="24px",p.innerText="");return p};EditorUi.prototype.createToolbarButton=function(c,e,l,p){p=null!=p?p:24;var n=document.createElement("a");n.className="geToolbarButton geAdaptiveAsset";
n.setAttribute("title",e);n.style.backgroundImage="url("+c+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width=p+"px";n.style.height=p+"px";null!=l&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(n,"click",function(t){"disabled"!=n.getAttribute("disabled")&&
l(t);mxEvent.consume(t)}));return n};EditorUi.prototype.createMenuItem=function(c,e,l){var p=this.actions.get(c),n=null!=p?p.funct:null,t=this.createToolbarButton(e,mxResources.get(c)+(null!=p&&null!=p.shortcut?" ("+p.shortcut+")":""),n);null==p||l||(c=function(){p.isEnabled()?(t.removeAttribute("disabled"),t.style.cursor="pointer"):(t.setAttribute("disabled","disabled"),t.style.cursor="default");t.style.opacity=p.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),p.addListener("stateChanged",
c),c());return t};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,e,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));
var l=this.formatWindow.window.toggleMinimized,p=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(p=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+p-140+"px"):(this.div.style.width=p+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-p+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,
"dblclick",mxUtils.bind(this,function(n){mxEvent.getSource(n)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};
var B=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):B.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){var e=EditorUi.prototype.hsplitPosition;0==e&&(e=134);var l=this.hsplitPosition,p=mxUtils.bind(this,function(){this.hsplitPosition=n;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),n=c?e:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transform",0==n?"translateX(0)":"translateX(-100%)");0!=n&&p();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==n?"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==n&&p()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var K=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():K.apply(this,arguments)};var J=EditorUi.prototype.refresh;EditorUi.prototype.refresh=
function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var e=this.container.clientWidth;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var l=this.getDiagramContainerOffset();var p=l.x;var n=l.y;"simple"==Editor.currentTheme&&(n+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=n+"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,e=Math.max(0,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,e-this.splitSize-40))),this.sidebarContainer.style.width=e+"px",this.diagramContainer.style.left=e+p+"px",this.tabContainer.style.left=e+"px",this.tabContainer.style.right=this.formatWidth+
"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=e+"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=l.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else J.apply(this,
arguments)};EditorUi.prototype.createShapesPanel=function(c){var e=mxUtils.bind(this,function(p){p=this.createMenu(p,null,"geTitle");p.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;";c.appendChild(p);return p});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))e=
document.createElement("div"),e.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;",e.className="geTitle",mxUtils.write(e,mxResources.get("newLibrary")),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("newLibrary").funct),e=e.cloneNode(!1),e.style.left="50%",e.style.borderLeftStyle="solid",mxUtils.write(e,mxResources.get("openLibrary")),
c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("openLibrary").funct);else{var l=e("newLibrary");l.style.fontSize="11px";l.style.left="0";l=e("openLibraryFrom");l.style.borderLeftStyle="solid";l.style.fontSize="11px";l.style.left="50%"}c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(p){this.createShapesPanel(p)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return(Editor.isDarkMode()?"html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html > body.geEditor > div > a.geItem { background-color: "+
e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),
"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,p=this.editor.graph;if(Editor.inlineFullscreen)e.style.left="10px",e.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+
" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");p.getGraphBounds();var t=n.split(" ");p=mxUtils.getDocumentSize();this.diagramContainer.style.top=t[0];
this.diagramContainer.style.left=t[1];n=parseInt(t[2]);t=parseInt(t[3]);n=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,n):n,p.width-80);t=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,t):t,p.height-80);this.diagramContainer.style.width=n+"px";this.diagramContainer.style.height=t+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),
"*")}e.style.left=this.diagramContainer.offsetLeft+"px";e.style.top=this.diagramContainer.offsetTop-e.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=e.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/
2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=
this.bottomResizer.style.visibility;e.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;
if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)c.defaultEdgeStyle.fontSize=null,c.defaultVertexStyle.fontSize=null;else{c.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var e=parseInt(this.menus.defaultFontSize)-4;c.defaultEdgeStyle.fontSize=e}"simple"==Editor.currentTheme?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle=
"none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=
Editor.sketchFontSource,c.defaultVertexStyle.hachureGap="4",c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4"):
this.menus.defaultFonts=Menus.prototype.defaultFonts;c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(e=this.getPageById(c.substring(l+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};
EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),
this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();
this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),
this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,l){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"),y=parseInt(n.getAttribute("width")),A=parseInt(n.getAttribute("height"));this.writeImageToClipboard(t,y,A,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),null,null,null!=l?l: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.writeImageToClipboard=function(c,e,l,p){var n=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":n,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](p)};EditorUi.prototype.copyCells=function(c,e){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var p=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),
n=mxUtils.getXml(l.encodeCells(p));mxUtils.setTextContent(c,encodeURIComponent(n));e?(l.removeCells(p,!1),l.lastPasteXml=null):(l.lastPasteXml=n,l.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,l,p,n){n=null!=n?n:!0;var t=this.editor.graph,y=null;t.lastPasteXml==c?t.pasteCounter++:(t.lastPasteXml=c,t.pasteCounter=0);var A=t.pasteCounter*t.gridSize;if(l||this.isCompatibleString(c))y=this.importXml(c,A,A),t.setSelectionCells(y);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,
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon flow webcola tags".split(" ");
this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,140,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isOwnDomain=function(){return"test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"preprod.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&this.isOwnDomain()};
new Action(mxResources.get("shadow"),function(){q.setShadowVisible(!q.shadowVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(f,u){}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var f=new FeedbackDialog(d);d.showDialog(f.container,610,360,!0,!1);f.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):
d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});H=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):
this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));H=d.actions.addAction("findReplace",mxUtils.bind(this,function(f,u){var D=(f=q.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=D+"Window";if(null==this[u]){var E="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,
M=f?E?330:300:240;this[u]=new FindWindow(d,document.body.offsetWidth-(M+20),100,M,f?E?304:288:170,f);this[u].window.addListener("show",function(){d.fireEvent(new mxEventObject(D))});this[u].window.addListener("hide",function(){d.fireEvent(new mxEventObject(D))});this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){var f=q.isEnabled()?"findReplaceWindow":"findWindow";
return null!=this[f]&&this[f].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var f=null==d.pages||1>=d.pages.length;if(f)d.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatVsdx"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(D);var E=d.addCheckbox(u,mxResources.get("allPages"),
!f,f);E.style.marginBottom="16px";f=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!E.checked)}),null,mxResources.get("export"));d.showDialog(f.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var f=document.createElement("input");f.setAttribute("type","checkbox");f.style.marginRight="8px";f.checked=mxSettings.getShowStartScreen();f.defaultChecked=f.checked;if(Editor.isSettingsEnabled()&&("sketch"==
Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var u=document.createElement("span");u.style.display="flex";u.style.alignItems="center";u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-3px";u.appendChild(f);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(E){mxEvent.getSource(E)!=f&&(f.checked=!f.checked)});header=u}u=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),
function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(E){d.handleError(E)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var D=d.actions.get("plugins");null==D||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||u.push([mxResources.get("plugins"),D.funct])}EditorUi.isElectronApp||u.push([mxResources.get("link"),function(E,M){if(0<M.value.length)try{var k=
JSON.parse(M.value),x=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(k)),F=new EmbedDialog(d,x);d.showDialog(F.container,450,240,!0);F.init()}catch(Q){d.handleError(Q)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&u.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(E){d.handleError(E)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,u,f.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=f.parentNode&&(mxSettings.setShowStartScreen(f.checked),mxSettings.save())})});
if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(f,u){var D=mxUtils.bind(this,function(M){var k=""==M?mxResources.get("automatic"):mxLanguageMap[M],x=null;""!=k&&(x=f.addItem(k,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(M);d.alert(mxResources.get("restartForChangeRequired"))}),u),(M==mxLanguage||""==M&&null==mxLanguage)&&f.addCheckmark(x,Editor.checkmarkImage));return x});D("");f.addSeparator(u);for(var E in mxLanguageMap)D(E)})));var I=
Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(f){var u=I.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=u&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var D=this.get("dynamicAppearance");if(null!=D){var E=u.addMenu("",D.funct);E.setAttribute("title",mxResources.get("appearance"));E.className="geToolbarButton geAdaptiveAsset";E.style.backgroundPosition="center center";E.style.backgroundRepeat="no-repeat";E.style.backgroundSize="100% 100%";
E.style.display="inline-block";E.style.cursor="pointer";E.style.zIndex="1";E.style.position="absolute";E.style.height="18px";E.style.width="18px";"atlas"==Editor.currentTheme?(E.style.filter="invert(100%)",E.style.right="11px",E.style.top="10px"):(E.style.right="10px",E.style.top="5px");document.body.appendChild(E);u.langIcon=E;D=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;E.style.display="atlas"==Editor.currentTheme||"min"==
Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";E.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()||Editor.cssDarkMode?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",D);this.editorUi.addListener("darkModeChanged",D);mxEvent.addListener(window,"resize",D);D()}}return u}}d.customLayoutConfig=
[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});Editor.enableCssDarkMode&&d.actions.put("convertDarkModeColors",new Action("Dark Mode Colors...",function(f){null==d.darkModeColorsWindow&&(d.darkModeColorsWindow=new DarkModeColorsWindow(d,document.body.offsetWidth-520,80,200,100));
d.darkModeColorsWindow.window.setVisible(!0)}));H=this.get("viewZoom");var c=H.funct;H.funct=mxUtils.bind(this,function(f,u){c.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(f,["-","outline","fullscreen"],u)});H=this.get("layout");var e=H.funct;H.funct=function(f,u){e.apply(this,arguments);f.addItem(mxResources.get("orgChart"),null,function(){var D=null,E=20,M=20,k=function(){"undefined"!==typeof mxOrgChartLayout&&null!=D&&d.tryAndHandle(mxUtils.bind(this,
function(){var X=d.editor.graph,Z=new mxOrgChartLayout(X,D,E,M),Y=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(Y=X.getSelectionCell());Z.execute(Y)}))},x=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");x.appendChild(F);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";F=[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 N=0;N<F.length;N++){var U=document.createElement("option");mxUtils.write(U,F[N]);U.value=N;2==N&&U.setAttribute("selected","selected");Q.appendChild(U)}mxEvent.addListener(Q,"change",function(){D=Q.value});x.appendChild(Q);F=document.createElement("div");F.style.marginTop="6px";F.style.display=
"inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");x.appendChild(F);var R=document.createElement("input");R.type="number";R.value=E;R.style.width="200px";R.style.boxSizing="border-box";x.appendChild(R);mxEvent.addListener(R,"change",function(){E=R.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");x.appendChild(F);var W=document.createElement("input");
W.type="number";W.value=M;W.style.width="200px";W.style.boxSizing="border-box";x.appendChild(W);mxEvent.addListener(W,"change",function(){M=W.value});F=mxUtils.button(mxResources.get("custom")+"...",function(){var X=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(Q.value),parentChildSpacing:parseInt(R.value),siblingSpacing:parseInt(W.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(X,null,2))});F.className="geBtn";x=new CustomDialog(d,x,function(){null==D&&(D=2);d.loadOrgChartLayouts(k)},
null,null,null,F);d.showDialog(x.container,355,140,!0,!0)},u,null,v());f.addSeparator(u);f.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var D=new mxParallelEdgeLayout(q);D.checkOverlap=!0;d.prompt(mxResources.get("spacing"),D.spacing,mxUtils.bind(this,function(E){d.tryAndHandle(mxUtils.bind(this,function(){D.spacing=E;d.executeLayout(function(){D.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),
u);f.addSeparator(u);d.menus.addMenuItem(f,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(f,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(f,["about"],u);else{var D=f.addItem("Search:",null,null,u,null,null,!1);D.style.cursor="default";var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("size","25");E.style.borderWidth="1px";E.style.marginLeft="8px";mxEvent.addListener(E,"keydown",mxUtils.bind(this,
function(M){var k=mxUtils.trim(E.value);13==M.keyCode&&0<k.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(k)),E.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:k}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(E.value="")}));D.firstChild.nextSibling.appendChild(E);mxEvent.addGestureListeners(E,function(M){document.activeElement!=
E&&E.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){E.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(f,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(f,["check4Updates"],u),this.addMenuItems(f,["openDevTools",
"-","about"],u)):this.addMenuItems(f,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(f.addSeparator(u),this.addSubmenu("testDevelop",f,u))})));d.actions.addAction("languageCode...",function(){var f=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(Graph.diagramLanguage=0<u.length?u:null,Graph.translateDiagram=!0,q.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");
d.showDialog(f.container,340,96,!0,!0);f.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,["languageCode","-"],u);u=f.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},u);Graph.translateDiagram||f.addCheckmark(u,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");
mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");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");d.actions.addAction("createSidebarEntry",
mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var f=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(f);f=q.moveCells(f,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(f)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function f(x){return null==x||null==x.boundingBox||!isNaN(x.boundingBox.x)&&!isNaN(x.boundingBox.y)&&
!isNaN(x.boundingBox.width)&&!isNaN(x.boundingBox.height)}var u=q.getGraphBounds(),D=q.view.translate,E=q.view.scale;q.insertVertex(q.getDefaultParent(),null,"",u.x/E-D.x,u.y/E-D.y,u.width/E,u.height/E,"fillColor=none;strokeColor=red;");var M=0,k=0;q.view.states.visit(function(x,F){x=!0;f(F.shape)||(console.log("invalid shape",F.cell.id,F.shape),x=!1);f(F.text)||(console.log("invalid text",F.cell.id,F.text),x=!1);x||M++;k++});console.log("states checked",k,"invalid",M)}));d.actions.addAction("testCheckFile",
mxUtils.bind(this,function(){var f=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";f=new TextareaDialog(d,"Paste Data:",f,function(u){if(0<u.length)try{var D=function(F){function Q(aa){if(null==fa[aa]){if(fa[aa]=!0,null!=R[aa]){for(;0<R[aa].length;){var ea=R[aa].pop();Q(ea)}delete R[aa]}}else mxLog.debug(N+": Visited: "+aa)}var N=F.parentNode.id,U=F.childNodes;F={};for(var R={},W=null,X={},Z=0;Z<U.length;Z++){var Y=U[Z];if(null!=Y.id&&0<Y.id.length)if(null==
F[Y.id]){F[Y.id]=Y.id;var ca=Y.getAttribute("parent");null==ca?null!=W?mxLog.debug(N+": Multiple roots: "+Y.id):W=Y.id:(null==R[ca]&&(R[ca]=[]),R[ca].push(Y.id))}else X[Y.id]=Y.id}U=Object.keys(X);0<U.length?(U=N+": "+U.length+" Duplicates: "+U.join(", "),mxLog.debug(U+" (see console)")):mxLog.debug(N+": Checked");var fa={};null==W?mxLog.debug(N+": No root"):(Q(W),Object.keys(fa).length!=Object.keys(F).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",R)))};"<"!=
u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var E=mxUtils.parseXml(u),M=d.getPagesForNode(E.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var k=d.getHashValueForPages(M);mxLog.debug("Checksum: ",k)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var x=E.getElementsByTagName("root");for(u=0;u<x.length;u++)D(x[u]);mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});
d.showDialog(f.container,620,460,!0,!0);f.init()}));var l=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var f=new TextareaDialog(d,"Diff/Sync:","",function(u){var D=d.getCurrentFile();if(0<u.length&&null!=D)try{var E=JSON.parse(u);D.patch([E],null,!0,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,D){l=d.getPagesForXml(d.getFileData(!0));f.textarea.value="Snapshot updated "+(new Date).toLocaleString()+
" Checksum "+d.getHashValueForPages(l)}],["Diff",function(u,D){try{f.textarea.value=JSON.stringify(d.diffPages(l,d.pages),null,2)}catch(E){d.handleError(E)}}]]);null==l?(l=d.getPagesForXml(d.getFileData(!0)),f.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(l)):f.textarea.value=JSON.stringify(d.diffPages(l,d.pages),null,2);d.showDialog(f.container,620,460,!0,!0);f.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,
function(){var f=d.getCurrentFile();null!=d.pages&&null!=f?d.spinner.spin(document.body,mxResources.get("loading"))&&f.getLatestVersion(function(u){d.spinner.stop();var D=d.getHashValueForPages(d.pages),E=f.getCurrentRevisionId(),M=d.getHashValueForPages(u.getShadowPages()),k=u.getDescriptorChecksum(u.getDescriptor()),x=u.getCurrentRevisionId();console.log("Local File",[f],"modified",f.isModified(),"checksum",D);console.log("Remote File",[u],"rev",x==E,"desc",k==M,"checksum",M);d.alert("Checksums "+
(M==D?"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 f=d.getCurrentFile();console.log("editorUi",d,"file",f);if(null!=f&&f.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(f.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(f.theirPages));console.log("diff ownPages/theirPages",d.diffPages(f.ownPages,
f.theirPages));var u=f.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,f.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(f.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(f.theirPages,u)));null!=f.sync&&null!=f.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(f.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(f.ownPages,f.sync.snapshot)),
console.log("diff theirPages/snapshot",d.diffPages(f.theirPages,f.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(f.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(f.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(f.theirPages,d.pages)))}null!=f&&console.log("Shadow pages",[d.getXmlForPages(f.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));
d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var f=d.getCurrentFile();null!=f&&f.isRealtime()&&null!=f.shadowPages&&(console.log("patching actualPages to shadowPages",f.patch([d.diffPages(f.shadowPages,d.pages)])),f.ownPages=d.clonePages(d.pages),f.theirPages=d.clonePages(d.pages),f.shadowPages=d.clonePages(d.pages),null!=f.sync&&(f.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();
try{var f=q.model.cells,u=0,D=[],E=[],M;for(M in f){var k=f[M],x=q.getCurrentCellStyle(k)[mxConstants.STYLE_IMAGE];null!=x&&"data:"==x.substring(0,5)&&(null==D[x]&&(D[x]=(D[x]||0)+1,u++),E.push(k))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,E);console.log("Removed",u,"image(s) from",E.length,"cell(s): ",[E,D])}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 f=
new mxImageExport,u=q.getGraphBounds(),D=q.view.scale,E=mxUtils.createXmlDocument(),M=E.createElement("output");E.appendChild(M);E=new mxXmlCanvas2D(M);E.translate(Math.floor((1-u.x)/D),Math.floor((1-u.y)/D));E.scale(1/D);var k=0,x=E.save;E.save=function(){k++;x.apply(this,arguments)};var F=E.restore;E.restore=function(){k--;F.apply(this,arguments)};var Q=f.drawShape;f.drawShape=function(N){mxLog.debug("entering shape",N,k);Q.apply(this,arguments);mxLog.debug("leaving shape",N,k)};f.drawState(q.getView().getState(q.model.root),
E);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",k)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var p=null,n=null,t=null,y=null,A=null,G=null,C=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=p?(q.view.revalidate=p,p=null):(p=q.view.revalidate,q.view.revalidate=function(){var f=Date.now(),u=p.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",
[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=n?(d.selectPage=n,n=null):(n=d.selectPage,d.selectPage=function(){var f=Date.now(),u=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=t?(d.diffPages=t,t=null):(t=d.diffPages,d.diffPages=function(){var f=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-f+" ms","args",arguments);
return u});null!=y?(d.patchPages=y,y=null):(y=d.patchPages,d.patchPages=function(){var f=Date.now(),u=y.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=A?(d.clonePages=A,A=null):(A=d.clonePages,d.clonePages=function(){var f=Date.now(),u=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=G?(d.getHashValueForPages=G,
G=null):(G=d.getHashValueForPages,d.getHashValueForPages=function(){var f=Date.now(),u=G.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-f+" ms","args",arguments);return u});null!=C?(d.resolveCrossReferences=C,C=null):(C=d.resolveCrossReferences,d.resolveCrossReferences=function(){var f=Date.now(),u=C.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-f+" ms","args",arguments);return u});
EditorUi.debug("[Performance]",null!=p?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),u);var D=f.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=p&&f.addCheckmark(D,Editor.checkmarkImage);this.addMenuItems(f,["-",
"testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(f){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(f){q.isEnabled()&&(f=new mxCell("",new mxGeometry(0,0,120,120),
d.defaultCustomShapeStyle),f.vertex=!0,f=new EditShapeDialog(d,f,mxResources.get("editShape")+":",630,400),d.showDialog(f.container,640,480,!0,!1),f.init())})).isEnabled=v;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(f){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",f,function(u,D,E,M,k,x,F,Q,N,U,R){d.createHtml(u,
D,E,M,k,x,F,Q,N,U,R,mxUtils.bind(this,function(W,X){var Z=new EmbedDialog(d,W+"\n"+X,null,null,function(){var Y=window.open(),ca=Y.document;if(null!=ca){"CSS1Compat"===document.compatMode&&ca.writeln("<!DOCTYPE html>");ca.writeln("<html>");ca.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');ca.writeln("<body>");ca.writeln(W);var fa=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;fa&&ca.writeln(X);ca.writeln("</body>");ca.writeln("</html>");
ca.close();if(!fa){var aa=Y.document.createElement("div");aa.marginLeft="26px";aa.marginTop="26px";mxUtils.write(aa,mxResources.get("updatingDocument"));fa=Y.document.createElement("img");fa.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");fa.style.marginLeft="6px";aa.appendChild(fa);Y.document.body.insertBefore(aa,Y.document.body.firstChild);window.setTimeout(function(){var ea=document.createElement("script");ea.type="text/javascript";ea.src=/<script.*?src="(.*?)"/.exec(X)[1];
ca.body.appendChild(ea);aa.parentNode.removeChild(aa)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(Z.container,450,240,!0,!0);Z.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var f=d.getCurrentFile();null!=f&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(u){d.spinner.stop();null!=u?(u=new EmbedDialog(d,'<img src="'+(f.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+
f.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(f,u,D,E,M,k){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(f,u,D,E,M,k,function(x){d.spinner.stop();x=new EmbedDialog(d,x);d.showDialog(x.container,450,240,!0,!0);x.init()},function(x){d.spinner.stop();d.handleError(x)})},mxResources.get("image"),
mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(f,u,D,E,M,k){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(f,u,D,E,M,k,function(x){d.spinner.stop();x=new EmbedDialog(d,x);d.showDialog(x.container,450,240,!0,!0);x.init()},function(x){d.spinner.stop();d.handleError(x)})},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(){var f=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(f.height/q.view.scale)+2,function(u,D,E,M,k,x,F,Q,N){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var R=[];N&&R.push("tags=%7B%7D");U=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+Q+';" src="'+d.createLink(u,D,E,M,k,x,U,null,
R)+'"></iframe>');d.showDialog(U.container,450,240,!0,!0);U.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.textAlign="center";f.style.width="100%";f.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"));
f.appendChild(u);mxEvent.addListener(u,"click",function(D){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(D)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(D,E,M,k,x,F,Q,N,U){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(R){d.spinner.stop();var W=["border=0"];U&&W.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(D,E,M,k,x,F,R,null,W,!0));
d.showDialog(R.container,450,240,!0,!0);R.init()})},!0,"https://www.drawio.com/blog/drawio-notion",f)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(f,u,D,E,M,k,x,F,Q){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(N){d.spinner.stop();var U=[];Q&&U.push("tags=%7B%7D");N=new EmbedDialog(d,d.createLink(f,u,D,E,M,k,N,null,U));d.showDialog(N.container,450,240,
!0,!0);N.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.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
function(f){d.spinner.stop();f=new GoogleSitesDialog(d,f);d.showDialog(f.container,420,256,!0,!0);f.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)H=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),H.setToggleAction(!0),H.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});H=d.actions.addAction("search",function(){var f=d.sidebar.isEntryVisible("search");
d.sidebar.showPalette("search",!f);isLocalStorage&&(mxSettings.settings.search=!f,mxSettings.save())});H.label=mxResources.get("searchShapes");H.setToggleAction(!0);H.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(f){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("save").funct=function(f){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 D=d.createLoadMessage("save");D.xml=u;f&&(D.exit=!0);u=JSON.stringify(D)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));f=d.getCurrentFile();null==f||f.constructor==EmbedFile||f.constructor==LocalFile&&null==f.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?
d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var f=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,f,mxResources.get("cancel"),
mxResources.get("discardChanges")):f()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(f,u){d.isExportToCanvas()?(this.addMenuItems(f,["exportPng"],u),d.jpgSupported&&this.addMenuItems(f,["exportJpg"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(f,["exportPng","exportJpg"],u);this.addMenuItems(f,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(f,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&
navigator.standalone||this.addMenuItems(f,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(f,["exportVsdx"],u);this.addMenuItems(f,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(f.addSeparator(u),this.addMenuItem(f,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(f,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==
urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(f.addSeparator(u),d.menus.addSubmenu("embed",f,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(f,u){function D(k){k.pickFile(function(x){d.spinner.spin(document.body,mxResources.get("loading"))&&k.getFile(x,function(F){var Q="data:image/"==F.getData().substring(0,11)?M(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
Q="image/svg+xml");E(F.getData(),Q,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},k==d.drive)},!0)}var E=mxUtils.bind(this,function(k,x,F){var Q=q.view,N=q.getGraphBounds(),U=q.snap(Math.ceil(Math.max(0,N.x/Q.scale-Q.translate.x)+4*q.gridSize)),R=q.snap(Math.ceil(Math.max(0,(N.y+N.height)/Q.scale-Q.translate.y)+4*q.gridSize));"data:image/"==k.substring(0,11)?d.loadImage(k,mxUtils.bind(this,function(W){var X=!0,Z=mxUtils.bind(this,function(){d.resizeImage(W,
k,mxUtils.bind(this,function(Y,ca,fa){Y=X?Math.min(1,Math.min(d.maxImageSize/ca,d.maxImageSize/fa)):1;d.importFile(k,x,U,R,Math.round(ca*Y),Math.round(fa*Y),F,function(aa){d.spinner.stop();q.setSelectionCells(aa);q.scrollCellToVisible(q.getSelectionCell())})}),X)});k.length>d.resampleThreshold?d.confirmImageResize(function(Y){X=Y;Z()}):Z()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(k,x,U,R,0,0,F,function(W){d.spinner.stop();q.setSelectionCells(W);
q.scrollCellToVisible(q.getSelectionCell())})}),M=mxUtils.bind(this,function(k){var x="text/xml";/\.png$/i.test(k)?x="image/png":/\.jpe?g$/i.test(k)?x="image/jpg":/\.gif$/i.test(k)?x="image/gif":/\.pdf$/i.test(k)&&(x="application/pdf");return x});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){D(d.drive)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},u,null,!1));null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){D(d.oneDrive)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+"...",null,function(){D(d.dropbox)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){D(d.gitHub)},u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){D(d.gitLab)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){D(d.trello)},u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&
f.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(f.addSeparator(u),f.addItem(mxResources.get("url")+"...",null,function(){var k=new FilenameDialog(d,"",mxResources.get("import"),function(x){if(null!=x&&0<x.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(x)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+
"?url="+encodeURIComponent(x),function(Q){E(Q,F,x)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(k.container,300,80,!0,!0);k.init()},u))}))).isEnabled=v;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(f,u){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&(750>D&&this.addSubmenu("viewZoom",f,u,mxResources.get("zoom")),
460>D&&d.isPageMenuVisible()&&this.addSubmenu("pages",f,u),320>D&&this.addSubmenu("insert",f,u),360>D&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",f,u));this.addMenuItems(f,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(D=d.menus.addMenuItem(f,"autoMode",u),null!=D&&D.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&this.addMenuItems(f,["-","toggleSimpleMode"],
u)})));this.put("appearance",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(f=d.menus.addMenuItem(f,"autoMode",u),null!=f&&f.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.cssDarkMode||Editor.isDarkMode()?"dark":"light")+")"))})));d.actions.addAction("addToScratchpad",function(f){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(f)});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(f,u){var D="1"==urlParams.sketch?"sketch":mxSettings.getUi(),E=f.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},u);"kennedy"!=D&&"atlas"!=D&&"dark"!=D&&"simple"!=D&&"sketch"!=D&&"min"!=D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme(Editor.isDarkMode()?"dark":
"kennedy")},u);"kennedy"!=D&&"dark"!=D||f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("simple"),null,function(){d.setCurrentTheme("simple")},u);"simple"==D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},u);"sketch"==D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},u);"min"==D&&f.addCheckmark(E,Editor.checkmarkImage);E=f.addItem(mxResources.get("atlas"),
null,function(){d.setCurrentTheme("atlas")},u);"atlas"==D&&f.addCheckmark(E,Editor.checkmarkImage)})));H=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var f=this.editorUi.getCurrentFile();if(null!=f)if(f.constructor==LocalFile&&null!=f.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(D,E){f.invalidFileHandle=null;f.fileHandle=D;f.title=E.name;f.desc=E;d.save(E.name)}),null,d.createFileSystemOptions(f.getTitle()));else{var u=null!=f.getTitle()?f.getTitle():this.editorUi.defaultFilename;
u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(D){null!=D&&0<D.length&&null!=f&&D!=f.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&f.rename(D,mxUtils.bind(this,function(E){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(E){this.editorUi.handleError(E,null!=E?mxResources.get("errorRenamingFile"):null)}))}),f.constructor==DriveFile||f.constructor==StorageFile?mxResources.get("diagramName"):null,function(D){if(null!=
D&&0<D.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));H.isEnabled=function(){return this.enabled&&v.apply(this,arguments)};H.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var f=d.getCurrentFile();if(null!=f){var u=d.getCopyFilename(f);f.constructor==DriveFile?(u=new CreateDialog(d,
u,mxUtils.bind(this,function(D,E){"_blank"==E?d.editor.editAsNew(d.getFileData(),D):("download"==E&&(E=App.MODE_GOOGLE),null!=D&&0<D.length&&(E==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&f.saveAs(D,mxUtils.bind(this,function(M){f.desc=M;f.save(!1,mxUtils.bind(this,function(){d.spinner.stop();f.setModified(!1);f.addAllSavedStatus()}),mxUtils.bind(this,function(k){d.handleError(k)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(D,d.getFileData(!0),
null,E)))}),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(f,u){f=d.getCurrentFile();null!=f&&d.openLink(f.getFolderUrl())}));d.actions.addAction("openFile...",mxUtils.bind(this,
function(){var f=d.getCurrentFile();null!=f&&d.openLink(f.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var f=d.getCurrentFile();if(f.getMode()==App.MODE_GOOGLE||f.getMode()==App.MODE_ONEDRIVE){var u=!1;if(f.getMode()==App.MODE_GOOGLE&&null!=f.desc.parents)for(var D=0;D<f.desc.parents.length;D++)if(f.desc.parents[D].isRoot){u=!0;break}d.pickFolder(f.getMode(),mxUtils.bind(this,function(E){d.spinner.spin(document.body,mxResources.get("moving"))&&f.move(E,mxUtils.bind(this,
function(M){d.spinner.stop()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,["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 f=d.getCurrentFile();null!=f&&f.share()}catch(u){d.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,
function(f,u){var D=d.getCurrentFile();null==D||D.getMode()!=App.MODE_GOOGLE&&D.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(D.getTitle())||this.addMenuItems(f,["liveImage","-"],u);this.addMenuItems(f,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(f,["embedIframe"],u);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(f,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));d.addInsertItem=function(f,u,D,
E){("plantUml"!=E||EditorUi.enablePlantUml&&!d.isOffline())&&f.addItem(D,null,mxUtils.bind(this,function(){if("fromText"==E||"formatSql"==E||"plantUml"==E||"mermaid"==E){var M=new ParseDialog(d,D,E);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(d,D,E),d.showDialog(M.container,620,420,!0,!1);M.init()}),u,null,v())};var V=function(f){q.getModel().beginUpdate();try{f=q.addCell(f),q.fireEvent(new mxEventObject("cellsInserted","cells",[f])),
q.model.isVertex(f)&&q.isAutoSizeCell(f)&&q.updateCellSize(f)}finally{q.getModel().endUpdate()}q.scrollCellToVisible(f);q.setSelectionCell(f);q.container.focus();q.editAfterInsert&&q.startEditing(f);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(f))},0);return f},O=function(f,u,D,E,M){f=new mxCell(f,new mxGeometry(0,0,u,D),E);f.vertex=!0;null==M&&(M=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([f],!0)));f.geometry.x=M.x;f.geometry.y=M.y;return V(f)};d.actions.put("insertText",
new Action(mxResources.get("text"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(O("Text",60,30,"text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,"A")).isEnabled=v;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
O("",120,60,"whiteSpace=wrap;html=1;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"D")).isEnabled=v;d.actions.put("insertNote",new Action(mxResources.get("note"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&O("",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==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"S")).isEnabled=v;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&O("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=v;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),
function(f){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&O("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=v;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(f){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var u=q.defaultEdgeLength;f=null==f||mxEvent.isControlDown(f)||mxEvent.isMetaDown(f)||!q.isMouseInsertPoint()?null:q.getInsertPoint();
null==f&&(f=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([D],!0)));var D=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");D.geometry.setTerminalPoint(f,!0);D.geometry.setTerminalPoint(new mxPoint(f.x+D.geometry.width,f.y),!1);D.geometry.points=[];D.geometry.relative=!0;D.edge=!0;V(D)}},null,null,"C")).isEnabled=v;H=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"));H.setToggleAction(!0);H.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(f,u,D){for(var E=0;E<D.length;E++)"-"==D[E]?f.addSeparator(u):d.addInsertItem(f,u,mxResources.get(D[E])+"...",D[E])});this.put("insert",new Menu(mxUtils.bind(this,function(f,u){"sketch"==
Editor.currentTheme?(d.menus.addMenuItems(f,["toggleShapes"],u),d.menus.addSubmenu("table",f,u),f.addSeparator(u),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(f,["insertTemplate"],u),d.menus.addMenuItems(f,["insertImage","insertLink","-"],u),d.menus.addSubmenu("insertAdvanced",f,u,mxResources.get("advanced")),d.menus.addSubmenu("layout",f,u)):(this.addMenuItems(f,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
u),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(f,["insertTemplate"],u),f.addSeparator(u),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("table",f,u),this.addSubmenu("layout",f,u)):this.addSubmenu("insertLayout",f,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",f,u,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(f,u){d.menus.addInsertTableCellItem(f,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(f,
u){d.addInsertMenuItems(f,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(f,u){d.addInsertMenuItems(f,u,["fromText","plantUml","mermaid","-","formatSql"]);f.addItem(mxResources.get("csv")+"...",null,function(){q.popupMenuHandler.hideMenu();d.showImportCsvDialog()},u,null,v());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(f,["-","createShape","editDiagram"],
u)})));this.put("openRecent",new Menu(function(f,u){var D=d.getRecent();if(null!=D){for(var E=0;E<D.length;E++)(function(M){var k=M.mode;k==App.MODE_GOOGLE?k="googleDrive":k==App.MODE_ONEDRIVE&&(k="oneDrive");f.addItem(M.title+" ("+mxResources.get(k)+")",null,function(){d.loadFile(M.id)},u)})(D[E]);f.addSeparator(u)}f.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},u)}));this.put("openFrom",new Menu(function(f,u){null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,
function(){d.pickFile(App.MODE_GOOGLE)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+
"...",null,function(){d.pickFile(App.MODE_DROPBOX)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},
u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(f.addSeparator(u),f.addItem(mxResources.get("url")+"...",null,function(){var D=
new FilenameDialog(d,"",mxResources.get("open"),function(E){null!=E&&0<E.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(E):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(E)))},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(f,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
(null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+
"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u)})),this.put("openLibraryFrom",new Menu(function(f,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?f.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},u):z&&"function"===typeof window.DriveClient&&f.addItem(mxResources.get("googleDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?f.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},u):K&&"function"===typeof window.OneDriveClient&&f.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?f.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},u):B&&"function"===typeof window.DropboxClient&&f.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);f.addSeparator(u);null!=d.gitHub&&f.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},u);null!=d.gitLab&&f.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},u);null!=d.trello?f.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},u):J&&"function"===typeof window.TrelloClient&&f.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
"...)",null,function(){},u,null,!1);f.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&f.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&f.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(f.addSeparator(u),f.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(E){if(null!=E&&0<E.length&&d.spinner.spin(document.body,
mxResources.get("loading"))){var M=E;d.editor.isCorsEnabledForUrl(E)||(M=PROXY_URL+"?url="+encodeURIComponent(E));mxUtils.get(M,function(k){if(200<=k.getStatus()&&299>=k.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,k.getText(),E))}catch(x){d.handleError(x,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
d.showDialog(D.container,300,80,!0,!0);D.init()},u));"1"==urlParams.confLib&&(f.addSeparator(u),f.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
H=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var f=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(f);this.commentsWindow.refreshCommentsTime();f&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(f,u){var D=
d.getCurrentFile();d.menus.addMenuItems(f,"toggleShapes format ruler - findReplace layers tags outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(f,["comments"],u);null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&d.menus.addMenuItems(f,["showRemoteCursors"],u);d.menus.addMenuItems(f,["-","fullscreen"],u)};this.put("view",new Menu(mxUtils.bind(this,function(f,u){if("simple"==Editor.currentTheme){var D=d.getCurrentFile();d.menus.addMenuItems(f,["toggleShapes","format"],u);
d.isPageMenuVisible()&&d.menus.addMenuItems(f,["pageTabs"],u);d.menus.addMenuItems(f,["ruler","-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var E=d.menus.addMenuItem(f,"scratchpad",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(E,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(f,"- findReplace layers tags outline -".split(" "),u);d.commentsSupported()&&d.menus.addMenuItems(f,["comments"],u);null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&
this.addMenuItems(f,["showRemoteCursors"],u);this.addMenuItems(f,["-","fullscreen"],u)}else{this.addMenuItems(f,["format","outline","layers","tags"].concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(f,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP)E=this.addMenuItem(f,"scratchpad",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(E,"https://www.drawio.com/doc/faq/scratchpad");this.addMenuItems(f,["toggleShapes","-","pageView",
"pageScale"]);this.addSubmenu("units",f,u);f.addSeparator(u);d.isPageMenuVisible()&&d.menus.addMenuItems(f,["pageTabs"],u);this.addMenuItems(f,"tooltips ruler - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(f,["-","fullscreen"],u)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(f,u){this.addMenuItems(f,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
u)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(f,u){var D=d.currentPage;null!=D&&(f.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(D,D.getName())}),u),f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(D)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",f,u,mxResources.get("move")),f.addSeparator(u)),f.addSeparator(u),f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(D,
mxResources.get("copyOf",[D.getName()]))}),u),1!=urlParams.embed&&(f.addSeparator(u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u),null!=d.getLinkForPage(D)&&f.addItem(mxResources.get("link")+"...",null,mxUtils.bind(this,function(){d.showPageLinkDialog(D)}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(f,u){var D=
d.currentPage;f.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){d.insertPage()}),u);f.addSeparator(u);if(null!=d.pages)for(var E=0;E<d.pages.length;E++)mxUtils.bind(this,function(M){var k=null;k=d.pages[M]==D?d.menus.addSubmenu("currentPage",f,u,d.getShortPageName(D)):f.addItem(d.getShortPageName(d.pages[M]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[M])}),u);var x=d.pages[M].getId();k.setAttribute("title",d.pages[M].getName()+" ("+(M+1)+"/"+d.pages.length+")"+
(null!=x?" ["+x+"]":""));d.pages[M]==D&&f.addCheckmark(k,Editor.checkmarkImage)})(E)})));if(EditorUi.isElectronApp){var L="1"==urlParams.enableSpellCheck;H=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();L=!L;d.alert(mxResources.get("restartForChangeRequired"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return L});var P="1"==urlParams.enableStoreBkp;H=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();P=!P});H.setToggleAction(!0);H.setSelectedCallback(function(){return P});
d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var f=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"),null,null,null,null,null,null,50,250);d.showDialog(f.container,320,80,!0,!0);f.init()})}var T=this.get("language");this.put("extras",
new Menu(mxUtils.bind(this,function(f,u){if("simple"==Editor.currentTheme||"1"==urlParams.sketch||"min"==uiTheme){"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",f,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",f,u);f.addSeparator(u);null==T||"1"==urlParams.embed&&null!=urlParams.lang||
d.menus.addSubmenu("language",f,u);d.menus.addSubmenu("units",f,u);d.menus.addMenuItems(f,["-","copyConnect","collapseExpand","tooltips","-"],u);var D=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(f,["showRemoteCursors"],u),d.menus.addMenuItems(f,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(f,["-","spellCheck","autoBkp","drafts","-"],u);this.addSubmenu("diagramLanguage",f,u);f.addSeparator(u);d.mode!=
App.MODE_ATLAS&&d.menus.addMenuItem(f,"configuration",u);f.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",f,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",f,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",f,u),f.addSeparator(u),"undefined"!==typeof MathJax&&(D=this.addMenuItem(f,"mathematicalTypesetting",
u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(f,["spellCheck","autoBkp","drafts","-"],u),this.addMenuItems(f,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(D=d.getCurrentFile(),null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(f,["showRemoteCursors","shareCursor"],u),this.addMenuItems(f,["autosave"],u)),f.addSeparator(u),
!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(f,"plugins",u),this.addMenuItems(f,["-","editDiagram"],u),this.addSubmenu("diagramLanguage",f,u),f.addSeparator(u),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(f,["showStartScreen"],u),this.addMenuItems(f,["configuration"],u),f.addSeparator(u),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function E(k){return{id:k.id,isExt:!0,url:k.downloadUrl,title:k.title,imgUrl:k.thumbnailLink,changedBy:k.lastModifyingUserName,
lastModifiedOn:k.modifiedDate}}var M=new TemplatesDialog(d,function(k){console.log(arguments)},null,null,null,"user",function(k,x,F){var Q=new Date;Q.setDate(Q.getDate()-7);d.drive.listFiles(null,Q,F?!0:!1,function(N){for(var U=[],R=0;R<N.items.length;R++)U.push(E(N.items[R]));k(U)},x)},function(k,x,F,Q){d.drive.listFiles(k,null,Q?!0:!1,function(N){for(var U=[],R=0;R<N.items.length;R++)U.push(E(N.items[R]));x(U)},F)},function(k,x,F){d.drive.getFile(k.id,function(Q){x(Q.data)},F)},null,function(k){k({Test:[]},
1)},!0,!1);d.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(f,"templates",u))})));this.put("movePage",new Menu(mxUtils.bind(this,function(f,u){var D=d.getSelectedPageIndex();if(null!=d.pages)for(var E=0;E<d.pages.length;E++)E!=D&&function(M){f.addItem(d.getShortPageName(d.pages[M]),null,function(){d.movePage(D,M)},u)}(E)})));this.put("share",new Menu(mxUtils.bind(this,function(f,u){if(!d.isStandaloneApp()){var D=d.isOffline(!0)?mxResources.get("offline"):
d.getNetworkStatus();null!=D&&(f.addItem(D,null,null,u,null,!1),f.addSeparator(u));d.menus.addMenuItems(f,["share"],u)}this.addMenuItem(f,"publishLink",u,null,null,mxResources.get("publish")+"...");null!=d.getMainUser()&&this.addMenuItems(f,["accounts"],u)})));this.put("diagram",new Menu(mxUtils.bind(this,function(f,u){var D=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",f,u,mxResources.get("settings")),f.addSeparator(u));var E="simple"==Editor.currentTheme||"sketch"==
Editor.currentTheme;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(f,"new open - synchronize properties - save saveAs -".split(" "),u);else if(d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(f,["-","save"],u);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(f,["saveAndExit"],u),null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["revisionHistory"],
u);f.addSeparator(u)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(f,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",f,u),f.addSeparator(u),"min"==Editor.currentTheme&&(d.menus.addMenuItems(f,"toggleShapes format layers tags - findReplace".split(" "),u),d.commentsSupported()&&d.menus.addMenuItems(f,["comments"],u),f.addSeparator(u)));d.menus.addSubmenu("exportAs",f,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(f,["import"],u):"1"!=urlParams.noFileMenu&&
d.menus.addSubmenu("importFrom",f,u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(d.menus.addMenuItems(f,["-","findReplace"],u),d.commentsSupported()&&d.menus.addMenuItems(f,["comments","-"],u),d.menus.addMenuItems(f,["toggleShapes","format","layers","tags","-"],u),d.menus.addMenuItems(f,["pageSetup"],u)):"min"!=Editor.currentTheme&&(this.addMenuItems(f,["-"],u),this.addSubmenu("newLibrary",f,u),this.addSubmenu("openLibraryFrom",f,u));f.addSeparator(u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&
navigator.standalone||d.menus.addMenuItems(f,["print"],u);E||"min"==Editor.currentTheme||null==D||null==d.fileNode||"1"==urlParams.embedInline||(E=null!=D.getTitle()?D.getTitle():d.defaultFilename,/(\.html)$/i.test(E)||this.addMenuItems(f,["-","properties"]));f.addSeparator(u);"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",f,u,mxResources.get("settings")),f.addSeparator(u));d.menus.addSubmenu("help",f,u);f.addSeparator(u);"1"==urlParams.embed&&("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
d.menus.addMenuItems(f,["save"],u),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(f,["saveAndExit"],u),null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["revisionHistory"],u));"1"!=urlParams.embed&&d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(f,["exit"],u);"1"!=urlParams.embed&&null!=D&&d.menus.addMenuItems(f,["-","close"],u)})));this.put("save",new Menu(mxUtils.bind(this,function(f,
u){var D=d.getCurrentFile();null==D||D.constructor!=DriveFile&&D.constructor!=OneDriveFile?(d.menus.addMenuItems(f,["save","saveAs","-","rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(f,["upload"],u):d.menus.addMenuItems(f,["makeCopy"],u)):d.menus.addMenuItems(f,["save","makeCopy","-","rename","moveToFolder"],u);d.menus.addMenuItems(f,["-","autosave"],u);null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["-","revisionHistory"],
u)})));this.put("file",new Menu(mxUtils.bind(this,function(f,u){var D="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",f,u),this.addSubmenu("exportAs",f,u),this.addSubmenu("embed",f,u),"1"==urlParams.libraries&&(this.addMenuItems(f,["-"],u),this.addSubmenu("newLibrary",f,u),this.addSubmenu("openLibraryFrom",f,u)),d.isRevisionHistorySupported()&&this.addMenuItems(f,["-","revisionHistory"],u),this.addMenuItems(f,
["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(f,["saveAndExit"],u):(this.addMenuItems(f,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(f,["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(f,["exit"],u);else if(D){D=d.getCurrentFile();d.menus.addMenuItems(f,["new"],u);d.menus.addSubmenu("openFrom",f,u);isLocalStorage&&this.addSubmenu("openRecent",f,u);f.addSeparator(u);d.menus.addMenuItems(f,
["-","save"],u);null!=D&&D.constructor==DriveFile||d.menus.addMenuItems(f,["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||d.menus.addMenuItems(f,["synchronize"],u);f.addSeparator(u);null!=D&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(f,"publishLink",u,null,null,mxResources.get("publish")+"..."),"simple"==Editor.currentTheme||D.constructor!=DriveFile&&D.constructor!=GitHubFile&&
D.constructor!=OneDriveFile||d.menus.addMenuItems(f,["share"],u));f.addSeparator(u);null!=D&&D.isRenamable()&&this.addMenuItems(f,["rename"],u);d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(f,["upload"],u):(d.menus.addMenuItems(f,["makeCopy"],u),null!=D&&(D.constructor!=OneDriveFile&&D.constructor!=DriveFile||d.menus.addMenuItems(f,["moveToFolder"],u),f.addSeparator(u),null!=D.getFolderUrl()&&d.menus.addMenuItems(f,["openFolder"],u),null!=D.getFileUrl()&&
d.menus.addMenuItems(f,["openFile"],u)));f.addSeparator(u);null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(f,["revisionHistory"],u);if(null!=D&&null!=d.fileNode&&"1"!=urlParams.embedInline){var E=null!=D.getTitle()?D.getTitle():d.defaultFilename;(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(E))&&this.addMenuItems(f,["properties"],u)}"simple"==Editor.currentTheme&&d.menus.addMenuItems(f,["-","autosave"],u)}else D=this.editorUi.getCurrentFile(),null!=
D&&D.constructor==DriveFile?(D.isRestricted()&&this.addMenuItems(f,["exportOptionsDisabled"],u),this.addMenuItems(f,["save","-","share"],u),E=this.addMenuItem(f,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(E,"https://www.drawio.com/doc/faq/synchronize"),f.addSeparator(u)):this.addMenuItems(f,["new"],u),this.addSubmenu("openFrom",f,u),isLocalStorage&&this.addSubmenu("openRecent",f,u),null!=D&&D.constructor==DriveFile?this.addMenuItems(f,"new - rename makeCopy openFolder moveToFolder".split(" "),
u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||(f.addSeparator(u),E=this.addMenuItem(f,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(E,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(f,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==D||this.addMenuItems(f,["share","-"],u),null!=D&&D.isRenamable()&&
this.addMenuItems(f,["rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(f,["upload"],u):(this.addMenuItems(f,["makeCopy"],u),null!=D&&(D.constructor==OneDriveFile&&this.addMenuItems(f,["moveToFolder"],u),null!=D.getFolderUrl()&&d.menus.addMenuItems(f,["openFolder"],u)))),f.addSeparator(u),this.addSubmenu("importFrom",f,u),this.addSubmenu("exportAs",f,u),f.addSeparator(u),this.addSubmenu("embed",f,u),this.addSubmenu("publish",f,u),f.addSeparator(u),
this.addSubmenu("newLibrary",f,u),this.addSubmenu("openLibraryFrom",f,u),d.isRevisionHistorySupported()&&this.addMenuItems(f,["-","revisionHistory"],u),null!=D&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(E=null!=D.getTitle()?D.getTitle():d.defaultFilename,(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(E))&&this.addMenuItems(f,["-","properties"])),this.addMenuItems(f,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(f,["print"],u),
this.addMenuItems(f,["-","close"])})));m.prototype.execute=function(){var f=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var u=f.extFonts,D=0;null!=u&&D<u.length;D++){var E=document.getElementById("extFont_"+u[D].name);null!=E&&E.parentNode.removeChild(E)}f.extFonts=[];for(D=0;null!=this.previousExtFonts&&D<this.previousExtFonts.length;D++)this.ui.editor.graph.addExtFont(this.previousExtFonts[D].name,
this.previousExtFonts[D].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(f,u){for(var D=mxUtils.bind(this,function(R,W,X,Z,Y){var ca=d.editor.graph;Z=this.styleChange(f,Z||R,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[R,null!=W?encodeURIComponent(W):null,null]:[R],null,u,function(){"1"!=urlParams["ext-fonts"]?ca.setFont(R,W):(document.execCommand("fontname",!1,R),
ca.addExtFont(R,W));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[R,null!=W?encodeURIComponent(W):null,null]:[R],"cells",[ca.cellEditor.getEditingCell()]))},function(){ca.updateLabelElements(ca.getSelectionCells(),function(fa){fa.removeAttribute("face");fa.style.fontFamily=null;"PRE"==fa.nodeName&&ca.replaceElement(fa,"div")});"1"==urlParams["ext-fonts"]&&
ca.addExtFont(R,W)});X&&(X=document.createElement("span"),X.className="geSprite geSprite-delete",X.style.cursor="pointer",X.style.display="inline-block",Z.firstChild.nextSibling.nextSibling.appendChild(X),mxEvent.addListener(X,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(fa){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[R.toLowerCase()];for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==R&&this.customFonts[aa].url==W){this.customFonts.splice(aa,
1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var ea=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=ea&&0<ea.length)for(aa=0;aa<ea.length;aa++)if(ea[aa].name==R){ea.splice(aa,1);break}var va=mxUtils.clone(this.customFonts);for(aa=0;aa<va.length;aa++)if(va[aa].name==R){va.splice(aa,1);break}aa=new m(this.editorUi,ea,va);this.editorUi.editor.graph.model.execute(aa)}this.editorUi.hideCurrentMenu();mxEvent.consume(fa)})));Graph.addFont(R,W);Z.firstChild.nextSibling.style.fontFamily=
R;null!=Y&&Z.setAttribute("title",Y)}),E={},M=0;M<this.defaultFonts.length;M++){var k=this.defaultFonts[M];"string"===typeof k?D(k):null!=k.fontFamily&&null!=k.fontUrl&&(E[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,D(k.fontFamily,k.fontUrl))}f.addSeparator(u);if("1"!=urlParams["ext-fonts"]){k=function(R){var W=encodeURIComponent(R.name)+(null==R.url?"":"@"+encodeURIComponent(R.url));if(!E[W]){for(var X=R.name,Z=0;null!=F[X.toLowerCase()];)X=R.name+" ("+ ++Z+")";null==x[W]&&
(Q.push({name:R.name,url:R.url,label:X,title:R.url}),F[X.toLowerCase()]=R,x[W]=R)}};var x={},F={},Q=[];for(M=0;M<this.customFonts.length;M++)k(this.customFonts[M]);for(var N in Graph.recentCustomFonts)k(Graph.recentCustomFonts[N]);Q.sort(function(R,W){return R.label<W.label?-1:R.label>W.label?1:0});if(0<Q.length){for(M=0;M<Q.length;M++)D(Q[M].name,Q[M].url,!0,Q[M].label,Q[M].url);f.addSeparator(u)}f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=
[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);f.addSeparator(u)}else{N=this.editorUi.editor.graph.extFonts;if(null!=N&&0<N.length){k={};var U=!1;for(M=0;M<this.customFonts.length;M++)k[this.customFonts[M].name]=!0;for(M=0;M<N.length;M++)k[N[M].name]||(this.customFonts.push(N[M]),U=!0);U&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=0;M<this.customFonts.length;M++)N=this.customFonts[M].name,k=this.customFonts[M].url,
D(N,k,!0),this.editorUi.editor.graph.addExtFont(N,k,!0);f.addSeparator(u);f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var R=new m(this.editorUi,[],[]);d.editor.graph.model.execute(R)}),u);f.addSeparator(u)}}f.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var R=this.editorUi.editor.graph,W=R.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],X="s",Z=null;if("1"!=urlParams["ext-fonts"]&&R.isEditing()){var Y=R.getSelectedEditingElement();
null!=Y&&(Y=mxUtils.getCurrentStyle(Y),null!=Y&&(W=Graph.stripQuotes(Y.fontFamily),Z=Graph.getFontUrl(W,null),null!=Z&&(Graph.isGoogleFontUrl(Z)?(Z=null,X="g"):X="w")))}else Y=R.getView().getState(R.getSelectionCell()),null!=Y&&(W=Y.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(Y=Y.style.fontSource,null!=Y&&(Y=decodeURIComponent(Y),Graph.isGoogleFontUrl(Y)?X="g":(X="w",Z=Y))):(X=Y.style.FType||X,"w"==X&&(Z=this.editorUi.editor.graph.extFonts,Y=null,null!=Z&&(Y=Z.find(function(fa){return fa.name==
W})),Z=null!=Y?Y.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=Z&&Z.substring(0,PROXY_URL.length)==PROXY_URL&&(Z=decodeURIComponent(Z.substr((PROXY_URL+"?url=").length)));var ca=null;document.activeElement==R.cellEditor.textarea&&(ca=R.cellEditor.saveSelection());X=new FontDialog(this.editorUi,W,Z,X,mxUtils.bind(this,function(fa,aa,ea){null!=ca&&(R.cellEditor.restoreSelection(ca),ca=null);if(null!=fa&&0<fa.length)if("1"!=urlParams["ext-fonts"]&&R.isEditing())R.setFont(fa,aa);else{R.getModel().beginUpdate();
try{R.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(R.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),R.setCellStyles("fontSource",null!=aa?encodeURIComponent(aa):null),R.setCellStyles("FType",null)):(R.setCellStyles(mxConstants.STYLE_FONTFAMILY,fa),"s"!=ea&&(R.setCellStyles("FType",ea),0==aa.indexOf("http://")&&(aa=PROXY_URL+"?url="+encodeURIComponent(aa)),this.editorUi.editor.graph.addExtFont(fa,aa)));ea=!0;for(var va=0;va<this.customFonts.length;va++)if(this.customFonts[va].name==fa){ea=!1;break}ea&&
(this.customFonts.push({name:fa,url:aa}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{R.getModel().endUpdate()}}}));this.editorUi.showDialog(X.container,380,Editor.enableWebFonts?250:180,!0,!0);X.init()}),u,null,!0)})))}})();function DiagramPage(b,g){this.node=b;null!=g?this.node.setAttribute("id",g):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";z!=this.tabContainer.style.height&&this.refresh(!1)}g.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(z,B){z=B.getProperty("edit").changes;for(B=0;B<z.length;B++)if(z[B]instanceof RenamePage||z[B]instanceof ChangePage||z[B]instanceof mxRootChange){this.updateTabContainer();
(function(){function g(u){if(u&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[u])u=F[u];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var t=F[D];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[u]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:
""}if("Liberation Sans"!=u)return lb="fontFamily="+u+";","font-family: "+u+";"}}catch(t){}return""}function z(u){return Math.round(10*u)/10}function B(u,F,D){function t(la,Ma){var ya="",za=la.t,Qb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Qb.v)null==za&&(Na&&(ya+=O(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=O(!0));Na=za.v;Ka=Qb.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(Qb.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 ea=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=
Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(ea=Va.v),Va=aa[++Ma]}catch(Gb){console.log(Gb)}ea=T(ea);null!=ea&&(ea=ea.substring(0,7),ya+="color:"+ea+";");xb&&(ya+="font-size:"+z(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=ea=la.a?la.a.v:D.TextAlign||"center","left"==ea?xb="flex-start":"right"==ea&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+ea+"; 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="'+p(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=T(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 O(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 Qb=Ba.pop();la+="</"+Qb+">"}while(za&&0<Ba.length);return la}var q={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 q[la.n]});for(var U=[0],wa=0;0<(wa=u.indexOf("\n",wa));)wa++,U.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>U[wa])F.splice(ja,0,{s:U[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==U[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=U[wa]&&F.push({s:U[wa],n:"a",v:D.TextAlign||
"center"});U="";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=u.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},U+=r(u,La,Ia,!0),l=La=Ia,U+=O());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:u.length;U+=t(ma,na);ua&&(U+=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&&(U+=e(na)+r(u,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];U+=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);U+=r(u,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}U+=r(null,null,null,!0);ua&&(l!=Ia&&(U+=e({dummy:1})+r(u,l,Ia)),U+=O(!0));return U}function m(u,F){G=!1;var D=null!=u.Text&&u.Text.t?u.Text:null!=u.Value&&u.Value.t?u.Value:
null!=u.Lane_0&&u.Lane_0.t?u.Lane_0:null;null==D&&null!=u.State?u.State.t&&(D=u.State):null==D&&null!=u.Note?u.Note.t&&(D=u.Note):null==D&&null!=u.Title?u.Title.t&&(D=u.Title):u.t&&(D=u);null==D&&null!=u.TextAreas?null!=u.TextAreas.Text&&null!=u.TextAreas.Text.Value&&u.TextAreas.Text.Value.t&&(D=u.TextAreas.Text.Value):null==D&&null!=u.t0&&u.t0.t&&(D=u.t0);if(null!=D){if(null!=D.t){var t=D.t;t=t.replace(/\u2028/g,"\n");D=D.m;try{/   /.test(t)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<
D[e].s||null!=D[e].e&&D[e].e<t.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(t,D,u)}catch(O){console.log(O)}t=t.replace(/</g,"&lt;");return t=t.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(u){return null!=u.Action?u.Action:u}function c(u){if(null!=u.Text){if(null!=u.Text.m)return u.Text.m}else if(null!=u.TextAreas){if(null!=u.TextAreas.Text&&
null!=u.TextAreas.Text.Value&&null!=u.TextAreas.Text.Value.m)return u.TextAreas.Text.Value.m}else{if(null!=u.m)return u.m;if(null!=u.Title){if(null!=u.Title.m)return u.Title.m}else if(null!=u.State){if(null!=u.State.m)return u.State.m}else if(null!=u.Note&&null!=u.Note.m)return u.Note.m}return null}function a(u,F){u="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(u)+k(u)+n(u)+x(u)+C(u)+J(u)+M(u)+K(u)+P(u))+R(u)+H(u)+Zb(mxConstants.STYLE_ALIGN,u.TextAlign,"center");lb=
"";return u}function b(u,F,D,t,e,O){O=null==O?!1:O;var r="",q=!1,Z=!1;if(null!=u)if(O){O=u.split(";");u="";for(var aa=0;aa<O.length;aa++)"fillColor=none"==O[aa]?Z=!0:"strokeColor=none"==O[aa]?q=!0:""!=O[aa]&&(u+=O[aa]+";")}else""!=u&&";"!=u.charAt(u.length-1)&&(r=";");r+=(Xc(u,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(u,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(u,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,u,F,D,t)+d(mxConstants.STYLE_FONTFAMILY,u,F,D,t)+d(mxConstants.STYLE_FONTCOLOR,
u,F,D,t)+d(mxConstants.STYLE_FONTSTYLE,u,F,D,t)+d(mxConstants.STYLE_ALIGN,u,F,D,t)+d(mxConstants.STYLE_SPACING_LEFT,u,F,D,t)+d(mxConstants.STYLE_SPACING_RIGHT,u,F,D,t)+d(mxConstants.STYLE_SPACING_TOP,u,F,D,t)+d(mxConstants.STYLE_SPACING_BOTTOM,u,F,D,t))+d(mxConstants.STYLE_ALIGN+"Global",u,F,D,t)+d(mxConstants.STYLE_SPACING,u,F,D,t)+d(mxConstants.STYLE_VERTICAL_ALIGN,u,F,D,t)+d(mxConstants.STYLE_STROKECOLOR,u,F,D,t)+d(mxConstants.STYLE_OPACITY,u,F,D,t)+d(mxConstants.STYLE_ROUNDED,u,F,D,t)+d(mxConstants.STYLE_ROTATION,
u,F,D,t)+d(mxConstants.STYLE_FLIPH,u,F,D,t)+d(mxConstants.STYLE_FLIPV,u,F,D,t)+d(mxConstants.STYLE_SHADOW,u,F,D,t)+d(mxConstants.STYLE_FILLCOLOR,u,F,D,t)+d(mxConstants.STYLE_DASHED,u,F,D,t)+d(mxConstants.STYLE_STROKEWIDTH,u,F,D,t)+d(mxConstants.STYLE_IMAGE,u,F,D,t)+d(mxConstants.STYLE_POINTER_EVENTS,u,F,D,t);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");q&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(u,F,D,t,e){if(!Xc(F,u))switch(u){case mxConstants.STYLE_FONTSIZE:return f(D);
case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return n(D);case mxConstants.STYLE_FONTSTYLE:return x(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 J(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return P(D);case mxConstants.STYLE_SPACING:return R(D);
case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return I(D,t);case mxConstants.STYLE_OPACITY:return Q(D,t,e);case mxConstants.STYLE_ROUNDED:return u=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",u;case mxConstants.STYLE_ROTATION:return ha(D,t,e);case mxConstants.STYLE_FLIPH:return u=D.FlipX?"flipH=1;":"",u;case mxConstants.STYLE_FLIPV:return u=D.FlipY?"flipV=1;":"",u;case mxConstants.STYLE_SHADOW:return V(D);
case mxConstants.STYLE_FILLCOLOR:return ca(D,t);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,t);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(u){var F=c(u);if(null!=F)for(var D=
0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var t=F[D].v;break}!t&&u.Font&&(t=u.Font);y(t);return lb}function p(u){return"ext"==u.tp?u.url:"ml"==u.tp?"mailto:"+u.eml:"pg"==u.tp?"data:page/id,"+(LucidImporter.pageIdsMap[u.id]||0):"c"==u.tp?"data:confluence/id,"+u.ccid:null}function n(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("c"==D.n&&null!=D.v)return u=T(D.v).substring(0,7),"#000000"==u&&(u="default"),mxConstants.STYLE_FONTCOLOR+"="+u+";";F++}return""}function x(u){return A(c(u))}function A(u){if(null!=
u){var F=0,D=!1;if(null!=u)for(var t=0;!D&&t<u.length;){var e=u[t];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);t++}D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),t++;D=!1;if(null!=u)for(t=0;!D&&t<u.length;)e=u[t],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),t++;if(0<F)return"fontStyle="+F+";"}return""}function C(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function J(u){u=
c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function P(u){u=c(u);if(null!=u)for(var F=0;F<u.length;){var D=u[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+
z(.75*D.v)+";";F++}return""}function R(u){return"number"===typeof u.InsetMargin?"spacing="+Math.max(0,z(.75*u.InsetMargin))+";":""}function H(u){return null!=u.Text_VAlign&&"string"===typeof u.Text_VAlign?"verticalAlign="+u.Text_VAlign+";":null!=u.Title_VAlign&&"string"===typeof u.Title_VAlign?"verticalAlign="+u.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,u.TextVAlign,"middle")}function I(u,F){return 0==u.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,W(u.LineColor),
"#000000")}function L(u){return null!=u?mxConstants.STYLE_FILLCOLOR+"="+W(u)+";":""}function N(u){return null!=u?"swimlaneFillColor="+W(u)+";":""}function Q(u,F,D){F="";if("string"===typeof u.LineColor&&(u.LineColor=T(u.LineColor),7<u.LineColor.length)){var t="0x"+u.LineColor.substring(u.LineColor.length-2,u.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(t)/2.55)+";")}"string"===typeof u.FillColor&&(u.FillColor=T(u.FillColor),7<u.FillColor.length&&(u=
"0x"+u.FillColor.substring(u.FillColor.length-2,u.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(u)/2.55)+";")));return F}function ha(u,F,D){var t="";if(null!=u.Rotation){u=mxUtils.toDegree(parseFloat(u.Rotation));var e=!0;0!=u&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==u||270==u)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(u+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
F.Class)?(u-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(u+=180);0!=u&&(t+="rotation="+u+";");e||(t+="horizontal=0;")}return t}function V(u){return null!=u.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function T(u){if(u){if("object"===typeof u)try{u=u.cs[0].c}catch(F){console.log(F),u="#ffffff"}"rgb"==u.substring(0,3)?u="#"+u.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=u.charAt(0)&&(u="#"+u)}return u}function W(u){return(u=T(u))?
u.substring(0,7):null}function oa(u,F){return(u=T(u))&&7<u.length?F+"="+Math.round(parseInt("0x"+u.substr(7))/2.55)+";":""}function ca(u,F){if(null!=u.FillColor)if("object"===typeof u.FillColor){if(null!=u.FillColor.cs&&1<u.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,W(u.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,W(u.FillColor.cs[1].c))}else return"string"===typeof u.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,W(u.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
"dashed32"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==u.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=u.StrokeStyle&&"dashed"==u.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(u){return null!=u.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(u.LineWidth)),"1"):""}function Fa(u,F,D){var t="";u.FillColor&&u.FillColor.url?(D=u.FillColor.url,"fill"==u.FillColor.pos&&(t="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=u.URL:"UserImage2Block"==
F.Class&&null!=u.ImageFillProps&&null!=u.ImageFillProps.url&&(D=u.ImageFillProps.url);return null!=D?"image="+g(D)+";"+t:""}function ka(u,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(u,"link",p(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(u,"Notes",F.NoteHint.t);var t=[],e=D.convertValueToString(u),O=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var q=match[0];O=!0;if(2<q.length){var Z=q.substring(2,q.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":
match.index+q.length}}O&&(t.push(e.substring(r)),D.setAttributeForCell(u,"label",t.join("")),D.setAttributeForCell(u,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var U=F[aa],wa=mxUtils.trim(U.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(u,wa,U.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(u,F,D,t){for(var e=F,O=0;null!=t.getAttributeForCell(u,e);)O++,e=F+"_"+O;t.setAttributeForCell(u,
e,null!=D?D:"")}function yb(u,F,D,t,e,O){var r=h(F);if(null!=r){var q=Od[r.Class];null!=q?(u.style+=q,";"!=u.style.charAt(u.style.length-1)&&(u.style+=";")):u.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);q=null!=r.Properties?r.Properties:r;if(null!=q&&(u.value=O?"":m(q),u.style+=b(u.style,q,r,u,G,!0),u.style.includes("strokeColor")||(u.style+=I(q,r)),ka(u,q,D),q.Title&&q.Title.t&&q.Text&&q.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=u.geometry,D=new mxCell(m(q.Title),
new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,u.insert(D),D.style+=a(q.Title,G)),u.edge)){u.style=null!=q.Rounding&&"diagonal"!=q.Shape?u.style+("rounded=1;arcSize="+q.Rounding+";"):u.style+"rounded=0;";if(D="curve"==q.Shape)u.style+="curved=1;";else if("diagonal"!=q.Shape)if(null!=q.ElbowPoints&&0<q.ElbowPoints.length)for(u.geometry.points=[],r=0;r<q.ElbowPoints.length;r++)u.geometry.points.push(new mxPoint(Math.round(.75*q.ElbowPoints[r].x+wc),Math.round(.75*
q.ElbowPoints[r].y+xc)));else if("elbow"==q.Shape||null!=q.Endpoint1.Block&&null!=q.Endpoint2.Block)u.style+="edgeStyle=orthogonalEdgeStyle;";if(q.LineJumps||LucidImporter.globalProps.LineJumps)u.style+="jumpStyle=arc;";null!=q.Endpoint1.Style&&(O=Ee[q.Endpoint1.Style],null!=O?(O=O.replace(/xyz/g,"start"),u.style+="startArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint1.Style)));null!=q.Endpoint2.Style&&(O=Ee[q.Endpoint2.Style],null!=
O?(O=O.replace(/xyz/g,"end"),u.style+="endArrow="+O+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+q.Endpoint2.Style)));O=null!=q.ElbowControlPoints&&0<q.ElbowControlPoints.length?q.ElbowControlPoints:q.Joints;if(D&&null!=q.BezierJoints&&0<q.BezierJoints.length){O=[];D=q.BezierJoints[q.BezierJoints.length-1];D.p.x=q.Endpoint2.x;D.p.y=q.Endpoint2.y;for(r=0;r<q.BezierJoints.length;r++)D=q.BezierJoints[r],O.push({x:D.p.x+D.nt.x*D.lcps*.75,y:D.p.y+D.nt.y*
D.lcps*.75}),O.push({x:D.p.x+D.nt.x*D.rcps*.75,y:D.p.y+D.nt.y*D.rcps*.75});O=O.slice(1,O.length-1)}else D&&(O=[],O.push({x:q.Endpoint1.x+(.1>q.Endpoint1.LinkX?-250:.9<q.Endpoint1.LinkX?250:0),y:q.Endpoint1.y+(.1>q.Endpoint1.LinkY?-250:.9<q.Endpoint1.LinkY?250:0)}),O.push({x:q.Endpoint2.x+(.1>q.Endpoint2.LinkX?-250:.9<q.Endpoint2.LinkX?250:0),y:q.Endpoint2.y+(.1>q.Endpoint2.LinkY?-250:.9<q.Endpoint2.LinkY?250:0)}));if(null!=O)for(u.geometry.points=[],r=0;r<O.length;r++)D=O[r].p?O[r].p:O[r],u.geometry.points.push(new mxPoint(Math.round(.75*
D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==u.geometry.points||0==u.geometry.points.length)&&null!=q.Endpoint1.Block&&q.Endpoint1.Block==q.Endpoint2.Block&&null!=t&&null!=e){D=new mxPoint(Math.round(t.geometry.x+t.geometry.width*q.Endpoint1.LinkX),Math.round(t.geometry.y+t.geometry.height*q.Endpoint1.LinkY));O=new mxPoint(Math.round(e.geometry.x+e.geometry.width*q.Endpoint2.LinkX),Math.round(e.geometry.y+e.geometry.height*q.Endpoint2.LinkY));wc=D.x==O.x?Math.abs(D.x-t.geometry.x)<t.geometry.width/
2?-20:20:0;xc=D.y==O.y?Math.abs(D.y-t.geometry.y)<t.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(O.x+wc,O.y+xc);Z.generated=!0;aa.generated=!0;u.geometry.points=[Z,aa];D=D.x==O.x}null!=t&&t.geometry.isRotated||(Z=Fe(u,q.Endpoint1,!0,D,null,t));null!=t&&null!=Z&&(null==t.stylePoints&&(t.stylePoints=[]),t.stylePoints.push(Z),LucidImporter.stylePointsSet.add(t));null!=e&&e.geometry.isRotated||(aa=Fe(u,q.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&&(u.style+=";lucidId="+F.id+";");u.lucidchartObject=F}function vb(u,F){var D=h(u).Properties,t=D.BoundingBox;null==u.Class||"AWS"!==u.Class.substring(0,3)&&"Amazon"!==u.Class.substring(0,6)||u.Class.includes("AWS19")||(t.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*t.x+wc),Math.round(.75*t.y+xc),Math.round(.75*t.w),Math.round(.75*t.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;yb(v,u,F);
v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(u,F,D,t){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;yb(e,u,F,D,t,!0);var O=h(u).Properties,r=null!=O?O.TextAreas:u.TextAreas;if(null!=r){for(var q=0;void 0!==r["t"+q];){var Z=r["t"+q];null!=Z&&(e=Pd(Z,e,u,D,t,F));q++}for(q=0;void 0!==r["m"+q]||1>q;)Z=r["m"+q],null!=Z&&(e=Pd(Z,e,u,D,t,F)),q++;null!=r.Text&&(e=Pd(r.Text,e,u,D,t,F));r=null!=O?O.TextAreas:u.TextAreas;null!=
r.Message&&(e=Pd(r.Message,e,u,D,t,F))}u.Hidden&&(e.visible=!1);return e}function Pd(u,F,D,t,e,O){var r=2*(parseFloat(u.Location)-.5);isNaN(r)&&null!=u.Text&&null!=u.Text.Location&&(r=2*(parseFloat(u.Text.Location)-.5));O=m(u);var q=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var U="13",wa="";if(null!=u&&null!=u.Value&&null!=u.Value.m){wa=A(u.Value.m);for(var ja=0;ja<u.Value.m.length;ja++)if("s"==u.Value.m[ja].n&&u.Value.m[ja].v)U=z(.75*parseFloat(u.Value.m[ja].v));
else if("c"==u.Value.m[ja].n){var na=T(u.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="+U+";"}q=new q(O,r,Z+aa);q.geometry.relative=!0;q.vertex=!0;if(u.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=t&&null!=e){var ra=t.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(O.replace(/\n/g,"<br>"));q.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*u.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*u.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}q.lucidchartObject=u;F.insert(q);return F}function Zb(u,F,D,t){null!=F&&null!=t&&(F=t(F));return null!=F&&F!=D?u+"="+F+";":
""}function Fe(u,F,D,t,e,O){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!=O&&O.style&&-1<O.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=O&&O.style&&-1<O.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),u.style+=(t?"":(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(u,F,D,t,e){try{var O=function(ma,
Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)O(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,q=Math.min(q,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),U=Math.max(U,(ma.y+(ma.height?ma.height:0))*Ba)};null!=u.Action&&null!=u.Action.Properties&&(u=u.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=u.ZOrder;var q=Infinity,Z=Infinity,aa=-Infinity,U=-Infinity,wa=u.Members;e=[];for(var ja in wa){var na=
F[ja];null!=na?e.push(na):null!=t[ja]&&(e.push(t[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)O(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;O(ra.Endpoint1,!0);O(ra.Endpoint2,!0);O(ra.ElbowPoints,!0);O(ra.ElbowControlPoints,!0);O(ra.BezierJoints,!0);O(ra.Joints,!0)}r.geometry.x=q;r.geometry.y=Z;
r.geometry.width=aa-q;r.geometry.height=U-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=q;Aa.y-=Z}u.IsState?(r.lucidLayerInfo={name:u.Name,visible:!u.Hidden,locked:u.Restrictions.b&&u.Restrictions.p&&u.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):u.Hidden&&(r.visible=!1);r.lucidchartObject=u;return r}catch(ma){console.log(ma)}}function zf(u,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;u.getModel().beginUpdate();
try{var t=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?O[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?O[ua.Endpoint2.Block]:null,l=yf(Ca,u,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(u.addCell(l,Ca,null,Ka,La))},e=[],O={},r={},q={},Z=[];null!=F.Lines&&(q=F.Lines);if(null!=
F.Blocks){Object.assign(q,F.Blocks);for(var aa in F.Blocks){var U=F.Blocks[aa];U.id=aa;var wa=!1;null!=Od[U.Class]&&"mxCompositeShape"==Od[U.Class]&&(O[U.id]=Ie(U,e,u),Z.push(U),wa=!0);wa||(O[U.id]=vb(U,u),Z.push(U))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,u,O)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)U=F.Objects[ja],q[U.id]=U,null!=U.Action&&"mxCompositeShape"==
Od[U.Action.Class]?O[U.id]=Ie(U,e,u):U.IsBlock&&null!=U.Action&&null!=U.Action.Properties?O[U.id]=vb(U,u):U.IsGenerator&&U.GeneratorData&&U.GeneratorData.p&&("OrgChart2018"==U.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(U.GeneratorData.id,U.GeneratorData.p,U.GeneratorData.gs,u,O)):LucidImporter.hasUnknownShapes=!0),Z.push(U);for(ja=0;ja<F.Objects.length;ja++)if(U=F.Objects[ja],U.IsGroup){var na=He(U,O,r,q,u);na&&(O[U.id]=na,Z.push(U))}}if(null!=F.Groups)try{for(aa in F.Groups)if(U=
F.Groups[aa],U.id=aa,na=He(U,O,r,q,u))O[U.id]=na,Z.push(U)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)U=F.Lines[aa],U.id=aa,Z.push(U);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++){U=Z[ja];var ra=O[U.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;u.addCell(Aa,u.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
Pa),Cf(u,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),u),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||u.setSelectionCells(e)}finally{u.getModel().endUpdate()}}function Cf(u,F){if(u.model.contains(F)&&F.edge){var D=u.view.getState(F);if(null!=D&&null!=F.children){var t=mxRectangle.fromRectangle(D.paintBounds);t.grow(5);for(var e=0;e<F.children.length;e++){var O=u.view.getState(F.children[e]);
null==O||mxUtils.contains(t,O.paintBounds.x,O.paintBounds.y)||(O.cell.geometry.offset=new mxPoint(0,0))}}u=F.lucidchartObject;null!=u&&"elbow"==u.Shape&&null==u.ElbowControlPoints&&null==u.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(u,F){if(u.model.contains(F)&&null!=F.style&&""!=F.style){u=F.style.split(";");for(var D={},t=[],e=u.length-1;0<=e;e--){var O=u[e].split("=");if(2!=O.length||null==D[O[0]])D[O[0]]=O[1],""!=u[e]&&t.push(u[e])}F.style=t.reverse().join(";")+";"}}function Af(u,F){if(u.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,t=0;t<F.children.length;t++)if(F.children[t].vertex){var e=
F.children[t].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[t]}}F=D;if(null!=F&&(D=F.parent,""==u.convertValueToString(D))){if(null!=F.edges)for(t=0;t<F.edges.length;t++)F.edges[t].source==F&&F.edges[t].setTerminal(F.parent,!0),F.edges[t].target==F&&F.edges[t].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),t=0;t<e.length;t++)D.insert(e[t]);u.cellLabelChanged(D,u.convertValueToString(F));
D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var u=new Graph;u.setExtendParents(!1);u.setExtendParentsOnAdd(!1);u.setConstrainChildren(!1);u.setHtmlLabels(!0);u.getModel().maintainEdgeParent=!1;return u}function Qd(u,F,D,t,e,O,r,q){this.nurbsValues=[1,3,0,0,100*(u+D),100-100*(1-(F+t)),0,1,100*(e+r),100-100*(1-(O+q)),0,1]}function Ke(u,F){try{for(var D=[],t=F.BoundingBox.w,e=F.BoundingBox.h,O=0;O<F.Shapes.length;O++){var r=
F.Shapes[O],q=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,U=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=U[Aa.p1].x,Ba=U[Aa.p1].y;ma=100*ma/t;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=U[Aa.p2].x,Ca=U[Aa.p2].y,ua=t,Na=e,Ka=new Qd(U[Aa.p1].x/t,U[Aa.p1].y/e,Aa.n1.x/t,Aa.n1.y/e,U[Aa.p2].x/t,U[Aa.p2].y/
Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=U[Aa.p2].x,Ba=U[Aa.p2].y,ma=100*ma/t,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:q,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[u]={text:F.Text,w:t,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(u,F,D,t,e,O,r,q){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;r.insert(u);O=[u];D=D.clone();q.insertEdge(D,!1);u.insertEdge(D,!0);O.push(D);t.push(e.addCell(D,null,null,null,null))}function fb(u,F,D,t,e,O,r,q,Z){u=new mxCell("",new mxGeometry(u,F,0,0),"strokeColor=none;fillColor=none;");u.vertex=!0;Z.insert(u);D=new mxCell("",new mxGeometry(D,t,0,0),"strokeColor=none;fillColor=none;");
D.vertex=!0;Z.insert(D);q=[D];e=e.clone();u.insertEdge(e,!0);D.insertEdge(e,!1);q.push(e);O.push(r.addCell(e,null,null,null,null))}function Sa(u,F,D,t,e,O){t.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";t.style+=b(t.style,e,O,t);F=m(e);t.vertex=!0;u=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+u+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
u.style+=b(u.style,e,O,u,G);u.geometry.relative=!0;u.geometry.offset=new mxPoint(5,-12);u.vertex=!0;t.insert(u)}function Wa(u,F,D,t,e,O,r,q){e="transparent"!=u?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";O.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";O.style+=b(O.style,r,q,O);O.value=m(r);O.vertex=!0;u=new mxCell(null,new mxGeometry(.5,0,.7*t*F,.7*t*D),e+u+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
u.geometry.relative=!0;u.geometry.offset=new mxPoint(-F*t*.35,10+(1-D)*t*.35);u.vertex=!0;u.style+=b(u.style,r,q,u,G);O.insert(u)}function Xc(u,F){return null!=u&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),u.includes(";"+F+"=")||u.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(u,F){function D(t){t=Math.round(parseInt("0x"+t)*F).toString(16);return 1==t.length?"0"+t:t}return"#"+D(u.substr(1,2))+D(u.substr(3,2))+D(u.substr(5,2))}function Ie(u,F,D){var t=h(u),e=t.Properties,
O=e.BoundingBox,r=Math.round(.75*O.w),q=Math.round(.75*O.h),Z=Math.round(.75*O.x+wc),aa=Math.round(.75*O.y+xc);null==u.Class||"GCPInputDatabase"!==u.Class&&"GCPInputRecord"!==u.Class&&"GCPInputPayment"!==u.Class&&"GCPInputGateway"!==u.Class&&"GCPInputLocalCompute"!==u.Class&&"GCPInputBeacon"!==u.Class&&"GCPInputStorage"!==u.Class&&"GCPInputList"!==u.Class&&"GCPInputStream"!==u.Class&&"GCPInputMobileDevices"!==u.Class&&"GCPInputCircuitBoard"!==u.Class&&"GCPInputLive"!==u.Class&&"GCPInputUsers"!==u.Class&&
new mxGeometry(0,0,.125*q,q),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*q-Aa.height,Aa.width,r-.125*q,q),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,t,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,t,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"");v.style+=b(v.style,e,t,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+n(e[ma])+k(e[ma])+x(e[ma])+C(e[ma],v)+J(e[ma])+M(e[ma])+K(e[ma])+P(e[ma]))+R(e[ma])+H(e[ma]));for(var ya=0,za=[],Qb="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;":""),ea=e.Rotation=0;ea<Ka;ea++){if(null==Ba){var xb=parseFloat(e.Lanes[ea].p);
l=parseInt(e.Lanes[ea].tid)||ea;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[ea]/r,l=ea,Va=Ba[ea];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,q-vc,r*xb):new mxGeometry(rc,vc,r*xb,q-vc),Qb));za[ea].vertex=!0;v.insert(za[ea]);za[ea].value=m(e[Va]);za[ea].style+=b(za[ea].style,e,t,za[ea],G)+(G?"fontSize=13;":f(e[Va])+n(e[Va])+x(e[Va])+C(e[Va],za[ea])+J(e[Va])+M(e[Va])+K(e[Va])+P(e[Va]))+R(e[Va])+H(e[Va])+L(e[Pa+l])+N(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
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(ea=0;ea<Gb;ea++){if(null==Lb){var Sd=.75*parseInt(e.Rows[ea].height);l=parseInt(e.Rows[ea].id)||ea;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[ea],Sb=Lb[ea];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,t,Hc,G)+(G?"fontSize=13;":f(e[Sb])+n(e[Sb])+x(e[Sb])+C(e[Sb],
Hc)+J(e[Sb])+M(e[Sb])+K(e[Sb])+P(e[Sb]))+R(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(ea=Z=0;ea<Rb;ea++){if(null==$b){var Yc=.75*parseInt(e.Columns[ea].width);l=parseInt(e.Columns[ea].id)||ea;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[ea],Tb=$b[ea];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,q),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,t,Ic,G)+(G?"fontSize=13;":
f(e[Tb])+n(e[Tb])+x(e[Tb])+C(e[Tb],Ic)+J(e[Tb])+M(e[Tb])+K(e[Tb])+P(e[Tb]))+R(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,t,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,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");var zb=
new mxCell("",new mxGeometry(0,25,r,q-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");zb.value=m(e.Action,!0);zb.style+=b(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb)}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,t,v,G);v.style+=ca(e,t).replace("fillColor","swimlaneFillColor");zb=new mxCell("",new mxGeometry(0,he,r,q-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
zb.value=m(e.Text,!0);zb.style+=b(zb.style,e,t,zb,G);zb.vertex=!0;v.insert(zb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ha(e,t,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*q),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
!0,v.insert($c))}v.style+=b(v.style,e,t,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,q-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");
ib.style+="strokeColor=#E2E2E2;",jb.style+="strokeColor=#E2E2E2;");v.style+=b(v.style,e,t,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);ac.value=m(e.DialogTitle);ac.style+=a(e.DialogTitle,G);Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);ib=new mxCell("",new mxGeometry(0,q-25,.5*r,25),"fillColor=none;");ib.vertex=
hd.style+="strokeColor=none;fillColor=#939393;");v.style+=b(v.style,e,t,v);break;case "AndroidListItems":var Cb=q,zc=0;if(e.ShowHeader){zc=8;var Oc=new mxCell("",new mxGeometry(0,0,r,zc),"strokeColor=none;fillColor=none;");Oc.vertex=!0;v.insert(Oc);Oc.value=m(e.Header);Oc.style+=a(e.Header,G);Cb-=zc;var Pe=new mxCell("",new mxGeometry(0,zc-2,r,4),"shape=line;strokeColor=#999999;");Pe.vertex=!0;v.insert(Pe)}var bc=parseInt(e.Items);0<bc&&(Cb/=bc);var X=[];Qa=[];for(l=0;l<bc;l++)X[l]=new mxCell("",
new mxGeometry(0,zc+l*Cb,r,Cb),"strokeColor=none;fillColor=none;"),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["Item_"+l]),X[l].style+=a(e["Item_"+l],G),0<l&&(Qa[l]=new mxCell("",new mxGeometry(0,zc+l*Cb-2,r,4),"shape=line;"),Qa[l].vertex=!0,v.insert(Qa[l]),Qa[l].style="Dark"==e.Scheme?Qa[l].style+"strokeColor=#ffffff;":Qa[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=b(v.style,e,t,v);
new mxCell("",new mxGeometry(e.Selected*Hb+2,q-3,Hb-4,3),"strokeColor=none;fillColor=#33B5E5;");Qe.vertex=!0;v.insert(Qe);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=b(v.style,e,t,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),Math.round(.5*q)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;var zd=new mxCell("",new mxGeometry(0,
0,r*e.BarPosition,Math.round(.5*q)),"strokeColor=none;fillColor=#33B5E5;");zd.vertex=!0;v.insert(zd);v.style="Dark"==e.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=b(v.style,e,t,v);break;case "AndroidImageBlock":v.style="Dark"==e.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=b(v.style,e,
t,v);break;case "AndroidTextBlock":v.style="Dark"==e.Scheme?e.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":e.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=m(e.Label);v.style+=a(e.Label,G);v.style+=b(v.style,e,t,v,G);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(e.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";
new mxGeometry(20,5,2,q-10),"shape=line;direction=north;");id.vertex=!0;v.insert(id);switch(e.VlignColor){case "Blue":id.style+="strokeColor=#244C5A;";break;case "White":id.style+="strokeColor=#ffffff;"}}v.style+=b(v.style,e,t,v);break;case "AndroidButton":v.value=m(e.Label);v.style+=a(e.Label,G)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==e.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=b(v.style,e,t,v);
break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new mxCell("",new mxGeometry(2,q-6,r-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ad.vertex=!0;v.insert(Ad);v.style="Dark"==e.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ad.style=e.TextFocused?Ad.style+"strokeColor=#33B5E5;":Ad.style+"strokeColor=#A9A9A9;";v.style+=b(v.style,e,t,v);break;case "AndroidRadioButton":var Pc=null;e.Checked&&(Pc=new mxCell("",new mxGeometry(.15*
r,.15*q,.7*r,.7*q),"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,t,v);break;case "AndroidCheckBox":var ie=
null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-q,r,.8*q),"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,t,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,t,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,t,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Hb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),
"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,t):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,t,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,t,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*q),Math.round(r),
Math.round(.5*q)),"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*q)),"strokeColor=none;"+ca(e,t));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,t,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,t,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,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Db=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.Carrier,G);v.style+=b(v.style,e,t,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*q,.4*q,.4*q),"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,t,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Db=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,q),"strokeColor=none;fillColor=none;");Db.vertex=!0;v.insert(Db);Db.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*
r,.2*q,.3*q,.5*q),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Hb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,t,v);0<cc&&(Hb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Hb,0,Hb,q),"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])+n(e["Tab_"+l])+x(e["Tab_"+l])+C(e["Tab_"+l])+J(e["Tab_"+l])+M(e["Tab_"+l])+K(e["Tab_"+l])+P(e["Tab_"+l])+R(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*q),"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,.8*q,.15*r,.2*q),"strokeColor=none;fillColor=none;");oc.vertex=!0;v.insert(oc);oc.value=m(e.Option35);oc.style+=a(e.Option35,G);Ab=new mxCell("",new mxGeometry(0,.4*q-2,r,4),"shape=line;strokeColor=#888888;");Ab.vertex=!0;v.insert(Ab);Bb=new mxCell("",new mxGeometry(0,.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSTimePicker":dc=new mxCell("",new mxGeometry(0,0,.25*r,.2*q),"strokeColor=none;fillColor=none;");
.6*q-2,r,4),"shape=line;strokeColor=#888888;");Bb.vertex=!0;v.insert(Bb);v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSCountdownPicker":fc=new mxCell("",new mxGeometry(.45*r,0,.2*r,.2*q),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);ic=new mxCell("",new mxGeometry(.45*r,.2*q,.2*r,.2*q),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);qb=new mxCell("",
"strokeColor=none;";v.style+=b(v.style,e,t,v);break;case "iOSBasicCell":v.value=m(e.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.75*e.SeparatorInset+";";v.style+=(G?"fontSize=13;":f(e.text)+n(e.text)+x(e.text))+H(e.text);v.style+=b(v.style,e,t,v,G);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=
!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+n(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);
var cb=new mxCell("",new mxGeometry(0,.4*q,r,.6*q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.75*e.SeparatorInset+";");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+n(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=
new mxGeometry(.89*r,.37*q,.4*q,.26*q),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.75*e.SeparatorInset+";";v.value=m(e.subtext);v.style+=G?"fontSize=13;":f(e.subtext)+n(e.subtext)+x(e.subtext);v.style+=b(v.style,e,t,v,G);cb=null;switch(e.AccessoryIndicatorType){case "Disclosure":Ja=
Ja.vertex=!0;v.insert(Ja);cb=new mxCell("",new mxGeometry(.55*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:cb=new mxCell("",new mxGeometry(.65*r,0,.3*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;")}cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+n(e.text)+x(e.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=
b(v.style,e,t,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,q),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ub.vertex=!0;v.insert(Ub);Ub.value=m(e.subtext);Ub.style+=G?"html=1;fontSize=13;"+lb:f(e.subtext)+k(e.subtext)+n(e.subtext)+x(e.subtext);cb=new mxCell("",new mxGeometry(.25*r,0,.5*r,q),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");cb.vertex=!0;v.insert(cb);cb.value=m(e.text);cb.style+=G?"html=1;fontSize=13;"+
lb:f(e.text)+k(e.text)+n(e.text)+x(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*q,.15*q,.3*q),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*q,.5*q,.5*q),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
Da=new mxCell("",new mxGeometry(0,0,r,.4*q),"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)+n(e.text)+x(e.text);Db=new mxCell("",new mxGeometry(0,.6*q,r,.4*q),"fillColor=none;strokeColor=none;spacing=10;align=left;");Db.vertex=!0;v.insert(Db);Db.value=m(e["bottom-text"]);Db.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+n(e["bottom-text"])+x(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)+n(e.text)+x(e.text);v.style+=b(v.style,e,t,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var w=new mxCell("",new mxGeometry(0,0,.9*r,.9*q),"rounded=1;arcSize=3;part=1;");w.vertex=!0;v.insert(w);w.style+=I(e,t)+ca(e,t)+Q(e,t,w)+V(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*q,.9*r,.9*
q),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=I(e,t)+ca(e,t)+Q(e,t,E)+V(e)+sa(e)+a(e,G);e.Future&&(w.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+=I(e,t)+ca(e,t)+Q(e,t,v)+V(e)+sa(e)+a(e,G);v.style+=b(v.style,e,t,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":w=
!0;v.insert(w);w.value=m(e.Text);w.style+=a(e,G);v.style+=b(v.style,e,t,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(0,.1*q,.9*r,.9*q),"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,t,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*q,q),"shape=curlyBracket;rounded=1;");
Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*q,0,.25*q,q),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*q,0,r-.5*q,q),"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,t,v);Bc.style+=Q(e,t,Bc);Cc.style+=Q(e,t,Cc);na.style+=n(e,na);Bc.style+=b(Bc.style,e,t,Bc);Cc.style+=b(Cc.style,e,t,Cc);na.style+=b(na.style,e,t,na,G);break;case "UMLTextBlock":v.value=
m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,t,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ha(e,t,v);e.Rotatio=null;var Vb=b(v.style,e,t,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,q),"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,t,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=ha(e,t,v);e.Rotatio=null;Vb=b(v.style,e,t,v,
w.geometry.offset=new mxPoint(4,5);break;case 7:w=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),w.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,t);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");w.style+=Rc+Y+"part=1;"}else w.style+=ca(e,t)+I(e,t)+"part=1;";w.geometry.relative=!0;w.vertex=!0;v.insert(w)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
0!=e.bpmnActivityMarker2&&Bd++;var Eb=0;1==Bd?Eb=-7.5:2==Bd&&(Eb=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",
new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}2==Bd&&(Eb=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 2:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");w.geometry.offset=new mxPoint(Eb,
-20);w.style+=ca(e,t)+I(e,t);break;case 3:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 4:w=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");w.geometry.offset=new mxPoint(Eb,-20);w.style+=ca(e,t)+I(e,t);break;case 5:w=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");w.geometry.offset=new mxPoint(Eb,-17);
Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");w.style+=Y;break;case 6:w=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),w.geometry.offset=new mxPoint(Eb,-18),w.style+=ca(e,t)+I(e,t)}w.geometry.relative=!0;w.vertex=!0;v.insert(w)}v.style+=b(v.style,e,t,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+=
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,t,v,G);break;case "BPMNChoreography":try{var ia=W(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,t,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,t,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,t,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&&(w=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),w.geometry.offset=new mxPoint(-6,-17),w.style+=ca(e,t)+I(e,t),w.geometry.relative=!0,w.vertex=!0,v.insert(w));v.style+=b(v.style,e,t,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,t,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:w=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");w.geometry.offset=new mxPoint(-6,-15);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);break;case 2:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");w.geometry.offset=new mxPoint(3,
3);w.style+=ca(e,t)+I(e,t);w.geometry.relative=!0;w.vertex=!0;v.insert(w);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:w=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),w.geometry.offset=new mxPoint(3,3),w.style+=I(e,t),w.geometry.relative=
!0,w.vertex=!0,v.insert(w),Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),w.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,t,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,q),"fillColor=#000000;strokeColor=none;opacity=30;");
w.vertex=!0;v.insert(w);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,.95*r,.95*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.05*q,.95*r,.95*q),"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,t,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,t,v,G);w=new mxCell("",new mxGeometry(0,0,.2*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Number);w.style+=a(e.Number,G);w.style+=b(w.style,e,t,w,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,t,v,!0);break;case "DefaultTableBlock":try{Gb=
"fillOpacity")||If;r=Cd[ea];var cf=q;Yc=r;for(var Nb=l+1;Nb<l+Xd.h;Nb++)if(null!=Vd[Nb]){cf+=Vd[Nb];Dd[Nb+","+ea]=!0;for(var Tc=ea+1;Tc<ea+Xd.w;Tc++)Dd[Nb+","+Tc]=!0}for(Nb=ea+1;Nb<ea+Xd.w;Nb++)if(null!=Cd[Nb])for(Yc+=Cd[Nb],Dd[l+","+Nb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Nb]=!0;var pa=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,W($e),
W(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;":""));pa.vertex=!0;pa.value=m(qc);pa.style+=b(pa.style,e,t,pa,G)+(G?"fontSize=13;":f(qc)+n(qc)+x(qc)+C(qc,pa)+J(qc)+M(qc)+K(qc)+P(qc))+R(qc)+H(qc);v.insert(pa);Z+=r}}aa+=q}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
"VSMDedicatedProcessBlock"==u.Class?v.value=m(e.Text):"VSMProductionControlBlock"==u.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,t,v,G);"VSMDedicatedProcessBlock"==u.Class&&(w=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(4,-13),w.vertex=!0,v.insert(w),w.style+=b(w.style,e,t,w));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,t,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*q,.8*r,.6*q),"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,t,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,t,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=b("part=1;",e,t,v);0<bc&&(Cb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),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,t,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,t,v);Cb=q;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,t,v);0<bc&&(Cb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Cb,.5*r,Cb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Cb,r,Cb),"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,t,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.17*r,.2*q,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");w.vertex=!0;v.insert(w);
w.style+=b(w.style,e,t,w);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";w=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.05*r,.1*q,.9*r,.8*q),"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,t,E);var S=new mxCell("",new mxGeometry(0,.2*q,.9*r,.8*q),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);S.vertex=!0;v.insert(S);S.value=m(e.Text);S.style+=b(S.style,e,t,S,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,q),"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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=
!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Subnet?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.permissions;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=
new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.virtual_private_cloud;fillColor=#146EB4;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,
0),E.vertex=!0,v.insert(E)):e.AWS?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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?(w=new mxCell("",new mxGeometry(0,0,r,q-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),w.geometry.offset=new mxPoint(0,20),w.geometry.relative=!0,w.vertex=!0,v.insert(w),w.value=m(e.Title),w.style+=b(w.style,e,t,w,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,t,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,t,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,t,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,t,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");pa.vertex=!0;v.insert(pa);var Oa=[pa];pa.style+=ca(e,t);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,pa);sc(.855*r,.145*q,va,F,D,Oa,v,pa);sc(r,.5*q,va,F,D,Oa,v,pa);sc(.855*r,.855*q,va,F,D,Oa,v,pa);sc(.5*r,q,va,F,D,Oa,v,pa);sc(.145*r,.855*q,va,F,D,Oa,v,pa);sc(0,.5*q,va,F,D,Oa,v,pa);sc(.145*r,.145*q,va,F,D,Oa,v,pa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";pa=new mxCell("",new mxGeometry(0,.5*q-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");
pa.vertex=!0;v.insert(pa);Oa=[pa];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=[pa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,pa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,q,va,F,D,Oa,v,pa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,t,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,t,v,G);"EIMessageChannelBlock"==u.Class?(w=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==
new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==u.Class&&(w=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),w.geometry.offset=new mxPoint(-10,-7));w.geometry.relative=!0;w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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*q,.85*r,.25*q,va,F,D,Oa,v,pa);break;
case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.07*q,.21*r,.86*q),"fillColor=#FFFF33;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.26*r,.09*q,.2*r,.82*q),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);S=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
S.geometry.relative=!0;S.geometry.offset=new mxPoint(.4*-r,-10);S.vertex=!0;v.insert(S);S.style+=b(S.style,e,t,S);da=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;");da.geometry.relative=!0;da.edge=!0;w.insertEdge(da,!0);E.insertEdge(da,!1);da.style+=I(e,t);F.push(D.addCell(da,null,null,null,null));ba=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;");
ba.geometry.relative=!0;ba.edge=!0;E.insertEdge(ba,!0);S.insertEdge(ba,!1);F.push(D.addCell(ba,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,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Fd=
e.Messages,oe=(q-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(u.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,t,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;w.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,t,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,t,v,G);w=new mxCell("",new mxGeometry(.45*r,.25*q,.3*r,.5*q),"part=1;fillColor=#ffffff");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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*q,.4*r,.5*q,va,F,D,Oa,v,pa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);var 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(.05*r,.5*q,.85*r,.5*q,da,F,D,Oa,v,pa);var ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.85*
r,.15*q,ba,F,D,Oa,v,pa);var xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");xa.geometry.relative=!0;xa.edge=!0;fb(.05*r,.5*q,.85*r,.85*q,xa,F,D,Oa,v,pa);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
da.geometry.relative=!0;da.edge=!0;da.style+=I(e,t);fb(.05*r,.5*q,.95*r,.5*q,da,F,D,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ba.geometry.relative=!0;ba.edge=!0;ba.style+=I(e,t);fb(.3*r,.1*q,.3*r,.5*q,ba,F,D,Oa,v,pa);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
xa.geometry.relative=!0;xa.edge=!0;xa.style+=I(e,t);fb(.7*r,.1*q,.7*r,.5*q,xa,F,D,Oa,v,pa);var Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");Ya.geometry.relative=!0;Ya.edge=!0;Ya.style+=I(e,t);fb(.5*r,.5*q,.5*r,.9*q,Ya,F,D,Oa,v,pa);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,
e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.21*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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(.45*r,.33*q,.8*r,.33*q,da,F,D,Oa,v,pa);E=new mxCell("",new mxGeometry(.64*r,.55*q,.16*r,.24*q),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,
e,t,E);ba=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;");ba.geometry.relative=!0;ba.edge=!0;fb(.55*r,.67*q,.2*r,.67*q,ba,F,D,Oa,v,pa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.1*r,.15*q,.8*r,.7*q),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");w.vertex=!0;v.insert(w);
w.style+=b(w.style,e,t,w);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.04*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.2*r,.56*q,.2*r,.32*q),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";w.style+=b(w.style,e,t,w);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;w.insertEdge(da,!1);E.insertEdge(da,!0);da.style+=b(da.style,e,t,da);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*q));da.geometry.points=Kc;F.push(D.addCell(da,null,null,null,null));S=new mxCell("",new mxGeometry(.6*r,.06*q,.18*r,.28*q),"ellipse;fillColor=#808080;part=1;");S.vertex=!0;v.insert(S);S.style+=I(e,t)+sa(e);S.style+=b(S.style,e,t,S);ta=new mxCell("",new mxGeometry(.76*
r,.56*q,.2*r,.32*q),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=I(e,t)+Q(e,t,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,t,ta);ba=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;");ba.geometry.relative=!0;ba.edge=!0;S.insertEdge(ba,!1);ta.insertEdge(ba,!0);ba.style+=b(ba.style,e,t,ba);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*q));ba.geometry.points=
df;F.push(D.addCell(ba,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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,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,t,v,G);w=new mxCell("1",new mxGeometry(.2*r,.4*q,.1*r,.19*q),
"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("2",new mxGeometry(.45*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);S=new mxCell("3",new mxGeometry(.7*r,.4*q,.1*r,.19*q),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");S.vertex=!0;v.insert(S);S.style+=b(S.style,e,t,S);da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
w.insertEdge(da,!1);E.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.375*r,aa+.15*q)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,t,da);F.push(D.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.geometry.points=[new mxPoint(Z+.675*r,aa+.15*q)];ba.geometry.relative=!0;ba.edge=!0;ba.style+=b(ba.style,e,t,ba);F.push(D.addCell(ba,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.3*r,.2*q,.4*r,.6*q),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.38*r,.42*q,.24*r,.16*q),"part=1;fillColor=#aefe7d;");
w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*q),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,t,E);S=new mxCell("",new mxGeometry(.76*r,.23*q,.24*r,.16*q),"");S.vertex=!0;v.insert(S);S.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*q,.24*r,.16*q),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*q,.24*r,.16*q),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,
.61*q,.24*r,.16*q),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*q,.24*r,.16*q),"");$d.vertex=!0;v.insert($d);$d.style=E.style;da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(da,!1);E.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,t,da);F.push(D.addCell(da,null,null,null,null));ba=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(ba,!1);S.insertEdge(ba,!0);ba.edge=!0;ba.style+=b(ba.style,e,t,ba);
F.push(D.addCell(ba,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,t,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,t,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Lc,
!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,t,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");w.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,t,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,t,v,G);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*q,.6*r,.25*q,da,F,D,Oa,v,pa);ba=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");ba.geometry.relative=!0;ba.edge=!0;fb(.05*r,.5*q,.6*r,.75*q,ba,F,D,Oa,v,pa);w=new mxCell("",new mxGeometry(.7*r,.1*q,.15*r,.32*q),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.25*r,.25*q,.5*r,.5*q),"shape=mxgraph.eip.control_bus;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);S=new mxCell("",
new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");S.vertex=!0;v.insert(S);S.style+=b(S.style,e,t,S);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;w.insertEdge(xa,!1);S.insertEdge(xa,!0);xa.style+=b(xa.style,e,t,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,
q-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,t,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;w.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,t,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+q-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(q-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,t,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,S.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,t,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,t,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,t,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,t,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,t,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=new mxCell("",new mxGeometry(0,0,r,.25*q),"part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);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*q,ff,.75*q),"ellipse;part=1;"),
E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,t,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)w[l]=new mxCell("",new mxGeometry(gf*l,0,gf,q),"part=1;shape=mxgraph.floorplan.sink_2;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fb=.1*r/e.StallCount;w=new mxCell("",new mxGeometry(0,
0,Fb,q),"fillColor=#000000;part=1;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);var Ob=(r-Fb)/e.StallCount,qe=[],Hd=[],Id=[],Jd=[];Y=I(e,t);Y=""==Y?"#000000;":Y.replace("stokreColor=","");var re="part=1;fillColor="+Y;re+=b(re,e,t,v);var se=b("",e,t,v);for(l=0;l<e.StallCount;l++)qe[l]=new mxCell("",new mxGeometry((l+1)*Ob,0,Fb,q),re),qe[l].vertex=!0,v.insert(qe[l]),Id[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.05*(Ob-Fb),q-.92*(Ob-Fb),.9*(Ob-Fb),.92*(Ob-Fb)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),
Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeometry(Fb+l*Ob+.2*(Ob-Fb),0,.6*(Ob-Fb),.8*(Ob-Fb)),"shape=mxgraph.floorplan.toilet;part=1;"),Hd[l].vertex=!0,v.insert(Hd[l]),Hd[l].style+=se,Jd[l]=new mxCell("",new mxGeometry(Fb+l*Ob,.42*q,.15*(Ob-Fb),.12*(Ob-Fb)),"part=1;"),Jd[l].vertex=!0,v.insert(Jd[l]),Jd[l].style+=se;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=",
"");var Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);da=new mxCell("",new mxGeometry(0,0,0,0),ae);da.geometry.relative=!0;da.edge=!0;fb(0,.5*q,.65*r,.5*q,da,F,D,Oa,v,pa);var fa=q/e.numLines;ba=[];var Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(.65*r,.5*q,.96*r,(l+.5)*fa,ba[l],F,D,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEMultilines":v.style+=
"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=I(e,t);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,t,v);fa=q/e.numLines;ba=[];Vc=[];for(l=0;l<e.numLines;l++)ba[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),ba[l].geometry.relative=!0,ba[l].edge=!0,fb(0,(l+.5)*fa,.96*r,(l+.5)*fa,ba[l],F,D,Oa,v,pa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*fa,.05*r,.6*fa),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,t,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,t,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,t,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,.2*q,r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
w.vertex=!0;v.insert(w);w.style+=ia;w.style+=b(w.style,e,t,w);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(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,t,da),fb(0,0,0,.2*q,da,F,D,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=b(ba.style,e,t,ba),fb(r,.67*q,r,q,ba,F,D,Oa,v,pa)):(w.style+="flipH=1;",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,t,da),fb(0,0,0,.33*q,da,F,D,Oa,v,pa),ba=new mxCell("",new mxGeometry(0,0,0,0),""),ba.geometry.relative=!0,ba.edge=!0,ba.style+=ia,ba.style+=b(ba.style,e,t,ba),fb(r,.8*q,r,q,ba,F,D,Oa,v,pa));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,t,xa),fb(.2*r,.5*q,.8*r,.5*q,xa,F,D,Oa,v,pa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
v.value=m(e.Text);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(.2*r,.2*q,.6*r,.6*q),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");w.vertex=!0;v.insert(w);w.style+=b(w.style,e,t,w);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(u.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,t,v);"PEIndicator2Block"==u.Class||"PESharedIndicator2Block"==u.Class?(w=new mxCell("",
new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(w=new mxCell("",new mxGeometry(0,0,r,.5*q),"part=1;strokeColor=none;fillColor=none;"),w.vertex=!0,v.insert(w),w.value=m(e.TopText),w.style+=a(e.TopText,G),w.style+=b(w.style,e,t,w,G),E=new mxCell("",new mxGeometry(0,.5*q,r,.5*q),"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,t,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"==u.Class?1!=e.poweredHandOperated&&(te=!0):1!=
e.handOperated&&(te=!0);if(te){e=h(u).Properties;O=e.BoundingBox;var Sf=O.h;O.h="PEAngleValveBlock"==u.Class||"PEAngleGlobeValveBlock"==u.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.75*O.x+wc),Math.round(.75*(O.y+Sf-O.h)+xc),Math.round(.75*O.w),Math.round(.75*O.h)),"");v.vertex=!0;yb(v,u,D)}if("PEPoweredValveBlock"==u.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,t,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",
w=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*q),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),w.vertex=!0,v.insert(w),w.value=m(e.PoweredText),w.style+=(G?"":n(e.PoweredText)+x(e.PoweredText)+C(e.PoweredText)+J(e.PoweredText)+M(e.PoweredText)+P(e.PoweredText)+R(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),w.style+=b(w.style,e,t,w,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(u.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,t,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,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)+n(e.Title)+x(e.Title));1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,t,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,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;w.insert(E);1==e.vScroll&&(S=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(-20,30),S.vertex=!0,v.insert(S),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,t,v);e.Text=null;break;case "UI2AccordionBlock":w=[];fa=25;for(l=0;l<=e.Panels-1;l++)w[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"):
l==e.Selected-1?new mxCell("",new mxGeometry(0,l*fa,r,fa),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,q-(e.Panels-e.Selected)*fa+(l-e.Selected)*fa,r,fa),"part=1;fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Panel_"+(l+1)]),w[l].style+=a(e["Panel_"+(l+1)],G),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=5;");var Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?
new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-20-(e.Panels-e.Selected)*fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"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*fa),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,
e,t,E));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*fa),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=b(S.style,e,t,S));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-
20-(e.Panels-e.Selected)*fa),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*fa,r-20,q-e.Selected*fa-(e.Panels-e.Selected)*fa),"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,t,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];fa=25;var Ib=3,Ha=(r+Ib)/
(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=
!0,w[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,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,fa),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=
Ua,S.style+=b(S.style,e,t,S));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];fa=25;Ib=3;Ha=(r+Ib)/e.Tabs;hb=new mxCell("",new mxGeometry(0,fa,r,q-fa),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Ib,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=
b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Ib,fa),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
new mxCell("",new mxGeometry(1,0,20,q-fa),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,fa),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,t,E));1==e.hScroll&&(S=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;"),
S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=b(S.style,e,t,S));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";w=[];E=[];Ib=3;fa=25+Ib;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,q),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,t,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),""),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,t,E[l],G)):(w[l]=new mxCell("",new mxGeometry(0,zc+l*fa,Ha,fa-Ib),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,fa-Ib),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l]);Ua=I(e,t);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,q-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,q),"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,t,E));1==e.hScroll&&(S=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;"),S.geometry.relative=!0,S.geometry.offset=new mxPoint(0,-20),S.vertex=!0,v.insert(S),S.style+=Ua,S.style+=b(S.style,e,t,S));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
fa=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,l*fa+.5*fa-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),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,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=
a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=I(e,t),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,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";fa=q/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(0,
l*fa+.5*fa-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"ellipse;"),E[l].vertex=!0,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=
b(E[l].style,e,t,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;w=[];E=[];for(l=0;l<e.Options;l++)w[l]=new mxCell("",new mxGeometry(l*Ha,.5*q-5,10,10),"ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Option_"+(l+1)]),w[l].style+=a(e["Option_"+(l+1)],G),w[l].style+=b(w[l].style,e,t,w[l],G),null!=e.Selected&&e.Selected==l+1&&(Y=I(e,t),
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,w[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,t,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"==u.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,t,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";w=new mxCell("",new mxGeometry(0,0,.6*r,q),"part=1;");w.vertex=!0;v.insert(w);w.value=m(e.Date);w.style+=a(e.Date,G);v.style+=b(v.style,e,t,v);Y=I(e,t);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,q),"part=1;shape=mxgraph.gmdl.calendar;");
E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,t,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,t,v,G);break;case "UI2NumericStepperBlock":Y=I(e,t);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,t,v,G);break;case "UI2TableBlock":try{kb=W(e.FillColor);var Kd=W(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:W(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:W(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
e["Cell_"+l+"_"+ea],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?W(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[ea])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];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,q),""),E[l].vertex=!0,v.insert(E[l])):(w[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"strokeColor=none;"),
w[l].vertex=!0,v.insert(w[l]),w[l].style+=w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,q),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,t,v);w=[];E=[];fa=q/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),""),E[l].vertex=!0,v.insert(E[l])):
(w[l]=new mxCell("",new mxGeometry(0,l*fa,r,fa),"strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=b(w[l].style,e,t,w[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,fa),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,w[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,t,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=
l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,t,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,q),"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,t,v);w=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)w[l]=new mxCell("",new mxGeometry(l*
Ha,0,Ha,q),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].value=m(e["Link_"+(l+1)]),w[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,t,v);w=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)w[l]=l!=e.Selected-
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,t,v);X=[];nb=[];var jd=[];fa=q/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+n(e["Item_"+(l+1)])+x(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*q/e.Lines,r,fa),"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=I(e,t),
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)])+n(e["Shortcut_"+(l+1)])+x(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*q/e.Lines,.4*r,fa),"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*q/e.Lines,.9*
r,fa),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=I(e,t));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,t,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,t,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,t,v,G);w=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");w.vertex=!0;v.insert(w);w.value=m(e.Title);w.style+=a(e.Title,G);w.style+=b(w.style,e,t,w,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;w.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);S=[];for(l=0;l<e.Buttons;l++)S[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),S[l].geometry.relative=!0,S[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),S[l].vertex=!0,v.insert(S[l]),S[l].value=m(e["Button_"+(l+1)]),S[l].style+=a(e["Button_"+(l+1)],G),S[l].style+=b(S[l].style,e,t,S[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,t);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,t,v,G);X=[];var ue=[],wb=db/q;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])),fa=0,0==e.Attributes?fa=l=1:l<e.Attributes?(fa=e["Text"+(l+1)+"Percent"],wb+=fa):fa=1-wb,pc=Math.round((q-db)*fa)+(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+Q(e,t,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,t,v,G);break;case "ERDEntityBlock":ia=ca(e,t);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,t,v,G);e.ShadedHeader?(ia=W(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,t);X=[];wb=db/q;Wb=db;for(l=0;l<e.Fields;l++)fa=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;"+Q(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,t);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,t);v.style+=b(v.style,e,t,v,G);X=[];var Ga=[];wb=db;var Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+Q(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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,t,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];wb=db;Jb=30;null!=e.Column1&&(Jb=.75*e.Column1);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+Q(e,t,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb,.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;"+Q(e,t,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,t);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,t);v.value=m(e.Name);v.style+=b(v.style,e,t,v,G);X=[];Ga=[];var Kb=[];wb=db;Jb=30;var ce=40;null!=e.Column1&&(Jb=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)fa=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Jb,.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;"+Q(e,t,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,t,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Jb,wb,r-Jb-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;"+Q(e,t,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,t,X[l],G),Kb[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;"),
Kb[l].vertex=!0,v.insert(Kb[l]),Kb[l].style+=ia+a(e["Type"+(l+1)],G),Kb[l].style=1==e.AltRows&&0!=l%2?Kb[l].style+"fillColor=#000000;fillOpacity=5;":Kb[l].style+("fillColor=none;"+Q(e,t,Kb[l])),Kb[l].value=m(e["Type"+(l+1)]),Kb[l].style+=b(Kb[l].style,e,t,Kb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,q,v,e,t);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,q,v,e,t);break;case "GCPServiceCardBlankBlock":Sa("blank",
1,.66,r,q,v,e,t);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,q,v,e,t);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,q,v,e,t);break;case "GCPInputRetail":Wa("retail",1,.89,r,q,v,e,t);break;case "GCPInputReport":Wa("report",1,1,r,q,v,e,t);break;case "GCPInputPhone":Wa("phone",.64,1,r,q,v,e,t);break;case "GCPInputBlank":Wa("transparent",1,1,r,q,v,e,t);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,t,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,q)*.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==U.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,t,v,G);mb=ha(e,t,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:q),100),xe=
new mxCell("",new mxGeometry(0,0,we,q),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,q),"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,t,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=
"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,q),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,t,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=ha(e,t,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
e.LineWidth);pa.style+=b(pa.style,ob,t,pa,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;pa.style+=b(pa.style,e,t,pa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;pa.vertex=!0;pa.geometry.relative=!0;v.insert(pa)}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,q),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=
b(ra.style,pf,t,ra,G);ra.style+=b(ra.style,e,t,ra,G);e.Rotation=mb;if(null!=Pb.text&&null!=Pb.text["t"+Xb]){var eb=Pb.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,t,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Pb.w);eb.h&&(Yb.height*=eb.h/Pb.h);eb.x&&(Yb.x=eb.x/Pb.w);eb.y&&(Yb.y=eb.y/Pb.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/q);eb.fx&&(Yb.x=(0<
eb.fx?1:0)+.75*eb.fx/r);eb.fy&&(Yb.y=(0<eb.fy?1:0)+.75*eb.fy/q)}ra.vertex=!0;ra.geometry.relative=!0;v.insert(ra)}Xb++}}if(e.FillColor&&e.FillColor.url){var Nd=new mxCell("",new mxGeometry(0,0,r,q),"shape=image;html=1;");Nd.style+=Fa({},{},e.FillColor.url);Nd.vertex=!0;Nd.geometry.relative=!0;v.insert(Nd)}}catch(gb){console.log("Freehand error",gb)}break;case "RightArrowBlock":var ze=e.Head*q/r;v.style="shape=singleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,
e,t,v,G);break;case "DoubleArrowBlock":ze=e.Head*q/r;v.style="shape=doubleArrow;arrowWidth="+(1-2*e.Notch)+";arrowSize="+ze;v.value=m(e);v.style+=b(v.style,e,t,v,G);break;case "VPCSubnet2017":case "VirtualPrivateCloudContainer2017":case "ElasticBeanStalkContainer2017":case "EC2InstanceContents2017":case "AWSCloudContainer2017":case "CorporateDataCenterContainer2017":switch(U){case "VPCSubnet2017":var ld="shape=mxgraph.aws3.permissions;fillColor=#D9A741;";var md=30;var nd=35;break;case "VirtualPrivateCloudContainer2017":ld=
30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,t,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(ea=0;ea<e.Vertices.length;ea++)Qa=e.Vertices[ea],0==ea?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,t,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="+W(od)+";"+oa(od,"fillOpacity");v.style+=b(v.style,e,t,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,q),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+W(kb)+";"+oa(kb,"fillOpacity"));ab.style+=b(ab.style,e,t,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="+W(kb)+";"+oa(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,t,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="+W(od)+";"+oa(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,t,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
W(od)+";"+oa(od,"fillOpacity"),v.style+=b(v.style,e,t,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,q),"strokeColor=none;fillColor="+W(kb)+";"+oa(kb,"fillOpacity")),ab.style+=b(ab.style,e,t,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,t,v,G);break;case "PersonRoleBlock":try{ia=ca(e,t);db=q/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,
e,t,v,G);var Ec=new mxCell("",new mxGeometry(0,q/2,r,q/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,t,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);ka(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(u,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&&u.value){var t=u.geometry.width,e=u.geometry.height,O=t,r=e,q=0,Z=0;if(-90==D||-270==D){O=e;r=t;var aa=(e-t)/2;q=-aa/t;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var U=u.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&
0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(u.value,new mxGeometry(q,Z,O,r),U+"fillColor=none;strokeColor=none;rotation="+D+";");u.value=null;wa.geometry.relative=!0;wa.vertex=!0;u.insert(wa)}}catch(ja){console.log(ja)}}function Je(u,F,D,t,e){function O(Lb,$b){var Xa="";try{for(var pb=0;pb<Lb.text.length;pb++){var Nc=Lb.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:"+T(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+T(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Lb,$b,Xa){Lb=Aa+Lb;ra[Lb]=$b;$b="";for(var pb=0;pb<U.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[U[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[Lb]=Xa;t.addCell(Xa,aa)},q=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;t.addCell(aa);var U=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||
{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(u||Date.now())+"_";4==q&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==q?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==q||2==q?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=q&&(Ca=!1);for(u=0;u<U.length;u++)ma.push(O(ja,U[u]));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(u=0;u<U.length;u++)U[u]=Ia.f[U[u]]||U[u]}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(u=0;u<U.length;u++)U[u]=l[Ka].nfs[U[u]]||U[u];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&&
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(u){return Math.round(100*this.nurbsValues[4*(u+1)])/100};Qd.prototype.getY=function(u){return Math.round(100*this.nurbsValues[4*(u+1)+1])/100};LucidImporter.importState=function(u,F,D){function t(q){null!=q.state&&EditorUi.debug("convertLucidChart addPages",
q);if(q.Properties){for(var Z in q.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),q.Properties[Z]);LucidImporter.globalProps=q.Properties}for(var aa in q.Pages)Z=q.Pages[aa],Z.id=aa,Z.Data=q.Data,e.push(Z);e.sort(function(U,wa){return U.Properties.Order<wa.Properties.Order?-1:U.Properties.Order>wa.Properties.Order?1:0});for(q=0;q<e.length;q++)LucidImporter.pageIdsMap[e[q].id]=q}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!=u.state?t(JSON.parse(u.state)):null==u.Page&&null!=u.Pages?t(u):e.push(u);u=Df();D=new mxCodec;for(var O=0;O<e.length;O++){F.push("<diagram");null!=e[O].Properties&&null!=e[O].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[O].Properties.Title)+'"');F.push(' id="'+O+'"');zf(u,e[O],!0);var r=D.encode(u.getModel());null!=e[O].Properties&&(e[O].Properties.FillColor&&"#ffffff"!=e[O].Properties.FillColor&&r.setAttribute("background",W(e[O].Properties.FillColor)),
e[O].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[O].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[O].Properties.Size.w),r.setAttribute("pageHeight",.75*e[O].Properties.Size.h)),null!=e[O].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[O].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);u.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,I){var L={"[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>",
N;for(N in L)if(1<I&&N==M.CONTENT_TYPES_XML){for(var Q=mxUtils.parseXml(L[N]),ha=Q.documentElement,V=ha.children,T=null,W=0;W<V.length;W++){var oa=V[W];"/visio/pages/page1.xml"==oa.getAttribute(M.PART_NAME)&&(T=oa)}for(W=2;W<=I;W++)V=T.cloneNode(),V.setAttribute(M.PART_NAME,"/visio/pages/page"+W+".xml"),ha.appendChild(V);A(H,N,Q,!0)}else H.file(N,L[N])}function z(H,I,L){return null!=H.createElementNS?H.createElementNS(I,L):H.createElement(L)}function B(H){var I=P[H];null==I&&(I=R++,P[H]=I);return I}
function m(H){var I={};try{var L=H.getGraphBounds().clone(),N=H.view.scale,Q=H.view.translate,ha=Math.round(L.x/N)-Q.x,V=Math.round(L.y/N)-Q.y,T=H.pageFormat.width,W=H.pageFormat.height;0>ha&&(ha+=Math.ceil((Q.x-L.x/N)/T)*T);0>V&&(V+=Math.ceil((Q.y-L.y/N)/W)*W);var oa=Math.max(1,Math.ceil((L.width/N+ha)/T)),ca=Math.max(1,Math.ceil((L.height/N+V)/W));I.gridEnabled=H.gridEnabled;I.gridSize=H.gridSize;I.guidesEnabled=H.graphHandler.guidesEnabled;I.pageVisible=H.pageVisible;I.pageScale=H.pageScale;I.pageWidth=
H.pageFormat.width*oa;I.pageHeight=H.pageFormat.height*ca;I.backgroundClr=H.background;I.mathEnabled=H.mathEnabled;I.shadowVisible=H.shadowVisible}catch(qa){}return I}function h(H,I,L,N){return c(H,I/M.CONVERSION_FACTOR,L,N)}function c(H,I,L,N){L=z(L,M.XMLNS,"Cell");L.setAttribute("N",H);L.setAttribute("V",I);N&&L.setAttribute("F",N);return L}function a(H,I,L,N,Q){var ha=z(Q,M.XMLNS,"Row");ha.setAttribute("T",H);ha.setAttribute("IX",I);ha.appendChild(h("X",L,Q));ha.appendChild(h("Y",N,Q));return ha}
function b(H,I,L){var N=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(N&&"none"!=N){if(I.appendChild(c("FillForegnd",N,L)),(N=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=N){I.appendChild(c("FillBkgnd",N,L));N=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var Q=28;if(N)switch(N){case mxConstants.DIRECTION_EAST:Q=25;break;case mxConstants.DIRECTION_WEST:Q=27;break;case mxConstants.DIRECTION_NORTH:Q=30}I.appendChild(c("FillPattern",Q,L))}}else I.appendChild(c("FillPattern",
0,L));(N=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=N?I.appendChild(c("LineColor",N,L)):I.appendChild(c("LinePattern",0,L));(N=H.style[mxConstants.STYLE_STROKEWIDTH])&&I.appendChild(h("LineWeight",N,L));(Q=H.style[mxConstants.STYLE_OPACITY])?N=Q:(N=H.style[mxConstants.STYLE_FILL_OPACITY],Q=H.style[mxConstants.STYLE_STROKE_OPACITY]);N&&I.appendChild(c("FillForegndTrans",1-parseInt(N)/100,L));Q&&I.appendChild(c("LineColorTrans",1-parseInt(Q)/100,L));if(1==H.style[mxConstants.STYLE_DASHED]){N=
H.style[mxConstants.STYLE_DASH_PATTERN];Q=9;if(N)switch(N){case "1 1":Q=10;break;case "1 2":Q=3;break;case "1 4":Q=17}I.appendChild(c("LinePattern",Q,L))}1==H.style[mxConstants.STYLE_SHADOW]&&(I.appendChild(c("ShdwPattern",1,L)),I.appendChild(c("ShdwForegnd","#000000",L)),I.appendChild(c("ShdwForegndTrans",.6,L)),I.appendChild(c("ShapeShdwType",1,L)),I.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",L)),I.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",L)),I.appendChild(c("ShapeShdwScaleFactor",
"1",L)),I.appendChild(c("ShapeShdwBlur","0.05555555555555555",L)),I.appendChild(c("ShapeShdwShow",2,L)));1==H.style[mxConstants.STYLE_FLIPH]&&I.appendChild(c("FlipX",1,L));1==H.style[mxConstants.STYLE_FLIPV]&&I.appendChild(c("FlipY",1,L));1==H.style[mxConstants.STYLE_ROUNDED]&&I.appendChild(h("Rounding",.1*H.cell.geometry.width,L));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&I.appendChild(c("TextBkgnd",H,L))}function d(H,I,L,N,Q,ha){var V=z(N,M.XMLNS,"Shape");V.setAttribute("ID",
H);V.setAttribute("NameU","Shape"+H);V.setAttribute("LineStyle","0");V.setAttribute("FillStyle","0");V.setAttribute("TextStyle","0");H=I.width/2;var T=I.height/2;V.appendChild(h("PinX",I.x+H+(ha?0:K.shiftX),N));V.appendChild(h("PinY",Q-I.y-T-(ha?0:K.shiftY),N));V.appendChild(h("Width",I.width,N));V.appendChild(h("Height",I.height,N));V.appendChild(h("LocPinX",H,N));V.appendChild(h("LocPinY",T,N));V.appendChild(c("LayerMember",L+"",N));return V}function f(H,I){H=M.ARROWS_MAP[(null==H?"none":H)+"|"+
(null==I?"1":I)];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 p(H,I,L,N,Q,ha){var V=L.view.getState(H,!0);if(null==V||null==V.absolutePoints||null==V.cellBounds)return null;L=z(N,M.XMLNS,"Shape");var T=B(H.id);L.setAttribute("ID",T);L.setAttribute("NameU","Dynamic connector."+T);L.setAttribute("Name","Dynamic connector."+T);L.setAttribute("Type","Shape");L.setAttribute("Master","4");var W=K.state;T=V.absolutePoints;var oa=V.cellBounds,ca=
oa.width/2,qa=oa.height/2;L.appendChild(h("PinX",oa.x+ca+(ha?0:K.shiftX),N));L.appendChild(h("PinY",Q-oa.y-qa-(ha?0:K.shiftY),N));L.appendChild(h("Width",oa.width,N));L.appendChild(h("Height",oa.height,N));L.appendChild(h("LocPinX",ca,N));L.appendChild(h("LocPinY",qa,N));K.newEdge(L,V,N);ca=function(sa,Fa,ka){var Za=sa.x;sa=sa.y;Za=Za*W.scale-oa.x+W.dx+(ka||ha?0:K.shiftX);sa=(Fa?0:oa.height)-sa*W.scale+oa.y-W.dy-(ka||ha?0:K.shiftY);return{x:Za,y:sa}};qa=ca(T[0],!0);L.appendChild(h("BeginX",oa.x+qa.x,
N,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));L.appendChild(h("BeginY",Q-oa.y+qa.y,N,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(T[T.length-1],!0);L.appendChild(h("EndX",oa.x+qa.x,N,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));L.appendChild(h("EndY",Q-oa.y+qa.y,N,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));L.appendChild(c("BegTrigger","2",N,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));L.appendChild(c("EndTrigger","2",N,H.target?"_XFTRIGGER(Sheet."+
B(H.target.id)+"!EventXFMod)":null));L.appendChild(c("ConFixedCode","6",N));L.appendChild(c("LayerMember",I+"",N));b(V,L,N);I=V.style[mxConstants.STYLE_STARTSIZE];H=f(V.style[mxConstants.STYLE_STARTARROW],V.style[mxConstants.STYLE_STARTFILL]);L.appendChild(c("BeginArrow",H,N));L.appendChild(c("BeginArrowSize",k(I),N));I=V.style[mxConstants.STYLE_ENDSIZE];H=f(V.style[mxConstants.STYLE_ENDARROW],V.style[mxConstants.STYLE_ENDFILL]);L.appendChild(c("EndArrow",H,N));L.appendChild(c("EndArrowSize",k(I),
N));null!=V.text&&V.text.checkBounds()&&(K.save(),V.text.paint(K),K.restore());V=z(N,M.XMLNS,"Section");V.setAttribute("N","Geometry");V.setAttribute("IX","0");for(H=0;H<T.length;H++)I=ca(T[H],!1,!0),V.appendChild(a(0==H?"MoveTo":"LineTo",H+1,I.x,I.y,N));V.appendChild(c("NoFill","1",N));V.appendChild(c("NoLine","0",N));L.appendChild(V);return L}function n(H,I,L,N,Q,ha,V){var T=H.geometry,W=T;if(null!=T)try{T.relative&&ha&&(W=T.clone(),T.x*=ha.width,T.y*=ha.height,H.vertex&&null!=T.offset&&(T.x+=T.offset.x,
T.y+=T.offset.y),T.relative=0);var oa=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(oa+"10000",T,I,N,Q,V);ca.setAttribute("Type","Group");var qa=z(N,M.XMLNS,"Shapes");K.save();K.translate(-T.x,-T.y);var sa=T.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=n(H,I,L,N,T.height,T,!0);delete H.treatAsSingle;H.setGeometry(T);null!=Fa&&qa.appendChild(Fa);for(Q=0;Q<H.getChildCount();Q++)Fa=n(H.children[Q],I,L,N,T.height,T,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);
K.restore();return ca}if(H.vertex){ca=d(oa,T,I,N,Q,V);var ka=L.view.getState(H,!0);null!=ka&&(b(ka,ca,N),K.newShape(ca,ka,N),null!=ka.text&&ka.text.checkBounds()&&(K.save(),ka.text.paint(K),K.restore()),null!=ka.shape&&ka.shape.checkBounds()&&(K.save(),ka.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return p(H,I,L,N,Q,V)}finally{H.geometry=W}else return null}function x(H,I){var L=mxUtils.createXmlDocument(),N=z(L,M.XMLNS,
"PageContents");N.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);N.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var Q=z(L,M.XMLNS,"Shapes");N.appendChild(Q);var ha=H.model,V=H.view.translate,T=H.view.scale,W=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(W.x/T<V.x||W.y/T<V.y)K.shiftX=Math.ceil((V.x-W.x/T)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((V.y-W.y/T)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-V.x,-V.y);K.scale(1/T);K.newPage();
T=H.model.getChildCells(H.model.root);V={};for(W=0;W<T.length;W++)V[T[W].id]=W;for(var oa in ha.cells)T=ha.cells[oa],W=null!=T.parent?V[T.parent.id]:null,null!=W&&(T=n(T,W,H,L,I.pageHeight),null!=T&&Q.appendChild(T));H=z(L,M.XMLNS,"Connects");N.appendChild(H);for(oa in ha.cells)T=ha.cells[oa],T.edge&&(T.source&&(I=z(L,M.XMLNS,"Connect"),I.setAttribute("FromSheet",B(T.id)),I.setAttribute("FromCell","BeginX"),I.setAttribute("ToSheet",B(T.source.id)),H.appendChild(I)),T.target&&(I=z(L,M.XMLNS,"Connect"),
I.setAttribute("FromSheet",B(T.id)),I.setAttribute("FromCell","EndX"),I.setAttribute("ToSheet",B(T.target.id)),H.appendChild(I)));L.appendChild(N);K.restore();return L}function A(H,I,L,N){H.file(I,(N?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(L,"\n"))}function C(H,I,L,N){var Q=mxUtils.createXmlDocument(),ha=mxUtils.createXmlDocument(),V=z(Q,M.XMLNS,"Pages");V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/",
"xmlns:r",M.XMLNS_R);var T=z(ha,M.RELS_XMLNS,"Relationships"),W=1,oa;for(oa in I){var ca="page"+W+".xml",qa=z(Q,M.XMLNS,"Page");qa.setAttribute("ID",W-1);qa.setAttribute("NameU",oa);qa.setAttribute("Name",oa);var sa=z(Q,M.XMLNS,"PageSheet"),Fa=N[oa];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,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+W);var ka=
z(Q,M.XMLNS,"Section");ka.setAttribute("N","Layer");for(var Za=L[oa],yb=0;yb<Za.length;yb++){var vb=z(Q,M.XMLNS,"Row");vb.setAttribute("IX",yb+"");ka.appendChild(vb);vb.appendChild(c("Name",Za[yb].name,Q));vb.appendChild(c("Color","255",Q));vb.appendChild(c("Status","0",Q));vb.appendChild(c("Visible",Za[yb].visible?"1":"0",Q));vb.appendChild(c("Print","1",Q));vb.appendChild(c("Active","0",Q));vb.appendChild(c("Lock",Za[yb].locked?"1":"0",Q));vb.appendChild(c("Snap","1",Q));vb.appendChild(c("Glue",
"1",Q));vb.appendChild(c("NameUniv",Za[yb].name,Q));vb.appendChild(c("ColorTrans","0",Q))}sa.appendChild(ka);qa.appendChild(sa);qa.appendChild(Fa);V.appendChild(qa);qa=z(ha,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+W);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);T.appendChild(qa);A(H,M.VISIO_PAGES+ca,I[oa]);W++}Q.appendChild(V);ha.appendChild(T);A(H,M.VISIO_PAGES+"pages.xml",Q);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ha)}function J(H,I){I=M.VISIO_PAGES_RELS+"page"+
I+".xml.rels";var L=mxUtils.createXmlDocument(),N=z(L,M.RELS_XMLNS,"Relationships"),Q=z(L,M.RELS_XMLNS,"Relationship");Q.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");Q.setAttribute("Id","rId1");Q.setAttribute("Target","../masters/master1.xml");N.appendChild(Q);var ha=K.images;if(0<ha.length)for(var V=0;V<ha.length;V++)Q=z(L,M.RELS_XMLNS,"Relationship"),Q.setAttribute("Type",M.XMLNS_R+"/image"),Q.setAttribute("Id","rId"+(V+2)),Q.setAttribute("Target","../media/"+
ha[V]),N.appendChild(Q);L.appendChild(N);A(H,I,L)}var M=this,K=new mxVsdxCanvas2D,P={},R=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var I=function(Fa,ka){Fa=Fa.model.getChildCells(Fa.model.root);Q[ka]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&Q[ka].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},L=new JSZip;K.init(L);P={};R=1;var N={},Q={},ha={},V=null!=
g.pages?g.pages.length:1;if(null!=g.pages){var T=function(Fa){Fa=Fa.getName();var ka=g.editor.graph,Za=null;null!=ka.themes&&"darkTheme"==ka.defaultThemeName&&(Za=ka.stylesheet,ka.stylesheet=ka.getDefaultStylesheet(),ka.refresh());try{var yb=m(ka);N[Fa]=x(ka,yb);I(ka,Fa);J(L,ca+1);ha[Fa]=yb}finally{null!=Za&&(ka.stylesheet=Za,ka.refresh())}},W=g.editor.graph.getSelectionCells(),oa=g.currentPage;if(H)T(oa);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,
!0);T(qa)}oa!=g.currentPage&&g.selectPage(oa,!0);g.editor.graph.setSelectionCells(W)}}else{T=g.editor.graph;var sa=m(T);N.Page1=x(T,sa);I(T,"Page1");J(L,1);ha.Page1=sa}y(L,V);C(L,N,Q,ha);H=function(){L.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var ka=g.getBaseFilename();g.saveData(ka+".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.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)};
mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var g=this.createElt("Section");g.setAttribute("N","Geometry");g.setAttribute("IX",this.geoIndex++);this.geoSec=g;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(g,y,z){this.geoIndex=0;this.shape=g;this.cellState=y;this.xmGeo=y.cell.geometry;this.xmlDoc=z;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
mxVsdxCanvas2D.prototype.newEdge=function(g,y,z){this.shape=g;this.cellState=y;this.xmGeo=y.cellBounds;this.xmlDoc=z};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};
mxVsdxCanvas2D.prototype.createCellElemScaled=function(g,y,z){return this.createCellElem(g,y/VsdxExport.prototype.CONVERSION_FACTOR,z)};mxVsdxCanvas2D.prototype.createCellElem=function(g,y,z){var B=this.createElt("Cell");B.setAttribute("N",g);B.setAttribute("V",y);z&&B.setAttribute("F",z);return B};
mxVsdxCanvas2D.prototype.createRowScaled=function(g,y,z,B,m,h,c,a,b,d,f,k,p,n){return this.createRowRel(g,y,z/VsdxExport.prototype.CONVERSION_FACTOR,B/VsdxExport.prototype.CONVERSION_FACTOR,m/VsdxExport.prototype.CONVERSION_FACTOR,h/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,b,d,f,k,p,n)};
mxVsdxCanvas2D.prototype.createRowRel=function(g,y,z,B,m,h,c,a,b,d,f,k,p,n){var x=this.createElt("Row");x.setAttribute("T",g);x.setAttribute("IX",y);x.appendChild(this.createCellElem("X",z,b));x.appendChild(this.createCellElem("Y",B,d));null!=m&&isFinite(m)&&x.appendChild(this.createCellElem("A",m,f));null!=h&&isFinite(h)&&x.appendChild(this.createCellElem("B",h,k));null!=c&&isFinite(c)&&x.appendChild(this.createCellElem("C",c,p));null!=a&&isFinite(a)&&x.appendChild(this.createCellElem("D",a,n));
mxVsdxCanvas2D.prototype.rect=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,g,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g+z,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,
g,y-B));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,g,y))};mxVsdxCanvas2D.prototype.roundrect=function(g,y,z,B,m,h){this.rect(g,y,z,B);this.shape.appendChild(this.createCellElemScaled("Rounding",m))};
mxVsdxCanvas2D.prototype.ellipse=function(g,y,z,B){1<this.geoStepIndex&&this.createGeoSec();var m=this.state;z*=m.scale;B*=m.scale;var h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=c+(-y+h.y-m.dy)*m.scale;this.geoSec.appendChild(this.createRowScaled("Ellipse",this.geoStepIndex++,g+z/2,y-B/2,g,y-B/2,g+z/2,y,"Width*"+(g+z/2)/a,"Height*"+(y-B/2)/c,"Width*"+g/a,"Height*"+(y-B/2)/c,"Width*"+(g+z/2)/a,"Height*"+y/c))};
mxVsdxCanvas2D.prototype.moveTo=function(g,y){1<this.geoStepIndex&&this.createGeoSec();this.lastMoveToX=g;this.lastMoveToY=y;this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelMoveTo",this.geoStepIndex++,g/z,y/m))};
mxVsdxCanvas2D.prototype.lineTo=function(g,y){this.lastX=g;this.lastY=y;var z=this.xmGeo,B=this.state;g=(g-z.x+B.dx)*B.scale;y=(z.height-y+z.y-B.dy)*B.scale;var m=z.height*B.scale;z=z.width*B.scale;this.geoSec.appendChild(this.createRowRel("RelLineTo",this.geoStepIndex++,g/z,y/m))};
mxVsdxCanvas2D.prototype.quadTo=function(g,y,z,B){this.lastX=z;this.lastY=B;var m=this.state,h=this.xmGeo,c=h.height*m.scale,a=h.width*m.scale;g=(g-h.x+m.dx)*m.scale;y=(h.height-y+h.y-m.dy)*m.scale;z=(z-h.x+m.dx)*m.scale;B=(h.height-B+h.y-m.dy)*m.scale;g/=a;y/=c;z/=a;B/=c;this.geoSec.appendChild(this.createRowRel("RelQuadBezTo",this.geoStepIndex++,z,B,g,y))};
mxVsdxCanvas2D.prototype.curveTo=function(g,y,z,B,m,h){this.lastX=m;this.lastY=h;var c=this.state,a=this.xmGeo,b=a.height*c.scale,d=a.width*c.scale;g=(g-a.x+c.dx)*c.scale;y=(a.height-y+a.y-c.dy)*c.scale;z=(z-a.x+c.dx)*c.scale;B=(a.height-B+a.y-c.dy)*c.scale;m=(m-a.x+c.dx)*c.scale;h=(a.height-h+a.y-c.dy)*c.scale;g/=d;y/=b;z/=d;B/=b;m/=d;h/=b;this.geoSec.appendChild(this.createRowRel("RelCubBezTo",this.geoStepIndex++,m,h,g,y,z,B))};
mxVsdxCanvas2D.prototype.close=function(){this.lastMoveToX==this.lastX&&this.lastMoveToY==this.lastY||this.lineTo(this.lastMoveToX,this.lastMoveToY)};mxVsdxCanvas2D.prototype.addForeignData=function(g,y){var z=this.createElt("ForeignData");z.setAttribute("ForeignType","Bitmap");g=g.toUpperCase();"BMP"!=g&&z.setAttribute("CompressionType",g);g=this.createElt("Rel");g.setAttribute("r:id","rId"+y);z.appendChild(g);this.shape.appendChild(z);this.shapeType="Foreign"};
mxVsdxCanvas2D.prototype.convertSvg2Png=function(g,y,z){var B=this;this.filesLoading++;try{var m=document.createElement("canvas"),h=m.getContext("2d");y||(g=String.fromCharCode.apply(null,new Uint8Array(g)),g=window.btoa?btoa(g):Base64.encode(g,!0));y="data:image/svg+xml;base64,"+g;img=new Image;img.onload=function(){m.width=this.width;m.height=this.height;h.drawImage(this,0,0);try{z(m.toDataURL("image/png"))}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.onerror=function(){console.log("SVG2PNG conversion failed");
try{z(g)}catch(c){}B.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()};img.src=y}catch(c){console.log("SVG2PNG conversion failed"+c.message);try{z(g)}catch(a){}this.filesLoading--;if(0==B.filesLoading)B.onFilesLoaded()}};
mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(this.images.length+1)+".";if(0==m.indexOf("data:")){var f=m.indexOf("base64,");h=m.substring(f+7);f=m.substring(11,f-1);0==f.indexOf("svg")?(f="png",d+=f,this.convertSvg2Png(h,!0,function(p){b.zip.file("visio/media/"+d,p.substring(22),{base64:!0})})):(d+=f,this.zip.file("visio/media/"+d,h,{base64:!0}))}else if(window.XMLHttpRequest){m=this.converter.convert(m);this.filesLoading++;f=m.lastIndexOf(".");f=m.substring(f+1);
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(p){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(n){b.zip.file("visio/media/"+d,n.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,p){var n=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,n.cellState.style.fontSize,n.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 x=this.createElt("Section");x.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),J=0,M=0,K=0,P=0,R=0,H=0,I=0,L=function(T,W,oa,ca,qa){var sa=T.fontSize,Fa=T.fontFamily,ka=mxUtils.getSizeForString(qa,sa,Fa);a&&ka.width>z&&(ka=mxUtils.getSizeForString(qa,sa,Fa,z));T.blockElem?(R+=ka.width,K=Math.min(Math.max(K,R),
z),R=0,H=Math.max(H,ka.height),P+=H+I,I=H,H=0):(R+=ka.width,K=Math.min(Math.max(K,R),z),H=Math.max(H,ka.height),P=Math.max(P,H));ka=n.createElt("Row");ka.setAttribute("IX",J);T.fontColor&&ka.appendChild(n.createCellElem("Color",mxUtils.rgba2hex(T.fontColor)));sa&&ka.appendChild(n.createCellElemScaled("Size",.97*sa));Fa&&ka.appendChild(n.createCellElem("Font",Fa));sa=0;T.bold&&(sa|=17);T.italic&&(sa|=34);T.underline&&(sa|=4);ka.appendChild(n.createCellElem("Style",sa));ka.appendChild(n.createCellElem("Case",
"0"));ka.appendChild(n.createCellElem("Pos","0"));ka.appendChild(n.createCellElem("FontScale","1"));ka.appendChild(n.createCellElem("Letterspace","0"));W.appendChild(ka);W=n.createElt("Row");W.setAttribute("IX",M);switch(T.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}W.appendChild(n.createCellElem("HorzAlign",sa));oa.appendChild(W);oa=n.createElt("cp");oa.setAttribute("IX",J++);ca.appendChild(oa);
T=n.xmlDoc.createTextNode(qa+(T.blockElem?"\n":""));ca.appendChild(T)},N=function(T,W){W=W||{};for(var oa=0;oa<T.length;oa++){var ca=T[oa];if(3==ca.nodeType){var qa=n.cellState.style.fontStyle;qa={fontColor:W.fontColor||n.cellState.style.fontColor,fontSize:W.fontSize||n.cellState.style.fontSize,fontFamily:W.fontFamily||n.cellState.style.fontFamily,align:W.align||n.cellState.style.align,bold:W.bold||qa&1,italic:W.italic||qa&2,underline:W.underline||qa&4};var sa=!1;oa+1<T.length&&"BR"==T[oa+1].nodeName.toUpperCase()&&
(sa=!0,oa++);L(qa,x,A,C,(W.OL?W.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")||W.bold,italic:"italic"==qa.getPropertyValue("font-style")||W.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||W.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:W.OL,LiIndex:W.LiIndex};if("UL"==sa){var ka=n.createElt("Row");ka.setAttribute("IX",M);ka.appendChild(n.createCellElem("HorzAlign","0"));ka.appendChild(n.createCellElem("Bullet","1"));A.appendChild(ka);ka=n.createElt("pp");ka.setAttribute("IX",M++);C.appendChild(ka)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=oa+1);0<Fa?(N(ca.childNodes,qa),"UL"==sa&&(ka=n.createElt("Row"),
ka.setAttribute("IX",M),ka.appendChild(n.createCellElem("Bullet","0")),A.appendChild(ka),ka=n.createElt("pp"),ka.setAttribute("IX",M++),C.appendChild(ka)),L(qa,x,A,C,"")):L(qa,x,A,C,(W.OL?W.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&N(m.childNodes,{})):L({fontColor:n.cellState.style.fontColor,fontSize:n.cellState.style.fontSize,fontFamily:n.cellState.style.fontFamily},x,A,C,m);b=m=0;B=Math.max(B,
P);z=Math.max(z,K);p=z/2;var Q=B/2,ha=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),V=ha*Math.PI/180;switch(h){case "right":0!=ha?(g-=p*Math.cos(V),y-=p*Math.sin(V)):m=K/2;break;case "left":0!=ha?(g+=p*Math.cos(V),y+=p*Math.sin(V)):m=-K/2}switch(c){case "top":0!=ha?(g+=Q*Math.sin(V),y+=Q*Math.cos(V)):b=P/2;break;case "bottom":0!=ha?(g-=Q*Math.sin(V),y-=Q*Math.cos(V)):b=-P/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",p+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",Q+b));k-=ha;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(x);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];
this.pos+=4;this.height=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.planes=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.bitPP=g[this.pos+1]<<8|g[this.pos];this.pos+=2;this.compress=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.rawSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.hr=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.vr=g[this.pos+3]<<24|g[this.pos+
2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.colors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.importantColors=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15);if(15>this.bitPP){g=0===this.colors?1<<this.bitPP:this.colors;this.palette=Array(g);for(var y=0;y<g;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++];
this.palette[y]={red:m,green:B,blue:z,quad:h}}}};BmpDecoder.prototype.parseBGR=function(){this.pos=this.offset;try{var g="bit"+this.bitPP,y=document.createElement("canvas").getContext("2d").createImageData(this.width,this.height);this.imageData=y;this.data=y.data;this[g]()}catch(z){console.log("bit decode error:"+z)}};
BmpDecoder.prototype.bit1=function(){for(var g=Math.ceil(this.width/8),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++)for(var m=this.buffer[this.pos++],h=z*this.width*4+32*B,c=0;8>c;c++)if(8*B+c<this.width){var a=this.palette[m>>7-c&1];this.data[h+4*c]=a.red;this.data[h+4*c+1]=a.green;this.data[h+4*c+2]=a.blue;this.data[h+4*c+3]=255}else break;0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit4=function(){for(var g=Math.ceil(this.width/2),y=g%4,z=this.height-1;0<=z;z--){for(var B=0;B<g;B++){var m=this.buffer[this.pos++],h=z*this.width*4+8*B,c=m&15;m=this.palette[m>>4];this.data[h]=m.red;this.data[h+1]=m.green;this.data[h+2]=m.blue;this.data[h+3]=255;if(2*B+1>=this.width)break;m=this.palette[c];this.data[h+4]=m.red;this.data[h+4+1]=m.green;this.data[h+4+2]=m.blue;this.data[h+4+3]=255}0!=y&&(this.pos+=4-y)}};
BmpDecoder.prototype.bit8=function(){for(var g=this.width%4,y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=y*this.width*4+4*z;B<this.palette.length?(B=this.palette[B],this.data[m]=B.red,this.data[m+1]=B.green,this.data[m+2]=B.blue):(this.data[m]=255,this.data[m+1]=255,this.data[m+2]=255);this.data[m+3]=255}0!=g&&(this.pos+=4-g)}};
BmpDecoder.prototype.bit15=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=B>>15?255:0,a=y*this.width*4+4*z;this.data[a]=(B>>10&31)/31*255|0;this.data[a+1]=h;this.data[a+2]=m;this.data[a+3]=c}this.pos+=g}};
BmpDecoder.prototype.bit16=function(){var g=2*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos+1]<<8|this.buffer[this.pos];this.pos+=2;var m=(B&31)/31*255|0,h=(B>>5&31)/31*255|0,c=y*this.width*4+4*z;this.data[c]=(B>>10&31)/31*255|0;this.data[c+1]=h;this.data[c+2]=m;this.data[c+3]=255}this.pos+=g}};
BmpDecoder.prototype.bit24=function(){var g=3*this.width%4;0!=g&&(g=4-g);for(var y=this.height-1;0<=y;y--){for(var z=0;z<this.width;z++){var B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=y*this.width*4+4*z;this.data[c]=h;this.data[c+1]=m;this.data[c+2]=B;this.data[c+3]=255}this.pos+=g}};
BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y=0;y<this.width;y++){var z=this.buffer[this.pos++],B=this.buffer[this.pos++],m=this.buffer[this.pos++],h=this.buffer[this.pos++],c=g*this.width*4+4*y;this.data[c]=m;this.data[c+1]=B;this.data[c+2]=z;this.data[c+3]=h}};BmpDecoder.prototype.getData=function(){return this.data};var __extends=this&&this.__extends||function(g,y){function z(){this.constructor=g}for(var B in y)y.hasOwnProperty(B)&&(g[B]=y[B]);g.prototype=null===y?Object.create(y):(z.prototype=y.prototype,new z)},com;
(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){var f=this,k={},p={},n=function(){function J(){R=R.concat(f.RESPONSE_END);a&&a(R)}for(var M=m.vsdxPlaceholder+"/document.xml",K=k[M]?k[M]:null,P=K.firstChild;null!=P&&1!=P.nodeType;)P=P.nextSibling;if(null!=P&&1==P.nodeType)f.importNodes(K,P,M,k);else return null;
f.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(K,k,p);M=f.vsdxModel.getPages();var R=f.RESPONSE_HEADER;var H=function(N){null==N.entries&&(N.entries=[]);return N.entries}(M),I=function(N,Q){var ha=H[N].getValue(),V=L.createMxGraph();V.getModel().beginUpdate();L.importPage(ha,V,V.getDefaultParent(),!0);L.scaleGraph(V,ha.getPageScale()/ha.getDrawingScale());V.getModel().endUpdate();L.postImportPage(ha,V,function(){L.sanitiseGraph(V);R=R.concat(f.RESPONSE_DIAGRAM_START);R=R.concat(f.processPage(V,ha));
R=R.concat(f.RESPONSE_DIAGRAM_END);N<H.length-1?I(N+1,Q):Q()})},L=f;0<H.length?I(0,J):J()},x=0,A=0,C=function(){if(A==x)try{n()}catch(J){console.log(J),null!=d?d(J):a("")}};JSZip.loadAsync(c).then(function(J){0==Object.keys(J.files).length?null!=d&&d():J.forEach(function(M,K){var P=K.name,R=P.toLowerCase();M=R.length;R.indexOf(".xml")==M-4||R.indexOf(".rels")==M-5?(x++,K.async("string").then(function(H){if(0!==H.length){65279==H.charCodeAt(0)&&(H=H.substring(1));var I=m.parseXml(H);if(null==I)if(0===
H.charCodeAt(1)&&0===H.charCodeAt(3)&&0===H.charCodeAt(5))I=m.parseXml(m.decodeUTF16LE(H));else{for(I=0;I<m.incorrectXMLReqExp.length;I++)m.incorrectXMLReqExp[I].regExp.test(H)&&(H=H.replace(m.incorrectXMLReqExp[I].regExp,m.incorrectXMLReqExp[I].repl));I=m.parseXml(H)}null!=I&&(I.vsdxFileName=P,k[P]=I)}A++;C()})):0===R.indexOf(m.vsdxPlaceholder+"/media")&&(x++,function(H,I){var L=H.length-I.length;H=H.indexOf(I,L);return-1!==H&&H===L}(R,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?K.async("blob").then(function(H){var I=
new FormData;I.append("img",H,R);I.append("inputformat","emf");I.append("outputformat","png");var L=new XMLHttpRequest;L.open("POST",EMF_CONVERT_URL);L.responseType="blob";f.editorUi.addRemoteServiceSecurityCheck(L);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var N=new FileReader;N.readAsDataURL(L.response);N.onloadend=function(){var Q=N.result.indexOf(",")+1;p[P]=N.result.substr(Q);A++;C()}}catch(Q){console.log(Q),A++,C()}else A++,C()});
L.send(I)}):(A++,C()):function(H,I){var L=H.length-I.length;H=H.indexOf(I,L);return-1!==H&&H===L}(R,".bmp")?JSZip.support.uint8array&&K.async("uint8array").then(function(H){H=new BmpDecoder(H);var I=document.createElement("canvas");I.width=H.width;I.height=H.height;I.getContext("2d").putImageData(H.imageData,0,0);H=I.toDataURL("image/jpeg");p[P]=H.substr(23);A++;C()}):K.async("base64").then(function(H){p[P]=H;A++;C()}))})},function(J){null!=d&&d(J)})};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,p=b;if(-1!==f&&(k=b.substring(0,f),p=b.substring(f+1,b.length),b=function(C,J){return C[J]?C[J]:null}(d,k+"/_rels/"+p+".rels"),null!=b)){var n=b.getElementsByTagName("Relationship");b={};for(f=0;f<n.length;f++){p=n.item(f);var x=p.getAttribute("Id");p=p.getAttribute("Target");
b[x]=p}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(n=a.item(f),p=function(C,J){return C[J]?C[J]:null}(b,n.getAttribute("r:id")),p=k+"/"+p,null!=p&&(x=d[p]?d[p]:null,null!=x)){n=n.parentNode;for(x=x.firstChild;null!=x&&1!=x.nodeType;)x=x.nextSibling;if(null!=x&&1==x.nodeType)for(x=x.firstChild;null!=x;){if(null!=x&&1==x.nodeType){var A=n.appendChild(c.importNode(x,!0));this.importNodes(c,A,p,d)}x=x.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 p=c.getLayers();k=c.getShapes();f=[];for(var n=0;n<p.length;n++){var x=p[n],A=x.Name.replace(/\s/g,
"_");this.layerNames.push(A);0==x.Visible&&f.push(A)}x=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;for(n=c.getId();x.hasNext();)p=x.next(),p=p.getValue(),A=this.addShape(a,p,b,n,k),p=this.layerIndexToNames(p.layerMember),null!=A&&null!=p&&a.addTagsForCells([A],p);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},
hasNext:function(){return J<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)p=c.next(),p=this.addConnectedEdge(a,p.getValue(),n,k),null!=p&&function(C,J){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(J)||C.entries[M].key===J)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,p);for(c=function(C){var J=0;return{next:function(){return J<C.length?C[J++]:null},hasNext:function(){return J<
C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)p=c.next(),p.getKey().getPageNumber()===n&&(x=this.addUnconnectedEdge(a,function(C,J){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(J)||C.entries[M].key===J)return C.entries[M].value;return null}(this.parentsMap,p.getKey()),p.getValue(),k),p=this.layerIndexToNames(p.getValue().layerMember),null!=p&&a.addTagsForCells([x],
p));if(0<this.layerNames.length){c=a.getAllTags();n=!1;for(p=0;p<this.layerNames.length;p++)if(0>mxUtils.indexOf(c,this.layerNames[p])){n=!0;break}n&&(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(n){if(null!=n){n=n.entries||[];for(var x=0;x<n.length;x++){var A=n[x].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,
k=[];d(c.getShapes());if(0<k.length){var p=function(n,x){function A(){n<k.length-1?p(n+1,x):x()}var C=k[n],J=C.toBeCroppedImg,M=function(P,R){null==P.entries&&(P.entries=[]);for(var H=0;H<P.entries.length;H++)if(null!=P.entries[H].key.equals&&P.entries[H].key.equals(R)||P.entries[H].key===R)return P.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var P=J.iData,R=J.iType;try{var H=K.width/J.imgWidth,I=K.height/J.imgHeight,L=-J.imgOffsetX*
H,N=(J.imgHeight-J.height+J.imgOffsetY)*I,Q=document.createElement("canvas");Q.width=J.width*H;Q.height=J.height*I;var ha=Q.getContext("2d");ha.fillStyle="#FFFFFF";ha.fillRect(0,0,Q.width,Q.height);ha.drawImage(K,L,N,Q.width,Q.height,0,0,Q.width,Q.height);P=Q.toDataURL("image/jpeg").substr(23);R="jpg"}catch(V){console.log(V)}M.style+=";image=data:image/"+R+","+P;A()};K.src="data:image/"+J.iType+";base64,"+J.iData;K.onerror=function(){M.style+=";image=data:image/"+J.iType+","+J.iData;A()}};p(0,b)}else b()}catch(n){console.log(n),
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(n,x){return n&&n.equals?n.equals(x):n===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(n,x){return n&&n.equals?n.equals(x):n===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(n,x){return n&&n.equals?n.equals(x):n===x}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var p=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(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,p),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(n){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.setShapeIndex(c.getModel().getChildCount(b));(function(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},
getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,p),a);(function(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,p),b)}return null};m.prototype.addGroup=function(c,
a,b,d,f){var k=a.getDimensions(),p=a.getMaster(),n=a.getStyleFromShape(),x=a.getGeomList();x.isNoFill()&&(n[mxConstants.STYLE_FILLCOLOR]="none",n[mxConstants.STYLE_GRADIENTCOLOR]="none");x.isNoLine()&&(n[mxConstants.STYLE_STROKECOLOR]="none");n.html="1";n[mxConstants.STYLE_WHITE_SPACE]="wrap";var A=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=");n=null;var C=a.getChildShapes();n=null!=C&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(C);x=a.isDisplacedLabel()||a.isRotatedLabel()||
n;n=a.getOriginPoint(f,!0);if(x)n=c.insertVertex(b,null,null,Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),A);else{var J=a.getTextLabel();n=c.insertVertex(b,null,J,Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),A)}b=n.geometry.height;for(C=function(K){var P=0;return{next:function(){return P<K.length?K[P++]:
null},hasNext:function(){return P<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(C));C.hasNext();)if(A=C.next().getValue(),J=A.getId(),A.isVertex()){var M=g.mxgraph.io.vsdx.VsdxShape.getType(A.getShape());null!=M&&(function(K,P){return K&&K.equals?K.equals(P):K===P}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,P){return K&&K.equals?K.equals(P):K===P}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,P){return K&&K.equals?K.equals(P):K===P}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&
A.isVertex()&&(A.propagateRotation(a.getRotation()),(M=A.isGroup()?this.addGroup(c,A,n,d,k.y):this.addVertex(c,A,n,d,k.y))&&M.geometry&&(b=Math.max(M.geometry.height,b)));null==p&&function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,
new g.mxgraph.io.vsdx.ShapePageId(d,J),A)}else null==p?(function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),A),function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,J),n)):this.addUnconnectedEdge(c,n,A,f);if(n.children&&0==n.geometry.height&&0<b)for(n.geometry.height=b,f=0;f<n.children.length;f++)k=n.children[f],k.geometry&&(k.geometry.y+=b);x&&a.createLabelSubShape(c,n);c=a.getRotation();if(0!==c)for(f=
n.getGeometry(),p=f.width/2,x=f.height/2,f=0;f<n.getChildCount();f++)k=n.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(k.getGeometry(),c,p,x);(function(K,P,R){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(P)||K.entries[H].key===P){K.entries[H].value=R;return}K.entries.push({key:P,value:R,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,
a.getId()),n);return n};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,p=c.y-d;c.x=Math.round(k*f-p*a+b);c.y=Math.round(p*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",p=a.isDisplacedLabel()||a.isRotatedLabel();p||(k=a.getTextLabel());var n=a.getDimensions(),x=a.getStyleFromShape();x.html="1";var A=x.hasOwnProperty(mxConstants.STYLE_SHAPE)||x.hasOwnProperty("stencil");x.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(x[mxConstants.STYLE_FILLCOLOR]=
"none");A||(x[mxConstants.STYLE_STROKECOLOR]="none");x.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(x[mxConstants.STYLE_GRADIENTCOLOR]="none");x[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(x=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(x,"="),A=null,A=p?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*n.x)/100),Math.floor(Math.round(100*n.y)/100),x):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*n.x)/100),Math.floor(Math.round(100*n.y)/100),x),function(C,J,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(J)||C.entries[K].key===J){C.entries[K].value=M;return}C.entries.push({key:J,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,
x),p&&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(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var p=function(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,
k.getId()));if(null!=p){var n=c.getModel().getGeometry(p);null!=n&&(d=n.height)}var x=k.getStartXY(d),A=k.getEndXY(d);n=k.getRoutingPoints(d,x,k.getRotation());this.rotateChildEdge(c.getModel(),p,x,A,n);var C=null,J=a.getSourceToSheet();J=null!=J?function(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,
J)):null;var M=!0;if(null==J||0==J.geometry.width||0==J.geometry.height)J=c.insertVertex(p,null,null,Math.floor(Math.round(100*x.x)/100),Math.floor(Math.round(100*x.y)/100),0,0);else if(J.style&&-1==J.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(J);var K=m.calculateAbsolutePoint(p),P=J.geometry;C=new mxPoint((K.x+x.x-C.x)/P.width,(K.y+x.y-C.y)/P.height)}else M=!1;x=null;a=a.getTargetToSheet();a=null!=a?function(I,L){null==I.entries&&(I.entries=[]);for(var N=0;N<I.entries.length;N++)if(null!=
I.entries[N].key.equals&&I.entries[N].key.equals(L)||I.entries[N].key===L)return I.entries[N].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(p,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),x=m.calculateAbsolutePoint(p),P=a.geometry,x=new mxPoint((x.x+A.x-b.x)/P.width,(x.y+A.y-b.y)/
P.height)):K=!1;b=k.getStyleFromEdgeShape(d);P=k.getRotation();A="";var R=k.isDisplacedLabel()||k.isRotatedLabel()||0!==P,H=k.getLblEdgeOffset(c.getView(),n);R||(A=k.getTextLabel(!0));A=c.insertEdge(p,null,A,J,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));R?h(c,A,k,P,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,J,!0,new mxConnectionConstraint(C,!1));M&&n.shift();null!=x&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(x,!1));K&&n.pop();M=c.getModel().getGeometry(A);
if(J.parent!=a.parent&&null!=p&&1!=p.id&&1==J.parent.id){a=C=0;do x=p.geometry,null!=x&&(C+=x.x,a+=x.y),p=p.parent;while(null!=p);A.parent=J.parent;for(p=0;p<n.length;p++)n[p].x+=C,n[p].y+=a}M.points=n;b.hasOwnProperty("curved")&&function(I,L){return I&&I.equals?I.equals(L):I===L}(function(I,L){return I[L]?I[L]: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),p=b.getStyleFromEdgeShape(d),n=b.getRoutingPoints(d,f,b.getRotation()),x=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==x,J=b.getLblEdgeOffset(c.getView(),n);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(p,"=")):(A=c.createEdge(a,
null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(p,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,x,J):A.getGeometry().offset=J;this.rotateChildEdge(c.getModel(),a,f,k,n);a=c.getModel().getGeometry(A);n.pop();n.shift();a.points=n;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);p.hasOwnProperty("curved")&&function(M,K){return M&&M.equals?M.equals(K):M===K}(function(M,K){return M[K]?M[K]:null}(p,"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 p=b.getChildAt(a,k);this.sanitiseCell(c,p)&&f.push(p)}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(p){k=k.concat(p);var n=f.vsdxModel.getMasterShapes(),x=function(P){var R=0;return{next:function(){return R<P.length?P[R++]:null},hasNext:function(){return R<P.length}}}(function(P){var R=
[];null==P.entries&&(P.entries=[]);for(var H=0;H<P.entries.length;H++)R.push(P.entries[H].value);return R}(f.vsdxModel.getPages())).next();if(null!=n){var A={str:"",toString:function(){return this.str}},C=0===p.length?"":",",J=function(P){return Object.keys(P).map(function(R){return P[R]})}(n);p=function(P){P=J[P];var R=M.createMxGraph(),H=1;if(null!=P.pageSheet){var I=H=1,L=P.pageSheet.DrawingScale;null!=L&&(H=parseFloat(L.getAttribute("V"))||1);L=P.pageSheet.PageScale;null!=L&&(I=parseFloat(L.getAttribute("V"))||
1);H=I/H}I=!1;for(L=0;null!=P.firstLevelShapes&&L<P.firstLevelShapes.length;L++){var N=P.firstLevelShapes[L].getShape(),Q=new g.mxgraph.io.vsdx.VsdxShape(x,N,!x.isEdge(N),n,null,M.vsdxModel);N=null;if(Q.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];N=M.addShape(R,Q,R.getDefaultParent(),0,1169);Q=function(W){null==W.entries&&(W.entries=[]);return W.entries}(M.edgeShapeMap);for(var ha=0;ha<Q.length;ha++){var V=Q[ha],T=function(W,oa){null==W.entries&&(W.entries=[]);for(var ca=0;ca<W.entries.length;ca++)if(null!=
W.entries[ca].key.equals&&W.entries[ca].key.equals(oa)||W.entries[ca].key===oa)return W.entries[ca].value;return null}(M.parentsMap,V.getKey());M.addUnconnectedEdge(R,T,V.getValue(),1169)}}else N=M.addUnconnectedEdge(R,null,Q,1169);I|=null!=N}if(I){M.scaleGraph(R,H);H=M.normalizeGraph(R);M.sanitiseGraph(R);if(0===R.getModel().getChildCount(R.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');R=m.prototype.processPage.call(M,R,null);A.str=A.str.concat(R);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":');P=P.getName();null==P&&(P="");P=mxUtils.htmlEntities(JSON.stringify(P));A.str=A.str.concat(P);A.str=A.str.concat("}");C=","}};for(var M=f,K=0;K<J.length;K++)p(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(P){null!=d?d(P):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,p;for(p in c.model.cells){var n=c.model.cells[p],x=n.geometry;if(null!=x&&1==n.parent.id)if(n.vertex)a(x);
else for(a(x.sourcePoint),a(x.targetPoint),n=x.points,x=0;null!=n&&x<n.length;x++)a(n[x])}var A={x:b,y:d};for(p in c.model.cells)if(n=c.model.cells[p],x=n.geometry,null!=x&&1==n.parent.id&&(x.x-=b,x.y-=d,n.isEdge()))for(this.transPoint(x.sourcePoint,A),this.transPoint(x.targetPoint,A),this.transPoint(x.offset,A),n=x.points,x=0;null!=n&&x<n.length;x++)this.transPoint(n[x],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(n in b.cells){var k=b.cells[n];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var p=this.createMxGraph();p.addCell(k);this.sanitiseGraph(p);if(0===p.getModel().getChildCount(p.getDefaultParent()))return"continue";f=this.normalizeGeo(k);p=m.prototype.processPage.call(this,p,null);d=d.concat(p);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&&
(p=f.indexOf(g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),0<=p)){p+=g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID.length+1;var n=parseInt(f.substring(p,f.indexOf(";",p)));a:{f=this.vertexShapeMap;p=new g.mxgraph.io.vsdx.ShapePageId(a.getId(),n);null==f.entries&&(f.entries=[]);for(var x=0;x<f.entries.length;x++)if(null!=f.entries[x].key.equals&&f.entries[x].key.equals(p)||f.entries[x].key===p){f=f.entries[x].value;break a}f=null}null!=f&&(k=f.getName())}d=d.concat(k);d=d.concat('"}');f=","}}this.RESPONSE_DIAGRAM_START=
0<d.length?",":"";return d};return h}(g.mxgraph.io.mxVsdxCodec);z.mxVssxCodec=B;B.__class="com.mxgraph.io.mxVssxCodec"})(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(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 p=null;f<=b.length&&(p=b[f-1]);var n=k=b=null,x=null,
A=null,C=null,J=null,M=null;null!=p&&(b=p.x,k=p.y,n=p.getA(),x=p.getB(),A=p.getC(),C=p.getD(),M=p.getFormulaA(),J=p.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(p=0;p<a.length;p++){var K=a[p],P=K.getAttribute("N"),R=K.getAttribute("V");switch(P){case "X":b=c.getDoubleVal(R);break;case "Y":k=c.getDoubleVal(R);break;case "A":n=c.getDoubleVal(R);M=K.getAttribute("V");break;case "B":x=c.getDoubleVal(R);break;case "C":A=c.getDoubleVal(R);break;case "D":C=c.getDoubleVal(R);
break;case "E":J=R}}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,n);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,n,x,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,n,x,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,n,x);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,
b,k,n,x,A,C,J);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,n,x,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,n,x,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,n,x);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,
b,k,n);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,n,x,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";
h.defaultColors_$LI$()["16"]="#CDCDCD";h.defaultColors_$LI$()["17"]="#B3B3B3";h.defaultColors_$LI$()["18"]="#9A9A9A";h.defaultColors_$LI$()["19"]="#808080";h.defaultColors_$LI$()["20"]="#666666";h.defaultColors_$LI$()["21"]="#4D4D4D";h.defaultColors_$LI$()["22"]="#333333";h.defaultColors_$LI$()["23"]="#1A1A1A"};h.prototype.initialise=function(c,a){if(null!=c){a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<a.length){var b=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),
d=b.length;for(a=0;a<d;a++){var f=b.item(a),k=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.INDEX);f=f.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.RGB);this.colorElementMap[k]=f}}a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAMES);if(0<a.length)for(c=a.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.FACE_NAME),b=c.length,a=0;a<b;a++)k=c.item(a),d=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID),k=k.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FONT_NAME),
this.fontElementMap[d]=k}};h.prototype.getColor=function(c){var a=function(b,d){return b[d]?b[d]:null}(this.colorElementMap,c);return null==a&&(a=function(b,d){return b[d]?b[d]:null}(h.defaultColors_$LI$(),c),null==a)?"":a};h.prototype.getFont=function(c){var a=this.fontElementMap;c=a[c]?a[c]:null;return null==c?"":c};return h}();m.__static_initialized=!1;B.mxPropertiesManager=m;m.__class="com.mxgraph.io.vsdx.mxPropertiesManager"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||
(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c){this.sourceToSheet=this.fromSheet=null;this.sourceToPart=-1;this.targetToSheet=null;this.targetToPart=-1;this.endShape=this.fromCell=null;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_SHEET);this.fromSheet=null!=a&&0!==a.length?parseFloat(a):-1;a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)}h.prototype.addFromCell=function(c,a){var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_SHEET),d=
!0;null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X)?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null!=a&&function(f,k){return f&&f.equals?f.equals(k):f===k}(a,g.mxgraph.io.vsdx.mxVsdxConstants.END_X)?(this.targetToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!1):null==this.sourceToSheet?(this.sourceToSheet=null!=b&&0!==b.length?parseFloat(b):-1,d=!0):null==this.targetToSheet&&(this.targetToSheet=null!=b&&0!==b.length?
parseFloat(b):-1,d=!1);this.findToPart(c,d)};h.prototype.findToPart=function(c,a){c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TO_PART);c=null!=c&&0!==c.length?parseFloat(c):-1;a?this.sourceToPart=c:this.targetToPart=c};h.prototype.getFromSheet=function(){return this.fromSheet};h.prototype.getSourceToSheet=function(){return this.sourceToSheet};h.prototype.getTargetToSheet=function(){return this.targetToSheet};h.prototype.getSourceToPart=function(){return this.sourceToPart};h.prototype.getTargetToPart=
function(){return this.targetToPart};h.prototype.addConnect=function(c){this.endShape=c;var a=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FROM_CELL);this.addFromCell(c,a)};return h}();B.mxVsdxConnect=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConnect"})(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(){}h.SET_VALUES_$LI$=function(){null==h.SET_VALUES&&(h.SET_VALUES=["a","b"]);return h.SET_VALUES};h.MY_SET_$LI$=function(){null==h.MY_SET&&(h.MY_SET=h.SET_VALUES_$LI$().slice(0).slice(0));return h.MY_SET};return h}();m.ANGLE="Angle";m.ARC_TO="ArcTo";m.BACKGROUND="Background";m.BACK_PAGE="BackPage";m.BEGIN_ARROW="BeginArrow";m.BEGIN_ARROW_SIZE="BeginArrowSize";m.BEGIN_X="BeginX";m.BEGIN_Y="BeginY";m.BOTTOM_MARGIN="BottomMargin";
"HideText";m.VSDX_ID="vsdxID";m.CONNECT_TO_PART_WHOLE_SHAPE=3;B.mxVsdxConstants=m;m.__class="com.mxgraph.io.vsdx.mxVsdxConstants"})(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(c,a){this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1;this.rows=null;if((null!=c&&1==c.nodeType||null===c)&&(null!=a&&a instanceof Array||null===a))Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),null!=a&&this.index<a.length&&this.inheritGeo(a[this.index]),
this.processGeoElem(c);else if((null!=c&&1==c.nodeType||null===c)&&void 0===a)Array.prototype.slice.call(arguments),this.index=0,this.noQuickDrag=this.noSnap=this.noShow=this.noLine=this.noFill=!1,this.rows=null,this.index=0,this.index=this.getIndex$org_w3c_dom_Element(c),this.processGeoElem(c);else throw Error("invalid overload");}h.prototype.getIndex$org_w3c_dom_Element=function(c){try{return parseInt(c.getAttribute("IX"))||0}catch(a){return 0}};h.prototype.getIndex=function(c){if(null!=c&&1==c.nodeType||
null===c)return this.getIndex$org_w3c_dom_Element(c);if(void 0===c)return this.getIndex$();throw Error("invalid overload");};h.prototype.processGeoElem=function(c){var a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Cell");c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"Row");if(null==this.rows){this.rows=[];for(var b=0;b<c.length;b++)this.rows.push(null)}for(b=0;b<a.length;b++){var d=a[b],f=d.getAttribute("N");d=d.getAttribute("V");switch(f){case "NoFill":this.noFill=
function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoLine":this.noLine=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoShow":this.noShow=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoSnap":this.noSnap=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d);break;case "NoQuickDrag":this.noQuickDrag=function(k,p){return k&&k.equals?k.equals(p):k===p}("1",d)}}a=this.rows.length;b=!1;for(f=0;f<c.length;f++)d=g.mxgraph.io.vsdx.geometry.RowFactory.getRowObj(c[f],
this.rows),d.getIndex()>a?(this.rows.push(d),b=!0):this.rows[d.getIndex()-1]=d;b&&function(k,p){p.compare?k.sort(function(n,x){return p.compare(n,x)}):k.sort(p)}(this.rows,new h.mxVsdxGeometry$0(this))};h.prototype.inheritGeo=function(c){this.noFill=c.noFill;this.noLine=c.noLine;this.noShow=c.noShow;this.noSnap=c.noSnap;this.noQuickDrag=c.noQuickDrag;var a=this.rows=[];a.push.apply(a,c.rows)};h.prototype.getIndex$=function(){return this.index};h.prototype.isNoFill=function(){return this.noFill};h.prototype.isNoLine=
function(){return this.noLine};h.prototype.isNoShow=function(){return this.noShow};h.prototype.isNoSnap=function(){return this.noSnap};h.prototype.isNoQuickDrag=function(){return this.noQuickDrag};h.prototype.getRows=function(){return this.rows};h.prototype.getPathXML=function(c,a){if(this.noShow)return"";for(var b="",d=0;d<this.rows.length;d++){var f=this.rows[d];b=b.concat(null!=f?f.handle(c,a):"")}return b};return h}();B.mxVsdxGeometry=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometry";(function(h){var c=
function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){b=null!=b?b.getIndex():0;d=null!=d?d.getIndex():0;return b-d};return a}();h.mxVsdxGeometry$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometry||(B.mxVsdxGeometry={}))})(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(c){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=c){this.parentGeomList=c.geomList;var a=this.geomList;a.push.apply(a,c.geomList)}}h.prototype.addGeometry=function(c){c=new g.mxgraph.io.vsdx.mxVsdxGeometry(c,this.parentGeomList);c.getIndex()<this.geomList.length?this.geomList[c.getIndex()]=c:(this.geomList.push(c),this.sortNeeded=!0)};h.prototype.sort=function(){this.sortNeeded&&(function(c,a){a.compare?
c.sort(function(b,d){return a.compare(b,d)}):c.sort(a)}(this.geomList,new h.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};h.prototype.isNoShow=function(){for(var c=0;c<this.geomList.length;c++)if(!this.geomList[c].isNoShow())return!1;return!0};h.prototype.isNoFill=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};h.prototype.isNoLine=function(){for(var c=0;c<this.geomList.length;c++){var a=this.geomList[c];if(!a.isNoShow()&&
!a.isNoLine())return!1}return!0};h.prototype.hasGeom=function(){return 0!=this.geomList.length};h.prototype.getGeoCount=function(){for(var c=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||c++;return c};h.prototype.rotatedPoint=function(c,a,b){var d=c.y*a+c.x*b;c.x=c.x*a-c.y*b;c.y=d};h.prototype.getRoutingPoints=function(c,a,b){this.sort();c=[];c.push(a.clone());for(var d=0,f=0,k=0;k<this.geomList.length;k++){var p=this.geomList[k];if(!p.isNoShow()){p=p.getRows();for(var n=0;n<p.length;n++){var x=
p[n];if(0==n&&null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.MoveTo)d=null!=x.x?x.x:0,f=null!=x.y?x.y:0;else if(null!=x&&x instanceof g.mxgraph.io.vsdx.geometry.LineTo){var A=null!=x.x?x.x:0;x=null!=x.y?x.y:0;var C=new mxPoint(A,x);0!==b&&(b=(360-b)*Math.PI/180,this.rotatedPoint(C,Math.cos(b),Math.sin(b)));A=(C.x-d)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();A+=a.x;x=(C.y-f)*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;x+=a.y;A=Math.round(100*A)/100;x=Math.round(100*x)/100;
C.x=A;C.y=x;c.push(C)}}}}return c};h.prototype.getShapeXML=function(c){var a=new mxPoint(0,0),b={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},d=b.str.length;var f=this.processGeo(c,a,b,-1,!0);f=this.processGeo(c,a,b,f,!1);if(b.str.length===d)return"";this.closePath(b,f);b.str=b.str.concat("</foreground></shape>");return b.str};h.prototype.processGeo=function(c,a,b,d,f){var k=c.getRounding(),p="";0<k&&(p=' rounded="1" arcSize="'+k*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+
'" ');for(k=0;k<this.geomList.length;k++){var n=this.geomList[k];if(f!==n.isNoFill()){var x=n.getPathXML(a,c);0!==x.length&&(n=this.getGeoStyle(n),-1===d?b.str=b.str.concat("<path"+p+">"):d!==n&&(this.closePath(b,d),b.str=b.str.concat("<path"+p+">")),b.str=b.str.concat(x),d=n)}}return d};h.prototype.getGeoStyle=function(c){var a=0;c.isNoLine()||c.isNoFill()?c.isNoFill()?c.isNoLine()||(a=3):a=2:a=1;return a};h.prototype.closePath=function(c,a){c.str=c.str.concat("</path>");1===a?c.str=c.str.concat("<fillstroke/>"):
2===a?c.str=c.str.concat("<fill/>"):3===a&&(c.str=c.str.concat("<stroke/>"))};return h}();B.mxVsdxGeometryList=m;m.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(h){var c=function(){function a(b){this.__parent=b}a.prototype.compare=function(b,d){return b.getIndex()-d.getIndex()};return a}();h.mxVsdxGeometryList$0=c;c.__interfaces=["java.util.Comparator"]})(m=B.mxVsdxGeometryList||(B.mxVsdxGeometryList={}))})(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(c,a){this.masterShape=this.Id=null;this.childShapes={};this.master=c;this.Id=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID)||"";this.processMasterShapes(a)}h.prototype.processMasterShapes=function(c){for(var a=this.master.firstChild;null!=a;){if(null!=a&&1==a.nodeType&&function(k,p){return k&&k.equals?k.equals(p):k===p}(a.nodeName,"Rel")){var b=c.getRelationship(a.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/_rels/masters.xml.rels"),
d=b.getAttribute("Target");b=b.getAttribute("Type");var f=null;null!=b&&function(k,p){var n=k.length-p.length;k=k.indexOf(p,n);return-1!==k&&k===n}(b,"master")&&(f=c.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/"+d));if(null!=f)for(d=f.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(k,p){return k&&k.equals?k.equals(p):k===p}(d.nodeName,"MasterContents")){this.processMasterShape(d,c);break}d=d.nextSibling}}else if(1==a.nodeType&&"PageSheet"==a.nodeName)for(this.pageSheet={},
d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Cell"),b=0;b<d.length;b++)this.pageSheet[d[b].getAttribute("N")]=d[b];a=a.nextSibling}};h.prototype.processMasterShape=function(c,a,b){b||(this.firstLevelShapes=[]);for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(n,x){return n&&n.equals?n.equals(x):n===x}(c.nodeName,"Shapes"))for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType&&function(n,x){return n&&n.equals?n.equals(x):n===x}(d.nodeName,"Shape")){var f=d,k=f.getAttribute("ID"),
p=new g.mxgraph.io.vsdx.Shape(f,a);this.masterShape=null==this.masterShape?p:this.masterShape;this.childShapes[k]=p;b||this.firstLevelShapes.push(p);this.processMasterShape(f,a,!0)}d=d.nextSibling}else if(null!=c&&1==c.nodeType&&"Connects"==c.nodeName)for(this.connects={},d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&"Connect"==d.nodeName&&(f=new g.mxgraph.io.vsdx.mxVsdxConnect(d),this.connects[f.getFromSheet()]=f),d=d.nextSibling;c=c.nextSibling}};h.prototype.getMasterShape=function(){return this.masterShape};
h.prototype.getSubShape=function(c){var a=this.childShapes;return a[c]?a[c]:null};h.prototype.getNameU=function(){return this.master.getAttribute("NameU")||""};h.prototype.getName=function(){return this.master.getAttribute("Name")||""};h.prototype.getUniqueID=function(){var c="";this.master.hasAttribute("UniqueID")&&(c=this.master.getAttribute("UniqueID"));return c};h.prototype.getId=function(){return this.Id};h.prototype.getMasterElement=function(){return this.master};return h}();B.mxVsdxMaster=
m;m.__class="com.mxgraph.io.vsdx.mxVsdxMaster"})(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(c,a,b){this.pages=this.media=this.xmlDocs=null;this.masters={};this.stylesheets={};this.themes={};this.pm=this.rootElement=null;this.xmlDocs=a;this.media=b;for(c=c.firstChild;null!=c;){if(a=null!=c&&1==c.nodeType)a=c.tagName.toLowerCase(),b=g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"document",a=a&&a.equals?a.equals(b):a===b;if(a){this.rootElement=c;break}c=c.nextSibling}this.pm=new g.mxgraph.io.vsdx.mxPropertiesManager;
this.pm.initialise(this.rootElement,this);this.initStylesheets();this.initThemes();this.initMasters();this.initPages()}h.prototype.initThemes=function(){if(null!=this.xmlDocs)for(var c=!0,a=1;c;){var b=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/theme/theme"+a+".xml");if(null!=b){for(b=b.firstChild;null!=b;){if(null!=b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"a:theme")){b=new g.mxgraph.io.vsdx.mxVsdxTheme(b);0>
b.getThemeIndex()&&b.processTheme();var d=function(f,k){null==f.entries&&(f.entries=[]);for(var p=0;p<f.entries.length;p++)if(null!=f.entries[p].key.equals&&f.entries[p].key.equals(k)||f.entries[p].key===k)return f.entries[p].value;return null}(this.themes,b.getThemeIndex());null!=d&&d.isPure()||function(f,k,p){null==f.entries&&(f.entries=[]);for(var n=0;n<f.entries.length;n++)if(null!=f.entries[n].key.equals&&f.entries[n].key.equals(k)||f.entries[n].key===k){f.entries[n].value=p;return}f.entries.push({key:k,
value:p,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.themes,b.getThemeIndex(),b);break}b=b.nextSibling}a++}else c=!1}};h.prototype.initStylesheets=function(){var c=this.rootElement.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEETS);if(0<c.length){c=c.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE_SHEET);for(var a=c.length,b=0;b<a;b++){var d=c.item(b),f=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);d=new g.mxgraph.io.vsdx.Style(d,
this);this.stylesheets[f]=d}}for(c=function(k){var p=0;return{next:function(){return p<k.length?k[p++]:null},hasNext:function(){return p<k.length}}}(function(k){return Object.keys(k).map(function(p){return k[p]})}(this.stylesheets));c.hasNext();)d=c.next(),d.stylesheetRefs(this)};h.prototype.initMasters=function(){if(null!=this.xmlDocs){var c=function(b,d){return b[d]?b[d]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/masters/masters.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=
c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.MASTERS)){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(b,d){return b&&b.equals?b.equals(d):b===d}(c.tagName,"Master")){var a=new g.mxgraph.io.vsdx.mxVsdxMaster(c,this);this.masters[a.getId()]=a}c=c.nextSibling}break}c=c.nextSibling}}};h.prototype.initPages=function(){if(null!=this.xmlDocs){var c=function(k,p){return k[p]?k[p]:null}(this.xmlDocs,g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+
"/pages/pages.xml");if(null!=c)for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(k,p){return k&&k.equals?k.equals(p):k===p}(c.tagName,g.mxgraph.io.vsdx.mxVsdxConstants.PAGES)){var a=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.PAGE);if(null!=a&&0<a.length){this.pages={};c={};for(var b=a.length,d=0;d<b;d++){var f=a.item(d);f=this.createPage(f);f.isBackground()&&function(k,p,n){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&
k.entries[x].key.equals(p)||k.entries[x].key===p){k.entries[x].value=n;return}k.entries.push({key:p,value:n,getKey:function(){return this.key},getValue:function(){return this.value}})}(c,f.getId(),f);(function(k,p,n){null==k.entries&&(k.entries=[]);for(var x=0;x<k.entries.length;x++)if(null!=k.entries[x].key.equals&&k.entries[x].key.equals(p)||k.entries[x].key===p){k.entries[x].value=n;return}k.entries.push({key:p,value:n,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.pages,
f.getId(),f)}a=function(k){null==k.entries&&(k.entries=[]);return k.entries}(this.pages);for(b=0;b<a.length;b++)f=a[b].getValue(),d=f.getBackPageId(),null!=d&&(d=function(k,p){null==k.entries&&(k.entries=[]);for(var n=0;n<k.entries.length;n++)if(null!=k.entries[n].key.equals&&k.entries[n].key.equals(p)||k.entries[n].key===p)return k.entries[n].value;return null}(c,d),f.setBackPage(d))}break}c=c.nextSibling}}};h.prototype.getPages=function(){return this.pages};h.prototype.getThemes=function(){return this.themes};
h.prototype.getDefaultTheme=function(){null==this.defaultTheme&&null!=this.themes.entries&&0<this.themes.entries.length&&(this.defaultTheme=this.themes.entries[0].getValue());return this.defaultTheme};h.prototype.getRelationship=function(c,a){a=function(f,k){return f[k]?f[k]:null}(this.xmlDocs,a);if(null==a||null==c||0===c.length)return null;a=a.getElementsByTagName("Relationship");for(var b=0;b<a.length;b++){var d=a.item(b);if(function(f,k){return f&&f.equals?f.equals(k):f===k}(d.getAttribute("Id"),
c))return d}return null};h.prototype.getMaster=function(c){var a=this.masters;return a[c]?a[c]:null};h.prototype.createPage=function(c){return new g.mxgraph.io.vsdx.mxVsdxPage(c,this)};h.prototype.getPropertiesManager=function(){return this.pm};h.prototype.setPropertiesManager=function(c){this.pm=c};h.prototype.getMasterShapes=function(){return this.masters};h.prototype.setMasterShapes=function(c){this.masters=c};h.prototype.getStylesheet=function(c){var a=this.stylesheets;return a[c]?a[c]:null};
h.prototype.getXmlDoc=function(c){var a=this.xmlDocs;return a[c]?a[c]:null};h.prototype.getMedia=function(c){var a=this.media;return a[c]?a[c]:null};return h}();B.mxVsdxModel=m;m.__class="com.mxgraph.io.vsdx.mxVsdxModel"})(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(c,a){this.pageName=this.Id=null;this.__isBackground=!1;this.model=this.pageSheet=this.pageElement=this.backPage=this.backPageId=null;this.shapes={};this.connects={};this.connectsMap={};this.cellElements={};this.model=a;this.pageElement=c;this.layers=[];var b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACKGROUND),d;if(d=null!=b)d=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE,d=b&&b.equals?b.equals(d):b===d;this.__isBackground=
d?!0:!1;b=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.BACK_PAGE);null!=b&&0<b.length&&(this.backPageId=parseFloat(b));this.Id=parseFloat(c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID));this.pageName=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||"";this.pageNameU=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||this.pageName;b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"PageSheet");if(0<b.length){b=b[0];d=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,
"Cell");for(var f=0;f<d.length;f++){var k=d[f],p=k.getAttribute("N");this.cellElements[p]=k}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Section");for(d=0;d<b.length;d++)if(f=b[d],p=f.getAttribute("N"),"Layer"==p)for(p=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Row"),f=0;f<p.length;f++){k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(p[f],"Cell");for(var n={},x=0;x<k.length;x++)n[k[x].getAttribute("N")]=k[x].getAttribute("V");null==n.Name&&(n.Name="Layer "+
f);this.layers[parseInt(p[f].getAttribute("IX"))]=n}}this.parseNodes(c,a,"pages")}h.prototype.parseNodes=function(c,a,b){for(var d=c.firstChild;null!=d;){if(null!=d&&1==d.nodeType){var f=d,k=f.nodeName;if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Connects"))for(f=f.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONNECT),f=null!=f&&0<f.length?f.item(0):null;null!=f;){if(null!=f&&1==f.nodeType){k=f;var p=new g.mxgraph.io.vsdx.mxVsdxConnect(k),n=p.getFromSheet();this.connectsMap[n]=
!0;n=null!=n&&-1<n?function(x,A){null==x.entries&&(x.entries=[]);for(var C=0;C<x.entries.length;C++)if(null!=x.entries[C].key.equals&&x.entries[C].key.equals(A)||x.entries[C].key===A)return x.entries[C].value;return null}(this.connects,n):null;null!=n?n.addConnect(k):function(x,A,C){null==x.entries&&(x.entries=[]);for(var J=0;J<x.entries.length;J++)if(null!=x.entries[J].key.equals&&x.entries[J].key.equals(A)||x.entries[J].key===A){x.entries[J].value=C;return}x.entries.push({key:A,value:C,getKey:function(){return this.key},
getValue:function(){return this.value}})}(this.connects,p.getFromSheet(),p)}f=f.nextSibling}}d=d.nextSibling}for(d=c.firstChild;null!=d;)null!=d&&1==d.nodeType&&(f=d,k=f.nodeName,function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Rel")?this.resolveRel(f,a,b):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"Shapes")?this.shapes=this.parseShapes(f,null,!1):function(x,A){return x&&x.equals?x.equals(A):x===A}(k,"PageSheet")&&(this.pageSheet=f)),d=d.nextSibling};h.prototype.resolveRel=function(c,
a,b){b=a.getRelationship(c.getAttribute("r:id"),g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/_rels/"+b+".xml.rels");c=b.getAttribute("Target");b=b.getAttribute("Type");if(function(f,k){var p=f.length-k.length;f=f.indexOf(k,p);return-1!==f&&f===p}((new String(b)).toString(),"page")){var d=null;null!=b&&function(f,k){var p=f.length-k.length;f=f.indexOf(k,p);return-1!==f&&f===p}(b,"page")&&(d=a.getXmlDoc(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/pages/"+c));if(null!=d)for(b=d.firstChild;null!=b;){if(null!=
b&&1==b.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(b.tagName,"PageContents")){d=c.indexOf(".");-1!==d&&this.parseNodes(b,a,c.substring(0,d));break}b=b.nextSibling}}};h.prototype.parseShapes=function(c,a,b){b={};c=c.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPE);for(c=null!=c&&0<c.length?c.item(0):null;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f=a;if(null==f){var k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER);null==k||function(n,x){return n&&n.equals?
n.equals(x):n===x}(k,"")||(f=this.model.getMaster(k))}var p=this.isEdge(d);p||null==f||(k=d.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE),p=f.getMasterElement(),null==k||function(n,x){return n&&n.equals?n.equals(x):n===x}(k,"")||(k=f.getSubShape(k),p=null!=k?k.getShape():p),p=this.isEdge(p));d=this.createCell(d,!p,f);(function(n,x,A){null==n.entries&&(n.entries=[]);for(var C=0;C<n.entries.length;C++)if(null!=n.entries[C].key.equals&&n.entries[C].key.equals(x)||n.entries[C].key===x){n.entries[C].value=
A;return}n.entries.push({key:x,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(b,d.getId(),d)}c=c.nextSibling}return b};h.prototype.createCell=function(c,a,b){return new g.mxgraph.io.vsdx.VsdxShape(this,c,a,this.model.getMasterShapes(),b,this.model)};h.prototype.isEdge=function(c){if(null!=c&&(c=c.childNodes,null!=c))for(c=c.item(0);null!=c;){if(null!=c&&1==c.nodeType){var a=c;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a.nodeName,"Cell")&&(a=a.getAttribute("N"),
function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginX")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"BeginY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndY")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"EndX")))return!0}c=c.nextSibling}return!1};h.prototype.getPageDimensions=function(){var c=0,a=0,b=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageHeight"),d=function(f,k){return f[k]?f[k]:null}(this.cellElements,"PageWidth");null!=b&&(c=parseFloat(b.getAttribute("V"))*
g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=Math.round(100*c)/100);null!=d&&(a=parseFloat(d.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),a=Math.round(100*a)/100);return new mxPoint(a,c)};h.prototype.getDrawingScale=function(){var c=this.cellElements;c=c.DrawingScale?c.DrawingScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getPageScale=function(){var c=this.cellElements;c=c.PageScale?
c.PageScale:null;return null!=c?parseFloat(c.getAttribute("V"))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():1};h.prototype.getCellValue=function(c){var a=this.cellElements;c=a[c]?a[c]:null;return null!=c?c.getAttribute("V")||"":null};h.prototype.getCellIntValue=function(c,a){c=this.getCellValue(c);return null!=c?parseInt(c):a};h.prototype.getId=function(){return this.Id};h.prototype.getPageName=function(){return this.pageName};h.prototype.getPageNameU=function(){return this.pageNameU};h.prototype.getShapes=
function(){return this.shapes};h.prototype.getLayers=function(){return this.layers};h.prototype.getConnects=function(){return this.connects};h.prototype.isBackground=function(){return this.__isBackground};h.prototype.getBackPageId=function(){return this.backPageId};h.prototype.setBackPage=function(c){this.backPage=c};h.prototype.getBackPage=function(){return this.backPage};return h}();B.mxVsdxPage=m;m.__class="com.mxgraph.io.vsdx.mxVsdxPage"})(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(c){this.themeIndex=-1;this.themeVariant=0;this.baseColors={};this.variantsColors=function(a){var b=function(d){if(0!=d.length){for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f}};return b(a)}([4,7]);this.isMonotoneVariant=Array(4);this.defaultClr=new g.mxgraph.io.vsdx.theme.Color(255,255,255);this.defaultLineClr=new g.mxgraph.io.vsdx.theme.Color(0,0,0);this.defaultLineStyle=new g.mxgraph.io.vsdx.theme.LineStyle;this.fillStyles=
[];this.connFillStyles=[];this.lineStyles=[];this.connLineStyles=[];this.lineStylesExt=[];this.connLineStylesExt=[];this.connFontColors=[];this.connFontStyles=[];this.fontColors=[];this.fontStyles=[];this.variantEmbellishment=[0,0,0,0];this.variantFillIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantLineIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));
return f};return b(a)}([4,4]);this.variantEffectIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.variantFontIdx=function(a){var b=function(d){if(0==d.length)return 0;for(var f=[],k=0;k<d[0];k++)f.push(b(d.slice(1)));return f};return b(a)}([4,4]);this.isProcessed=!1;this.__isPure=!0;this.name=this.bkgndColor=this.theme=null;this.theme=c;this.name=c.getAttribute("name")||"";c=function(a,b){return a[b]?a[b]:
null}(h.themesIds_$LI$(),this.name);null!=c&&(this.themeIndex=c)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),h.__static_initializer_1())};h.themesIds_$LI$=function(){h.__static_initialize();null==h.themesIds&&(h.themesIds={});return h.themesIds};h.__static_initializer_0=function(){h.themesIds_$LI$().Office=33;h.themesIds_$LI$().Linear=34;h.themesIds_$LI$().Zephyr=35;h.themesIds_$LI$().Integral=36;h.themesIds_$LI$().Simple=37;h.themesIds_$LI$().Whisp=
38;h.themesIds_$LI$().Daybreak=39;h.themesIds_$LI$().Parallel=40;h.themesIds_$LI$().Sequence=41;h.themesIds_$LI$().Slice=42;h.themesIds_$LI$().Ion=43;h.themesIds_$LI$().Retrospect=44;h.themesIds_$LI$().Organic=45;h.themesIds_$LI$().Bubble=46;h.themesIds_$LI$().Clouds=47;h.themesIds_$LI$().Gemstone=48;h.themesIds_$LI$().Lines=49;h.themesIds_$LI$().Facet=50;h.themesIds_$LI$().Prominence=51;h.themesIds_$LI$().Smoke=52;h.themesIds_$LI$().Radiance=53;h.themesIds_$LI$().Shade=54;h.themesIds_$LI$().Pencil=
55;h.themesIds_$LI$().Pen=56;h.themesIds_$LI$().Marker=57;h.themesIds_$LI$().Whiteboard=58};h.colorIds_$LI$=function(){h.__static_initialize();null==h.colorIds&&(h.colorIds={});return h.colorIds};h.__static_initializer_1=function(){(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),
0,"dk1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),1,"lt1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===
a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),2,"accent1");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),3,"accent2");
(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),4,"accent3");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=
b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),5,"accent4");(function(c,a,b){null==c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),6,"accent5");(function(c,a,b){null==
c.entries&&(c.entries=[]);for(var d=0;d<c.entries.length;d++)if(null!=c.entries[d].key.equals&&c.entries[d].key.equals(a)||c.entries[d].key===a){c.entries[d].value=b;return}c.entries.push({key:a,value:b,getKey:function(){return this.key},getValue:function(){return this.value}})})(h.colorIds_$LI$(),7,"accent6")};h.prototype.getThemeIndex=function(){return this.themeIndex};h.prototype.setVariant=function(c){this.themeVariant=c};h.prototype.isPure=function(){return this.__isPure};h.prototype.processTheme=
function(){if(!this.isProcessed){try{for(var c=this.theme.firstChild;null!=c;){if(null!=c&&1==c.nodeType&&function(f,k){return f&&f.equals?f.equals(k):f===k}(c.nodeName,"a:themeElements"))for(var a=c.firstChild;null!=a;){if(null!=a&&1==a.nodeType){var b=a,d=b.nodeName;(function(f,k){return f&&f.equals?f.equals(k):f===k})(d,"a:clrScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processColors(b)):function(f,k){return f&&f.equals?
f.equals(k):f===k}(d,"a:fontScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFonts(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:fmtScheme")?(function(f,k){return f&&f.equals?f.equals(k):f===k}(this.name,b.getAttribute("name"))||(this.__isPure=!1),this.processFormats(b)):function(f,k){return f&&f.equals?f.equals(k):f===k}(d,"a:extLst")&&this.processExtras(b)}a=a.nextSibling}c=c.nextSibling}}catch(f){}this.isProcessed=
!0}};h.prototype.processExtras=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c[a]);switch(b.nodeName){case "vt:fmtConnectorScheme":var d=this.name;var f=b.getAttribute("name");d=d&&d.equals?d.equals(f):d===f;d||(this.__isPure=!1);b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "a:fillStyleLst":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var k=0;k<f.length;k++)this.connFillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f[k]));break;case "a:lnStyleLst":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.connLineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(f[k]))}break;case "vt:lineStyles":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:fmtConnectorSchemeLineStyles":f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(k=0;k<f.length;k++)this.connLineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]));break;case "vt:fmtSchemeLineStyles":for(f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f),k=0;k<f.length;k++)this.lineStylesExt.push(new g.mxgraph.io.vsdx.theme.LineStyleExt(f[k]))}break;case "vt:fontStylesGroup":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);for(d=0;d<b.length;d++)switch(f=b[d],f.nodeName){case "vt:connectorFontStyles":this.fillFontStyles(f,this.connFontColors,this.connFontStyles);
break;case "vt:fontStyles":this.fillFontStyles(f,this.fontColors,this.fontStyles)}break;case "vt:variationStyleSchemeLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),f=d=0;f<b.length;f++){k=b[f];this.variantEmbellishment[d]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(k,"embellishment");k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(k);for(var p=0,n=0;n<k.length;n++){var x=k[n];this.variantFillIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,
"fillIdx");this.variantLineIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"lineIdx");this.variantEffectIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"effectIdx");this.variantFontIdx[d][p]=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(x,"fontIdx");p++}d++}}}};h.prototype.fillFontStyles=function(c,a,b){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var d=0;d<c.length;d++){var f=
c[d];b.push(g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"style"));f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f);null!=f&&a.push(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(f)))}};h.prototype.processFormats=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0;a<c.length;a++){var b=c[a];switch(b.nodeName){case "a:fillStyleLst":b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b);
for(var d=0;d<b.length;d++)this.fillStyles.push(g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(b[d]));break;case "a:lnStyleLst":for(b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(b),d=0;d<b.length;d++)this.lineStyles.push(new g.mxgraph.io.vsdx.theme.LineStyle(b[d]))}}};h.prototype.processFonts=function(c){};h.prototype.processColors=function(c){for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var a=c,b=a.nodeName;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);var d=
(d=b)&&d.equals?d.equals("a:extLst"):"a:extLst"===d;d?3===a.length&&(0>this.themeIndex&&this.extractThemeIndex(a[0]),this.addBkgndColor(a[1]),this.addVariantColors(a[2])):(b=b.substring(2),0<a.length&&this.addBasicColor(b,a[0]))}c=c.nextSibling}};h.prototype.addVariantColors=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);if(null!=c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(c);for(var a=0,b=0;b<c.length;b++){var d=c[b];this.addVariantColorsSet(a++,d)}}};h.prototype.addVariantColorsSet=
function(c,a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);this.isMonotoneVariant[c]=a.hasAttribute("monotone");for(a=0;a<b.length;a++){var d=b[a];switch(d.nodeName){case "vt:varColor1":this.variantsColors[c][0]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor2":this.variantsColors[c][1]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor3":this.variantsColors[c][2]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor4":this.variantsColors[c][3]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor5":this.variantsColors[c][4]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));
break;case "vt:varColor6":this.variantsColors[c][5]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d));break;case "vt:varColor7":this.variantsColors[c][6]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(d))}}};h.prototype.addBkgndColor=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.bkgndColor=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c)))};
h.prototype.extractThemeIndex=function(c){c=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(c);null!=c&&(this.themeIndex=parseInt(c.getAttribute("schemeEnum")))};h.prototype.addBasicColor=function(c,a){this.baseColors[c]=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(a)};h.prototype.getSchemeColor=function(c){this.processTheme();var a=this.baseColors;c=a[c]?a[c]:null;return null!=c?c.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this):this.defaultClr};h.prototype.getStyleColor=function(c){this.processTheme();
if(8>c){var a=function(d,f){return d[f]?d[f]:null}(this.baseColors,function(d,f){null==d.entries&&(d.entries=[]);for(var k=0;k<d.entries.length;k++)if(null!=d.entries[k].key.equals&&d.entries[k].key.equals(f)||d.entries[k].key===f)return d.entries[k].value;return null}(h.colorIds_$LI$(),c));if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else if(8===c){if(null!=this.bkgndColor)return this.bkgndColor.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}else{a=null;var b=0;200<=c?b=c-200:
100<=c&&(b=c-100);0<=b&&6>=b&&(a=this.variantsColors[this.themeVariant][b]);if(null!=a)return a.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(this)}return this.defaultClr};h.prototype.getFillGraientColor=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!0)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,!1)};h.prototype.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean=
function(c,a){this.processTheme();var b=c.getQuickStyleFillColor(),d=null;switch(c.getQuickStyleFillMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=this.fillStyles[c.getQuickStyleFillMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&(b=100),d=c.getQuickStyleFillMatrix()-100,d=this.fillStyles[this.variantFillIdx[this.themeVariant][d]-1]}a=null!=d?a?null!=d&&d instanceof g.mxgraph.io.vsdx.theme.GradFill?d.applyStyle(b,this).getGradientClr():null:
d.applyStyle(b,this):a?null:this.getStyleColor(b);b=c.getQuickStyleVariation();if(null!=a&&0<(b&8)){b=this.getStyleColor(8).toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);d=c.toHsl();var f=a.toHsl();.1666<=Math.abs(b.getLum()-f.getLum())||(.7292>=b.getLum()?a=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(b.getLum()-d.getLum())>Math.abs(b.getLum()-f.getLum())&&(a=c))}return a};h.prototype.getFillColor=function(c,a){if(!(null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||
null===c)||"boolean"!==typeof a&&null!==a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");}return this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$boolean(c,a)};h.prototype.getLineStyle=function(c,a){this.processTheme();var b=null;switch(c){case 1:case 2:case 3:case 4:case 5:case 6:b=a[c-1];break;case 100:case 101:case 102:case 103:b=a===this.lineStyles?
this.lineStyles[this.variantLineIdx[this.themeVariant][c-100]-1]:this.defaultLineStyle}return b};h.prototype.getLineStyleExt=function(c,a){this.processTheme();var b=null;switch(c){case 0:case 1:case 2:case 3:case 4:case 5:case 6:b=a[c]}return b};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleLineColor();a=this.getLineStyle(c.getQuickStyleLineMatrix(),a);switch(c.getQuickStyleLineMatrix()){case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(b=100)}b=null!=a?a.getLineColor(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&4)){a=this.getStyleColor(8).toHsl();c=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var d=c.toHsl(),f=b.toHsl();.1666<=Math.abs(a.getLum()-f.getLum())||(.7292>=a.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):Math.abs(a.getLum()-d.getLum())>Math.abs(a.getLum()-f.getLum())&&(b=c))}return b};h.prototype.getLineColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||
null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};
h.prototype.getConnLineColor=function(c){return this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};h.prototype.getDefaultLineClr=function(){return this.defaultLineClr};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.isDashed();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.isDashed():
!1};h.prototype.isLineDashed=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");
};h.prototype.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.isConnLineDashed=function(c){return this.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList=
function(c,a,b){a=this.getLineStyleExt(c.getQuickStyleLineMatrix(),a);if(null!=a)return a.getLineDashPattern();c=this.getLineStyle(c.getQuickStyleLineMatrix(),b);return null!=c?c.getLineDashPattern():null};h.prototype.getLineDashPattern=function(c,a,b){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a)&&(null!=b&&b instanceof Array||null===b))return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,
a,b);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a&&void 0===b)return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnLineDashPattern=function(c){return this.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList$java_util_ArrayList(c,
this.connLineStylesExt,this.connLineStyles)};h.prototype.getArrowSize=function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStartSize():b.getEndSize();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStartSize():c.getEndSize():4};h.prototype.getStartSize=function(c){return this.getArrowSize(c,!0,this.lineStylesExt,this.lineStyles)};h.prototype.getConnStartSize=function(c){return this.getArrowSize(c,!0,this.connLineStylesExt,this.connLineStyles)};
h.prototype.getEndSize=function(c){return this.getArrowSize(c,!1,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEndSize=function(c){return this.getArrowSize(c,!1,this.connLineStylesExt,this.connLineStyles)};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=function(c,a){this.processTheme();var b=c.getQuickStyleFontColor(),d=null;switch(c.getQuickStyleFontMatrix()){case 1:case 2:case 3:case 4:case 5:case 6:d=a[c.getQuickStyleFontMatrix()-1];break;case 100:case 101:case 102:case 103:this.isMonotoneVariant[this.themeVariant]&&
(b=100),d=c.getQuickStyleFontMatrix()-100,a!==this.fontColors?(a=this.baseColors,d=a.dk1?a.dk1:null):d=a[this.variantFontIdx[this.themeVariant][d]-1]}b=null!=d?d.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(b,this):this.getStyleColor(b);if(0<(c.getQuickStyleVariation()&2)){d=this.getStyleColor(8).toHsl();var f=b.toHsl();a=this.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var k=a.toHsl();c=this.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);var p=c.toHsl();.1666<=Math.abs(d.getLum()-
f.getLum())||(.7292>=d.getLum()?b=new g.mxgraph.io.vsdx.theme.Color(255,255,255):(p=Math.abs(d.getLum()-p.getLum()),k=Math.abs(d.getLum()-k.getLum()),d=Math.abs(d.getLum()-f.getLum()),d=Math.max(p,k,d),d==p?b=c:d==k&&(b=a)))}return b};h.prototype.getFontColor=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof
g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);throw Error("invalid overload");};h.prototype.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.fontColors)};h.prototype.getConnFontColor=function(c){return this.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connFontColors)};h.prototype.getArrowType=
function(c,a,b,d){b=this.getLineStyleExt(c.getQuickStyleLineMatrix(),b);if(null!=b)return a?b.getStart():b.getEnd();c=this.getLineStyle(c.getQuickStyleLineMatrix(),d);return null!=c?a?c.getStart():c.getEnd():0};h.prototype.getEdgeMarker=function(c,a){return this.getArrowType(a,c,this.lineStylesExt,this.lineStyles)};h.prototype.getConnEdgeMarker=function(c,a){return this.getArrowType(a,c,this.connLineStylesExt,this.connLineStyles)};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList=
function(c,a){c=this.getLineStyle(c.getQuickStyleLineMatrix(),a);return null!=c?c.getLineWidth():0};h.prototype.getLineWidth=function(c,a){if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&(null!=a&&a instanceof Array||null===a))return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,a);if((null!=c&&c instanceof g.mxgraph.io.vsdx.theme.QuickStyleVals||null===c)&&void 0===a)return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(c);
throw Error("invalid overload");};h.prototype.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.lineStyles)};h.prototype.getConnLineWidth=function(c){return this.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals$java_util_ArrayList(c,this.connLineStyles)};return h}();m.__static_initialized=!1;B.mxVsdxTheme=m;m.__class="com.mxgraph.io.vsdx.mxVsdxTheme"})(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(){}h.conversionFactor_$LI$=function(){null==h.conversionFactor&&(h.conversionFactor=h.screenCoordinatesPerCm*h.CENTIMETERS_PER_INCHES);return h.conversionFactor};h.getDirectChildNamedElements=function(c,a){var b=[];for(c=c.firstChild;null!=c;c=c.nextSibling){var d;if(d=null!=c&&1==c.nodeType){d=a;var f=c.nodeName;d=d&&d.equals?d.equals(f):d===f}d&&b.push(c)}return b};h.getDirectChildElements=function(c){var a=[];for(c=
c.firstChild;null!=c;c=c.nextSibling)null!=c&&1==c.nodeType&&a.push(c);return a};h.getDirectFirstChildElement=function(c){for(c=c.firstChild;null!=c;c=c.nextSibling)if(null!=c&&1==c.nodeType)return c;return null};h.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(c,a,b){try{var d=c.getAttribute(a);if(null!=d)return parseInt(d)}catch(f){}return b};h.getIntAttr=function(c,a,b){if((null==c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||"number"!==typeof b&&null!==b){if((null==
c||1!=c.nodeType)&&null!==c||"string"!==typeof a&&null!==a||void 0!==b)throw Error("invalid overload");return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,a)}return g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,b)};h.getIntAttr$org_w3c_dom_Element$java_lang_String=function(c,a){return h.getIntAttr$org_w3c_dom_Element$java_lang_String$int(c,a,0)};h.getStyleString=function(c,a){for(var b="",d=function(n){var x=0;return{next:function(){return x<
n.length?n[x++]:null},hasNext:function(){return x<n.length}}}(function(n){return Object.keys(n).map(function(x){return n[x]})}(c)),f=function(n){var x=0;return{next:function(){return x<n.length?n[x++]:null},hasNext:function(){return x<n.length}}}(Object.keys(c));f.hasNext();){var k=f.next(),p=d.next();if(!function(n,x){return n&&n.equals?n.equals(x):n===x}(k,mxConstants.STYLE_SHAPE)||!function(n,x,A){void 0===A&&(A=0);return n.substr(A,x.length)===x}(c[k]?c[k]:null,"image")&&!function(n,x,A){void 0===
A&&(A=0);return n.substr(A,x.length)===x}(c[k]?c[k]:null,"rounded="))try{b=b+k+a}catch(n){}b=b+p+";"}return b};h.surroundByTags=function(c,a,b){return"<"+a+(b?' style="'+b+'"':"")+">"+c+"</"+a+">"};h.htmlEntities=function(c){return c.replace(RegExp("&","g"),"&amp;").replace(RegExp('"',"g"),"&quot;").replace(RegExp("'","g"),"&prime;").replace(RegExp("<","g"),"&lt;").replace(RegExp(">","g"),"&gt;")};h.toInitialCapital=function(c){c=c.split(" ");for(var a="",b=0;b<c.length;b++){var d=c[b],f=d.substring(0,
1);d=d.substring(1);f=f.toUpperCase();a+=f+d}return a.substring(0,a.length)};h.toSmallCaps=function(c,a){var b="",d=b;if(a&&a.equals?a.equals(d):a===d)b=c;else for(c=c.split(""),d=0;d<c.length;d++){var f=c[d];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),b+='<font style="font-size:'+parseFloat(a)/1.28+'px">'+f+"</font>"):b+=f}return b};h.getStyleMap=function(c,
a){var b={};c=c.split(";");for(var d=0;d<c.length;d++){var f=c[d],k=f.indexOf(a),p=f.substring(0,k);f=f.substring(k+1);b[p]=f}return b};h.isInsideTriangle=function(c,a,b,d,f,k,p,n){var x=(c-f)*(d-k)-(b-f)*(a-k);f=(c-p)*(k-n)-(f-p)*(a-n);c=(c-b)*(n-d)-(p-b)*(a-d);return!((0>x||0>f||0>c)&&(0<x||0<f||0<c))};return h}();m.screenCoordinatesPerCm=40;m.CENTIMETERS_PER_INCHES=2.54;B.mxVsdxUtils=m;m.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
(function(g){(function(y){(function(z){(function(B){var m=function(){function h(c,a,b,d){this.paraIndex=this.fields=this.charIndices=this.values=null;this.values=[];this.values.push(c);this.charIndices=[];this.charIndices.push(a);this.fields=[];this.fields.push(d);this.paraIndex=b}h.prototype.addText=function(c,a,b){this.values.push(c);this.charIndices.push(a);this.fields.push(b)};h.prototype.getParagraphIndex=function(){return this.paraIndex};h.prototype.getValue=function(c){return this.values[c]};h.prototype.numValues=
function(){return this.values.length};h.prototype.getChar=function(c){return this.charIndices[c]};h.prototype.getField=function(c){return this.fields[c]};return h}();B.Paragraph=m;m.__class="com.mxgraph.io.vsdx.Paragraph"})(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(c){this.elem=c}h.prototype.getIndexedCell=function(c,a){for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("IX");if(function(x,A){return x&&x.equals?x.equals(A):x===A}(k,c)||null==c){f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"Cell");for(var p=0;p<f.length;p++){var n=f[p];k=n.getAttribute("N");if(function(x,A){return x&&
x.equals?x.equals(A):x===A}(k,a))return n}}}return null};return h}();B.Section=m;m.__class="com.mxgraph.io.vsdx.Section"})(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(c,a){this.pageNumber=0;this.pageNumber=c;this.Id=a}h.prototype.getId=function(){return this.Id};h.prototype.getPageNumber=function(){return this.pageNumber};h.prototype.equals=function(c){return null==c||this.constructor!==c.constructor||this.pageNumber!==c.pageNumber||this.Id!==c.Id?!1:!0};h.prototype.hashCode=function(){return 1E5*this.pageNumber+this.Id};return h}();B.ShapePageId=m;m.__class="com.mxgraph.io.vsdx.ShapePageId"})(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(a,b,d){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=d}c.NONE_$LI$=function(){null==c.NONE&&(c.NONE=new c(-1,-1,-1));return c.NONE};c.prototype.getRed=function(){return this.red};c.prototype.setRed=function(a){this.red=a};c.prototype.getGreen=function(){return this.green};c.prototype.setGreen=function(a){this.green=a};c.prototype.getBlue=function(){return this.blue};
c.prototype.setBlue=function(a){this.blue=a};c.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,Math.min(b,d)),p=(f+k)/2;if(f===k)a=k=0;else{var n=f-k;k=.5<p?n/(2-f-k):n/(f+k);a=(f===a?(b-d)/n+(b<d?6:0):f===b?(d-a)/n+2:(a-b)/n+4)/6}return new g.mxgraph.io.vsdx.theme.HSLColor(a,k,p)};c.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,d=this.getBlue()/255,f=Math.max(a,Math.max(b,d)),k=Math.min(a,
Math.min(b,d)),p=f-k;a=f===k?0:(f===a?(b-d)/p+(b<d?6:0):f===b?(d-a)/p+2:(a-b)/p+4)/6;return new g.mxgraph.io.vsdx.theme.HSVColor(a,0===f?0:p/f,f)};c.decodeColorHex=function(a){a=parseInt(a,16);return new c(a>>16&255,a>>8&255,a&255)};c.prototype.toHexStr=function(){var a=this.red.toString(16);a=1==a.length?"0"+a:a;var b=this.green.toString(16);b=1==b.length?"0"+b:b;var d=this.blue.toString(16);d=1==d.length?"0"+d:d;return"#"+a+b+d};c.prototype.getGradientClr=function(){return this.gradientClr};c.prototype.setGradientClr=
function(a){this.gradientClr=a};return c}();m.Color=h;h.__class="com.mxgraph.io.vsdx.theme.Color"})(B.theme||(B.theme={}))})(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.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new g.mxgraph.io.vsdx.theme.SolidFillStyle(g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new g.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new g.mxgraph.io.vsdx.theme.GradFill(a)}return b};return c}();m.FillStyleFactory=
h;h.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(B.theme||(B.theme={}))})(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(a){this.color2=this.color1=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=g.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-
1]))));null==this.color1&&(this.color1=this.color2=new g.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}c.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return c}();m.GradFill=h;h.__class="com.mxgraph.io.vsdx.theme.GradFill";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=d}c.prototype.getHue=function(){return this.hue};c.prototype.setHue=function(a){this.hue=a};c.prototype.getSat=function(){return this.sat};c.prototype.setSat=function(a){this.sat=a};c.prototype.getLum=function(){return this.lum};c.prototype.setLum=function(a){this.lum=a};c.prototype.hue2rgb=function(a,b,d){0>d&&(d+=1);1<d&&--d;return d<1/6?
a+6*(b-a)*d:.5>d?b:d<2/3?a+(b-a)*(2/3-d)*6:a};c.prototype.toRgb=function(){var a=this.hue;var b=this.sat;var d=this.lum;if(0===b)d=b=a=d;else{var f=.5>d?d*(1+b):d+b-d*b,k=2*d-f;d=this.hue2rgb(k,f,a+1/3);b=this.hue2rgb(k,f,a);a=this.hue2rgb(k,f,a-1/3)}return new g.mxgraph.io.vsdx.theme.Color(255*d|0,255*b|0,255*a|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.shade=function(a){this.lum*=
a/100;this.lum=this.clamp01(this.lum);return this};c.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};c.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return c}();m.HSLColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(B.theme||(B.theme={}))})(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(a,b,d){this.h=a;this.s=b;this.v=d}c.prototype.toRgb=function(){var a=6*this.h,b=this.s,d=Math.floor(a),f=a-d;a=this.v*(1-b);var k=this.v*(1-f*b);b=this.v*(1-(1-f)*b);d=(d|0)%6;return new g.mxgraph.io.vsdx.theme.Color(255*[this.v,k,a,a,b,this.v][d]|0,255*[b,this.v,this.v,k,a,a][d]|0,255*[a,a,b,this.v,this.v,k][d]|0)};c.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};c.prototype.tint=function(a){this.v*=
1+a/100;this.v=this.clamp01(this.v);return this};c.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};c.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};c.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return c}();m.HSVColor=h;h.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(B.theme||(B.theme={}))})(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(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=
this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var b=a.getAttribute("cap");if(null!=b)switch(b){case "rnd":this.lineCap=c.LineCapType.ROUND;break;case "sq":this.lineCap=c.LineCapType.SQUARE;break;case "flat":this.lineCap=c.LineCapType.FLAT}b=
a.getAttribute("cmpd");if(null!=b)switch(b){case "sng":this.lineComp=c.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=c.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=c.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=c.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=c.CompoundLineType.THIN_THICK_THIN_TRIPLE}b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=
g.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(f);break;case "a:prstDash":f=f.getAttribute("val");this.isLineDashed=!0;switch(f){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDash":this.lineDashPattern.push(12);this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":this.lineDashPattern.push(8);this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "lgDashDot":this.lineDashPattern.push(12);
this.lineDashPattern.push(4);this.lineDashPattern.push(1);this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":this.lineDashPattern.push(12),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4),this.lineDashPattern.push(1),this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(f,"a:ds");for(var k=0;k<f.length;k++){var p=f[k],n=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,
"d");p=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(p,"sp");this.lineDashPattern.push(n/1E4);this.lineDashPattern.push(p/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=this.getLineEndType(f);this.headEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,
"w");this.headEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(f),this.tailEndWidth=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"w"),this.tailEndLen=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(f,"len")}}}else if(void 0===a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=
null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");}c.prototype.getLineEndType=function(a){var b=null;switch(a.getAttribute("type")){case "none":b=
c.LineEndType.NONE;break;case "triangle":b=c.LineEndType.TRIANGLE;break;case "stealth":b=c.LineEndType.STEALTH;break;case "diamond":b=c.LineEndType.DIAMOND;break;case "oval":b=c.LineEndType.OVAL;break;case "arrow":b=c.LineEndType.ARROW}return b};c.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};c.prototype.isDashed=function(){return this.isLineDashed};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};c.prototype.getStartSize=
function(){return 4};c.prototype.getEndSize=function(){return 4};c.prototype.getStart=function(){return 0};c.prototype.getEnd=function(){return 0};c.prototype.getLineWidth=function(){return this.lineWidth};return c}();m.LineStyle=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(c){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(c.LineCapType||(c.LineCapType={}));(function(a){a[a.SINGLE=0]="SINGLE";a[a.DOUBLE=1]="DOUBLE";a[a.THICK_THIN_DOUBLE=2]="THICK_THIN_DOUBLE";
a[a.THIN_THICK_DOUBLE=3]="THIN_THICK_DOUBLE";a[a.THIN_THICK_THIN_TRIPLE=4]="THIN_THICK_THIN_TRIPLE"})(c.CompoundLineType||(c.CompoundLineType={}));(function(a){a[a.NONE=0]="NONE";a[a.TRIANGLE=1]="TRIANGLE";a[a.STEALTH=2]="STEALTH";a[a.DIAMOND=3]="DIAMOND";a[a.OVAL=4]="OVAL";a[a.ARROW=5]="ARROW"})(c.LineEndType||(c.LineEndType={}))})(h=m.LineStyle||(m.LineStyle={}))})(B.theme||(B.theme={}))})(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(a){this.pattern=this.endSize=this.end=this.startSize=this.start=this.rndg=0;this.lineDashPattern=null;a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a);this.rndg=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"rndg");this.start=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"start");this.startSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,
"startSize");this.end=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"end");this.endSize=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"endSize");this.pattern=g.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"pattern");this.lineDashPattern=g.mxgraph.io.vsdx.Style.getLineDashPattern(this.pattern)}c.prototype.getRndg=function(){return this.rndg};c.prototype.getStart=function(){return this.start};c.prototype.getStartSize=
function(){return this.startSize};c.prototype.getEnd=function(){return this.end};c.prototype.getEndSize=function(){return this.endSize};c.prototype.isDashed=function(){return 1<this.pattern};c.prototype.getLineDashPattern=function(){return this.lineDashPattern};return c}();m.LineStyleExt=h;h.__class="com.mxgraph.io.vsdx.theme.LineStyleExt"})(B.theme||(B.theme={}))})(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.prototype.applyStyle=function(a,b){return g.mxgraph.io.vsdx.theme.Color.NONE_$LI$()};return c}();m.NoFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.NoFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(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(){this.invGamma=this.gamma=this.blueMod=this.blueOff=this.blue=this.greenMod=this.greenOff=this.green=this.redMod=this.redOff=this.red=this.lumMod=this.lumOff=this.lum=this.satMod=this.satOff=this.sat=this.hueMod=this.hueOff=this.hue=this.alphaMod=this.alphaOff=this.alpha=this.gray=this.inv=this.comp=this.shade=this.tint=0;this.hasEffects=this.isInitialized=this.isDynamic=!1;this.color=null}c.prototype.calcColor=
function(a,b){this.hasEffects&&(a=this.color.toHsv(),0!==this.tint&&a.tint(this.tint),0!==this.shade&&a.shade(this.shade),0!==this.satMod&&a.satMod(this.satMod),0!==this.lumMod&&a.lumMod(this.lumMod),0!==this.hueMod&&a.hueMod(this.hueMod),this.color=a.toRgb())};c.prototype.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme=function(a,b){if(this.isDynamic||!this.isInitialized)this.calcColor(a,b),this.isInitialized=!0;return this.color};c.prototype.getColor=function(a,b){if("number"!==typeof a&&null!==a||
!(null!=b&&b instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===b)){if((null!=a&&a instanceof g.mxgraph.io.vsdx.mxVsdxTheme||null===a)&&void 0===b)return this.getColor$com_mxgraph_io_vsdx_mxVsdxTheme(a);throw Error("invalid overload");}return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};c.prototype.getColor$com_mxgraph_io_vsdx_mxVsdxTheme=function(a){return this.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(-1,a)};c.prototype.setTint=function(a){this.tint=a;this.hasEffects=!0};c.prototype.setShade=
function(a){this.shade=a;this.hasEffects=!0};c.prototype.setComp=function(a){this.comp=a;this.hasEffects=!0};c.prototype.setInv=function(a){this.inv=a;this.hasEffects=!0};c.prototype.setGray=function(a){this.gray=a;this.hasEffects=!0};c.prototype.setAlpha=function(a){this.alpha=a;this.hasEffects=!0};c.prototype.setAlphaOff=function(a){this.alphaOff=a;this.hasEffects=!0};c.prototype.setAlphaMod=function(a){this.alphaMod=a;this.hasEffects=!0};c.prototype.setHue=function(a){this.hue=a;this.hasEffects=
!0};c.prototype.setHueOff=function(a){this.hueOff=a;this.hasEffects=!0};c.prototype.setHueMod=function(a){this.hueMod=a;this.hasEffects=!0};c.prototype.setSat=function(a){this.sat=a;this.hasEffects=!0};c.prototype.setSatOff=function(a){this.satOff=a;this.hasEffects=!0};c.prototype.setSatMod=function(a){this.satMod=a;this.hasEffects=!0};c.prototype.setLum=function(a){this.lum=a;this.hasEffects=!0};c.prototype.setLumOff=function(a){this.lumOff=a;this.hasEffects=!0};c.prototype.setLumMod=function(a){this.lumMod=
a;this.hasEffects=!0};c.prototype.setRed=function(a){this.red=a;this.hasEffects=!0};c.prototype.setRedOff=function(a){this.redOff=a;this.hasEffects=!0};c.prototype.setRedMod=function(a){this.redMod=a;this.hasEffects=!0};c.prototype.setGreen=function(a){this.green=a;this.hasEffects=!0};c.prototype.setGreenOff=function(a){this.greenOff=a;this.hasEffects=!0};c.prototype.setGreenMod=function(a){this.greenMod=a;this.hasEffects=!0};c.prototype.setBlue=function(a){this.blue=a;this.hasEffects=!0};c.prototype.setBlueOff=
function(a){this.blueOff=a;this.hasEffects=!0};c.prototype.setBlueMod=function(a){this.blueMod=a;this.hasEffects=!0};c.prototype.setGamma=function(a){this.gamma=a;this.hasEffects=!0};c.prototype.setInvGamma=function(a){this.invGamma=a;this.hasEffects=!0};return c}();m.OoxmlColor=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColor"})(B.theme||(B.theme={}))})(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.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new g.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new g.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),
parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new g.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new g.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new g.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var d=0;d<a.length;d++){var f=a[d],k=parseInt(f.getAttribute("val"))/1E3|0;switch(f.nodeName){case "a:tint":b.setTint(k);break;
case "a:shade":b.setShade(k);break;case "a:satMod":b.setSatMod(k);break;case "a:lumMod":b.setLumMod(k);break;case "a:hueMod":b.setHueMod(k)}}return b};return c}();m.OoxmlColorFactory=h;h.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(B.theme||(B.theme={}))})(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(a,b,d,f,k,p,n,x,A,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=d;this.quickStyleFontColor=f;this.quickStyleFontMatrix=k;this.quickStyleLineColor=
p;this.quickStyleLineMatrix=n;this.quickStyleShadowColor=x;this.quickStyleType=A;this.quickStyleVariation=C}c.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};c.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};c.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};c.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};c.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};
c.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};c.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};c.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};c.prototype.getQuickStyleType=function(){return this.quickStyleType};c.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};c.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};c.prototype.setQuickStyleFillColor=
function(a){this.quickStyleFillColor=a};c.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};c.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};c.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};c.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};c.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};c.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};c.prototype.setQuickStyleType=
function(a){this.quickStyleType=a};c.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return c}();m.QuickStyleVals=h;h.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(B.theme||(B.theme={}))})(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(a){this.color=null;this.color=a}c.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return c}();m.SolidFillStyle=h;h.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";h.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(B.theme||(B.theme={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){var B=function(){function m(){}m.MAX_AREA_$LI$=function(){null==m.MAX_AREA&&(m.MAX_AREA=1E8);return m.MAX_AREA};return m}();B.MAX_REQUEST_SIZE=52428800;B.IMAGE_DOMAIN="http://img.diagramly.com/";z.Constants=B;B.__class="com.mxgraph.online.Constants"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){var B=function(){function m(){}m.getRotatedPoint=function(h,c,a,b){var d=h.x-b.x;h=h.y-b.y;return new mxPoint(d*c-h*a+b.x,h*c+d*a+b.y)};m.rotatedGeometry=function(h,c,a,b){c=c*Math.PI/180;var d=Math.cos(c);c=Math.sin(c);var f=h.getCenterX()-a,k=h.getCenterY()-b;h.x=Math.round(f*d-k*c+a-h.width/2);h.y=Math.round(k*d+f*c+b-h.height/2)};return m}();B.CHARSET_FOR_URL_ENCODING="ISO-8859-1";z.Utils=B;B.__class="com.mxgraph.online.Utils"})(y.online||(y.online={}))})(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){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){var f=d.getHeight(),k=d.getWidth(),p=Math.floor(Math.round(d.getLastX()*k)/100),n=Math.floor(Math.round(d.getLastY()*f)/100);b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var x=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();x=f-x;var A=
this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=Math.abs(b-p);n=Math.abs(x-n);p=n=.5*A+(p*p+n*n)/(8*A);var C=Math.abs(n);n=Math.round(100*n/k*100)/100;p=Math.round(100*p/f*100)/100;b=Math.round(100*b/k*100)/100;x=Math.round(100*x/f*100)/100;A=Math.round(100*A)/100;n=Math.abs(n);p=Math.abs(p);f=0>A?"1":"0";A=C<Math.abs(A)?"1":"0";d.setLastX(b);d.setLastY(x);return'<arc rx="'+(new String(n)).toString()+'" ry="'+(new String(p)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(x)).toString()+
'" x-axis-rotation="0" large-arc-flag="'+A+'" sweep-flag="'+f+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.ArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(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){return c.call(this,b,null,null)||this}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.DelRow=h;h.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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){b=d.getHeight();var f=d.getWidth(),k=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d=b-d;var p=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
n=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=b-n;var x=this.c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.d*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=Math.abs(p-k);n=Math.abs(n-d);n=Math.sqrt(p*p+n*n);x=Math.abs(x-k);A=Math.abs(b-A-d);k=100*k/f;A=Math.round(100*Math.sqrt(x*x+A*A)/b/2*100)/100;f=Math.round(100*n/f/2*100)/100;x=Math.round(100*(k-2*f))/100;k=Math.round(100*(k+2*f))/100;b=Math.round(100*d/b*100)/100;return'<move x="'+(new String(x)).toString()+
'" 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(x)).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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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 p=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=f-p;var n=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
x=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;p=100*p/f;var J=d.getLastX()*k/100,M=d.getLastY()*f/100,K=b*k/100,P=p*f/100,R=f-x,H=-A;A=Math.sqrt(J*J+M*M)*Math.cos(Math.atan2(M,J)-H);x=Math.sqrt(J*J+M*M)*Math.sin(Math.atan2(M,J)-H);var I=Math.sqrt(K*K+P*P)*Math.cos(Math.atan2(P,K)-H),L=Math.sqrt(K*K+P*P)*Math.sin(Math.atan2(P,K)-H),N=Math.sqrt(n*n+R*R)*Math.cos(Math.atan2(R,n)-H),Q=Math.sqrt(n*n+R*R)*Math.sin(Math.atan2(R,n)-H),ha=((A-I)*(A+I)*(L-Q)-(I-
N)*(I+N)*(x-L)+C*C*(x-L)*(L-Q)*(x-Q))/(2*((A-I)*(L-Q)-(I-N)*(x-L))),V=((A-I)*(I-N)*(A-N)/(C*C)+(I-N)*(x-L)*(x+L)-(A-I)*(L-Q)*(L+Q))/(2*((I-N)*(x-L)-(A-I)*(L-Q))),T=A-ha,W=x-V;T=Math.sqrt(T*T+W*W*C*C);C=T/C;H=180*H/Math.PI;b=Math.round(100*b)/100;p=Math.round(100*p)/100;T=Math.round(100*T/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-J)*(R-M)-(P-M)*(n-J)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ha,V,A,x,I,L,N,Q)&&(k="1");d.setLastX(b);d.setLastY(p);return'<arc rx="'+
(new String(T)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(p)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,p,n,x,A){f-=b;k-=d;n-=d;p=x-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;p=180*(Math.atan2(n,p)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,x)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;p=(p-b)%360;180<f?f-=
360:-180>f&&(f+=360);180<p?p-=360:-180>p&&(p+=360);return(0<f&&0>p||0>f&&0<p)&&180<Math.abs(f-p)?!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,p){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;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={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,p=d.getHeight(),n=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/n*100)/100;k=Math.round(100*(100-100*k/p))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+
(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.LineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(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){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y,p=d.getHeight(),n=d.getWidth();null!=this.x&&null!=this.y&&(f=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());f=Math.round(100*f/n*100)/100;k=Math.round(100*(100-100*k/p))/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);
d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.MoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(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,p,n,x,A){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;b.formulaE=A;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var p=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.formulaE.split("NURBS(").join("");n=n.split(")").join("");
n=new a.Nurbs(this,n,k,f);if(2<=n.getSize()){var x=n.getX(0),A=n.getY(0),C=n.getX(1),J=n.getY(1);b=Math.round(100*b/k*100)/100;p=Math.round(100*(100-100*p/f))/100;x=Math.round(100*x)/100;A=Math.round(100*A)/100;C=Math.round(100*C)/100;J=Math.round(100*J)/100;d.setLastX(b);d.setLastY(p);if(3===n.getDegree()&&n.isOrderedByThree(this.getA())){d=[];f=[];k=[];A=n.getSize();for(x=0;x<A-1;x+=3)d.push(new mxPoint(n.getX(x),n.getY(x))),f.push(new mxPoint(n.getX(x+1),n.getY(x+1))),x<A-2?k.push(new mxPoint(n.getX(x+
2),n.getY(x+2))):k.push(new mxPoint(b,p));b="";for(x=0;x<d.length;x++)b+='<curve x1="'+d[x].x+'" y1="'+d[x].y+'" x2="'+f[x].x+'" y2="'+f[x].y+'" x3="'+k[x].x+'" y3="'+k[x].y+'"/>\n';return b}return'<curve x1="'+(new String(x)).toString()+'" y1="'+(new String(A)).toString()+'" x2="'+(new String(C)).toString()+'" y2="'+(new String(J)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(p)).toString()+'"/>'}}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.NURBSTo=h;h.__class="com.mxgraph.io.vsdx.geometry.NURBSTo";
(function(c){var a=function(){function b(d,f,k,p){this.__parent=d;this.nurbsValues=[];d=f.split(/\s*,\s*/).slice(0);for(f=0;f<d.length;f++)3<f&&0===f%4?this.nurbsValues.push(100*parseFloat(d[f])):3<f&&1===f%4?this.nurbsValues.push(100-100*parseFloat(d[f])):this.nurbsValues.push(parseFloat(d[f]))}b.prototype.isOrderedByThree=function(d){for(var f=0;f+2<this.getSize();f+=3){var k=Math.round(100*this.getKnot(f))/100,p=Math.round(100*this.getKnot(f+1))/100,n=Math.round(100*this.getKnot(f+2))/100;if(k!==
p||k!==n||p!==n)return!1}f=Math.round(10*this.getKnot(this.getSize()-2))/10;k=Math.round(10*this.getKnot(this.getSize()-1))/10;d=Math.round(10*d)/10;return f!==k||f!==d||k!==d?!1:!0};b.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};b.prototype.getKnotLast=function(){return this.nurbsValues[0]};b.prototype.getDegree=function(){return this.nurbsValues[1]};b.prototype.getXType=function(){return this.nurbsValues[2]};b.prototype.getYType=function(){return this.nurbsValues[3]};b.prototype.getX=
function(d){return this.nurbsValues[4*(d+1)]};b.prototype.getY=function(d){return this.nurbsValues[4*(d+1)+1]};b.prototype.getKnot=function(d){return this.nurbsValues[4*(d+1)+2]};b.prototype.getWeight=function(d){return this.nurbsValues[4*(d+1)+3]};return b}();c.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(h=m.NURBSTo||(m.NURBSTo={}))})(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){b=c.call(this,b,d,f)||this;b.formulaA=k;return b}__extends(a,c);a.prototype.handle=function(b,d){b="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var f=d.getHeight(),k=d.getWidth(),p=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();p=Math.round(100*p/k*100)/100;n=Math.round(100*(100-100*n/f))/100;var x=this.formulaA.replace(RegExp("\\s",
"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),"");var A=x&&x.equals?x.equals("inh"):"inh"===x;if(A)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});x=x.split(",").slice(0).slice(0);A=parseFloat(x.splice(0,1));parseFloat(x.splice(0,1));for(var C,J;0<x.length;)C=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
J=parseFloat(x.splice(0,1))*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===A&&(C=100*C/k),1===A&&(J=100*J/f),J=100-J,C=Math.round(100*C)/100,J=Math.round(100*J)/100,d.setLastX(C),d.setLastY(J),b+='<line x="'+(new String(C)).toString()+'" y="'+(new String(J)).toString()+'"/>';b+='<line x="'+(new String(p)).toString()+'" y="'+(new String(n)).toString()+'"/>';d.getLastMoveX()===p&&d.getLastMoveY()===n&&(b+="<close/>")}return b};return a}(g.mxgraph.io.vsdx.geometry.Row);m.PolylineTo=h;h.__class=
"com.mxgraph.io.vsdx.geometry.PolylineTo"})(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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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){b=100*this.x;var f=100-100*this.y,k=100*this.a,p=100-100*this.b,n=100*this.c,x=100-100*this.d;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;p=Math.round(100*p)/100;n=Math.round(100*
n)/100;x=Math.round(100*x)/100;d.setLastX(b);d.setLastY(f);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(p)).toString()+'" x2="'+(new String(n)).toString()+'" y2="'+(new String(x)).toString()+'" x3="'+(new String(b)).toString()+'" y3="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelCubBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);return'<line x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelLineTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelLineTo"})(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){return c.call(this,b,d,f)||this}__extends(a,c);a.prototype.handle=function(b,d){var f=b.x,k=b.y;null!=this.x&&null!=this.y&&(f=100*this.x,k=100-100*this.y);f=Math.round(100*f)/100;k=Math.round(100*k)/100;b.x=f;b.y=k;d.setLastX(f);d.setLastY(k);d.setLastMoveX(f);d.setLastMoveY(k);return'<move x="'+(new String(f)).toString()+'" y="'+(new String(k)).toString()+'"/>'};return a}(g.mxgraph.io.vsdx.geometry.Row);
m.RelMoveTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelMoveTo"})(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,p){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b){b=100*this.x;var f=100-100*this.y,k=100*this.a,p=100-100*this.b;b=Math.round(100*b)/100;f=Math.round(100*f)/100;k=Math.round(100*k)/100;p=Math.round(100*p)/100;d.setLastX(b);d.setLastY(f);return'<quad x1="'+(new String(k)).toString()+'" y1="'+
(new String(p)).toString()+'" x2="'+(new String(b)).toString()+'" y2="'+(new String(f)).toString()+'"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.RelQuadBezTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelQuadBezTo"})(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){b=c.call(this,b,d,f)||this;b.a=k;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a){b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();b=Math.round(100*b)/100;f=Math.round(100*(100-f))/100;d.setLastX(b);d.setLastY(f)}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);
m.SplineKnot=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineKnot"})(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,p,n,x){b=c.call(this,b,d,f)||this;b.a=k;b.b=p;b.c=n;b.d=x;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){d.getHeight();d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var f=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();d.setLastKnot(this.c);b=Math.round(100*b)/
100;f=Math.round(100*(100-f))/100;d.getLastX();d.getLastY();d.setLastX(b);d.setLastY(f);return"<curve "}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.SplineStart=h;h.__class="com.mxgraph.io.vsdx.geometry.SplineStart"})(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(c,a){this.cellElements={};this.sections={};this.styleParents={};this.style=this.pm=this.Id=this.shape=null;this.shape=c;this.pm=a.getPropertiesManager();c=c.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.ID);try{this.Id=null!=c&&0!==c.length?parseFloat(c):-1}catch(b){this.Id=-1}this.cacheCells(a);this.stylesheetRefs(a)}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0(),
h.__static_initializer_1())};h.styleTypes_$LI$=function(){h.__static_initialize();null==h.styleTypes&&(h.styleTypes={});return h.styleTypes};h.__static_initializer_0=function(){h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;
h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN]=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillColor=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$().QuickStyleFillMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN]=
g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineColor=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$().QuickStyleLineMatrix=
g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE]=g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;
h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH]=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$()[g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER]=
g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontColor=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE;h.styleTypes_$LI$().QuickStyleFontMatrix=g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE};h.prototype.getTheme=function(){return null};h.prototype.getQuickStyleVals=function(){return null};h.prototype.isVertex=function(){return!1};h.prototype.styleDebug=function(c){h.vsdxStyleDebug&&console.info(c)};h.prototype.stylesheetRefs=function(c){this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE]=
c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_STYLE));this.styleParents[g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE]=c.getStylesheet(this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_STYLE));this.style=c.getStylesheet("0")};h.prototype.cacheCells=function(c){if(null!=this.shape){var a=this.shape.childNodes;
if(null!=a)for(a=a.item(0);null!=a;)null!=a&&1==a.nodeType&&this.parseShapeElem(a,c),a=a.nextSibling}};h.prototype.parseShapeElem=function(c,a){a=c.nodeName;(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"Cell")?this.cellElements[c.getAttribute("N")]=c:function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Section")&&this.parseSection(c)};h.prototype.parseSection=function(c){var a=new g.mxgraph.io.vsdx.Section(c);this.sections[c.getAttribute("N")]=a};h.prototype.hasProperty=function(c,a){return this.cellElements.hasOwnProperty(a)};
h.prototype.getValue=function(c,a){return null!=c?c.getAttribute("V")||"":a};h.prototype.getValueAsDouble=function(c,a){if(null!=c){var b=c.getAttribute("V");if(null!=b){if(function(f,k){return f&&f.equals?f.equals(k):f===k}(b,"Themed"))return 0;try{var d=parseFloat(b);(function(f,k){return f&&f.equals?f.equals(k):f===k})(c.getAttribute("U"),"PT")&&(d*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());return Math.round(100*d)/100}catch(f){}}}return a};h.prototype.getScreenNumericalValue$org_w3c_dom_Element$double=
function(c,a){if(null!=c&&(c=c.getAttribute("V"),null!=c))try{var b=parseFloat(c);return this.getScreenNumericalValue$double(b)}catch(d){}return a};h.prototype.getScreenNumericalValue=function(c,a){if((null==c||1!=c.nodeType)&&null!==c||"number"!==typeof a&&null!==a){if("number"!==typeof c&&null!==c||void 0!==a)throw Error("invalid overload");return this.getScreenNumericalValue$double(c)}return this.getScreenNumericalValue$org_w3c_dom_Element$double(c,a)};h.prototype.getScreenNumericalValue$double=
function(c){return c*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()};h.prototype.getAttribute=function(c,a,b){var d=this.cellElements;c=d[c]?d[c]:null;null!=c&&(b=c.getAttribute(a)||"");return b};h.prototype.getChildValues=function(c,a){var b={};for(c=c.firstChild;null!=c;){if(null!=c&&1==c.nodeType){var d=c,f;if((f=d.nodeName)&&f.equals?f.equals("Cell"):"Cell"===f){f=d.getAttribute("N")||"";var k=d.getAttribute("V")||""}else f=d.nodeName,k=d.textContent;if(null!=a){var p=a[f]?a[f]:null;null!=
p&&(k=d.getAttribute(p)||"")}b[f]=k}c=c.nextSibling}return b};h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(c,a,b){var d=function(n,x){return n[x]?n[x]:null}(this.sections,b),f=null,k=!1;null!=d&&(f=d.getIndexedCell(a,c));if(null!=f){d=f.getAttribute("F");var p=f.getAttribute("V");if(null!=d&&null!=p)if(function(n,x){return n&&n.equals?n.equals(x):n===x}(d,"Inh")&&function(n,x){return n&&n.equals?n.equals(x):n===x}(p,"Themed"))k=!0;else if(function(n,x){return n&&
n.equals?n.equals(x):n===x}(d,"THEMEVAL()")&&function(n,x){return n&&n.equals?n.equals(x):n===x}(p,"Themed")&&null!=this.style){if(function(n,x){return n&&n.equals?n.equals(x):n===x}(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,c))return f;d=this.style.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b);if(null!=d)return d}}if(null==f||k)if(k=function(n,x){return n[x]?n[x]:null}(h.styleTypes_$LI$(),b),k=function(n,x){return n[x]?n[x]:null}(this.styleParents,k),null!=k&&(c=k.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,
a,b),null!=c))return c;return f};h.prototype.getCellElement=function(c,a,b){if("string"!==typeof c&&null!==c||"string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b){if("string"!==typeof c&&null!==c||void 0!==a||void 0!==b)throw Error("invalid overload");return this.getCellElement$java_lang_String(c)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c,a,b)};h.prototype.getCellElement$java_lang_String=function(c){var a=function(k,p){return k[p]?k[p]:null}(this.cellElements,
c),b=!1;if(null!=a){var d=a.getAttribute("F"),f=a.getAttribute("V");if(null!=d&&null!=f)if(function(k,p){return k&&k.equals?k.equals(p):k===p}(d,"Inh")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(f,"Themed"))b=!0;else if(-1!=d.indexOf("THEMEVAL()")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(f,"Themed")&&null!=this.style){if(function(k,p){return k&&k.equals?k.equals(p):k===p}("FillForegnd",c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR,
c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW,c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW,
c)||function(k,p){return k&&k.equals?k.equals(p):k===p}(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT,c))return a;d=this.style.getCellElement$java_lang_String(c);if(null!=d)return d}}if(null==a||b)if(b=function(k,p){return k[p]?k[p]:null}(h.styleTypes_$LI$(),c),b=function(k,p){return k[p]?k[p]:null}(this.styleParents,b),null!=b&&(c=b.getCellElement$java_lang_String(c),null!=c))return c;return a};h.prototype.getStrokeColor=function(){var c="";(function(a,b){return a&&a.equals?a.equals(b):a===b})(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),
"1"),"0")?c="none":(c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR)),function(a,b){return a&&a.equals?a.equals(b):a===b}("Themed",c)&&(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getLineColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnLineColor(this.getQuickStyleVals())).toHexStr():""));return c};h.prototype.getFillColor=function(){if(function(b,d){return b&&b.equals?b.equals(d):b===d}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),
"0"))){var c=function(b,d){return b[d]?b[d]:null}(this.sections,"FillGradient");if(null!=c&&(c=this.getColor(c.getIndexedCell("0","GradientStopColor")),null!=c&&0!==c.length))return c}c=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND));(function(b,d){return b&&b.equals?b.equals(d):b===d})("Themed",c)&&(c=this.getTheme(),null!=c?(c=c.getFillColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()),c=c.toHexStr()):c="#FFFFFF");var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),
"0");return null!=a&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?"none":c};h.prototype.getColor=function(c){c=this.getValue(c,"");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)||function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextBkgndColor=function(c){c=this.getValue(c,"");return function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")?c:function(a,b){return a&&a.equals?
a.equals(b):a===b}(c,"0")||function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"255")||0===c.length?"none":this.pm.getColor((new String(parseInt(c)-1)).toString())};h.prototype.getLineWeight=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),0)};h.prototype.getStrokeTransparency=function(){return this.getValueAsDouble(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS),
0)};h.prototype.getNameU=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||""};h.prototype.getName=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME)||""};h.prototype.getUniqueID=function(){return this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.UNIQUE_ID)||""};h.prototype.getId=function(){return this.Id};h.prototype.getTextColor=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR,
c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=this.getValue(c,"#000000");(function(a,b){return a&&a.equals?a.equals(b):a===b})("Themed",c)?(c=this.getTheme(),c=null!=c?(this.isVertex()?c.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):c.getConnFontColor(this.getQuickStyleVals())).toHexStr():"#000000"):function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(c,"#")||(c=this.pm.getColor(c));return c};h.prototype.getTextTopMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TOP_MARGIN),
0)};h.prototype.getTextBottomMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BOTTOM_MARGIN),0)};h.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};h.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),
0)};h.prototype.getTextStyle=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STYLE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextFont=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FONT,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextPos=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.POS,
c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(c,"")};h.prototype.getTextStrike=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);c=(c=this.getValue(c,""))&&c.equals?c.equals("1"):"1"===c;return c};h.prototype.getTextCase=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.CASE,c,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
return this.getValue(c,"")};h.prototype.getHorizontalAlign=function(c,a){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(c,"")){case "0":a=a?"left":mxConstants.ALIGN_LEFT;break;case "2":a=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":a=a?"justify":mxConstants.ALIGN_CENTER;break;default:a=a?"center":mxConstants.ALIGN_CENTER}return a};h.prototype.getIndentFirst=
function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getIndentLeft=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,
0))|0)).toString()};h.prototype.getIndentRight=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpBefore=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);
return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpAfter=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))|0)).toString()};h.prototype.getSpLine=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,
c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);c=this.getValue(c,"");var a=c&&c.equals?c.equals(""):""===c;return a?0:parseFloat(c)};h.prototype.getFlags=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLAGS,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getLetterSpace=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LETTER_SPACE,
c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(c,0))).toString()};h.prototype.getBullet=function(c){c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BULLET,c,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return this.getValue(c,"0")};h.prototype.getShape=function(){return this.shape};h.prototype.setShape=function(c){this.shape=c};h.lineDashPatterns_$LI$=function(){h.__static_initialize();
null==h.lineDashPatterns&&(h.lineDashPatterns=[]);return h.lineDashPatterns};h.__static_initializer_1=function(){h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);h.lineDashPatterns_$LI$().push([]);var c=[];c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);
c=[];c.push(h.DASH);c.push(h.SPACE);c.push(h.DASH);c.push(h.SPACE);c.push(h.DOT);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);c.push(h.SHORT_DASH);c.push(h.SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.SHORT_SPACE);
h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.DOT);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);
c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);c.push(h.SHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);
c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.LONG_DASH);c.push(h.LONG_SPACE);c.push(h.DOT);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XLONG_DASH);c.push(h.LONG_SPACE);c.push(h.DASH);c.push(h.LONG_SPACE);
c.push(h.DASH);c.push(h.LONG_SPACE);h.lineDashPatterns_$LI$().push(c);c=[];c.push(h.XSHORT_DASH);c.push(h.SHORT_SPACE);h.lineDashPatterns_$LI$().push(c)};h.getLineDashPattern=function(c){return 0<=c&&23>=c?h.lineDashPatterns_$LI$()[c]:h.lineDashPatterns_$LI$()[0]};return h}();m.__static_initialized=!1;m.vsdxStyleDebug=!1;m.SPACE=4;m.SHORT_SPACE=2;m.LONG_SPACE=6;m.DOT=1;m.DASH=8;m.LONG_DASH=12;m.SHORT_DASH=4;m.XLONG_DASH=20;m.XSHORT_DASH=2;B.Style=m;m.__class="com.mxgraph.io.vsdx.Style"})(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){var k=c.call(this)||this;k.__com_mxgraph_io_vsdx_theme_HslClr_hue=b/360;k.__com_mxgraph_io_vsdx_theme_HslClr_sat=d/100;k.__com_mxgraph_io_vsdx_theme_HslClr_lum=f/100;k.color=(new g.mxgraph.io.vsdx.theme.HSLColor(b,d,f)).toRgb();return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.HslClr=h;h.__class="com.mxgraph.io.vsdx.theme.HslClr"})(B.theme||(B.theme={}))})(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){var d=c.call(this)||this;d.val=b;d.color=new g.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.PrstClr=h;h.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(B.theme||(B.theme={}))})(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){var d=c.call(this)||this;d.isDynamic=!0;d.val=b;return d}__extends(a,c);a.prototype.calcColor=function(b,d){var f=this.val;f="phClr".equals?"phClr".equals(f):"phClr"===f;f?this.color=d.getStyleColor(b):(this.color=d.getSchemeColor(this.val),this.isDynamic=!1);c.prototype.calcColor.call(this,b,d)};return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SchemeClr=h;h.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(B.theme||
(B.theme={}))})(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){var k=c.call(this)||this;k.r=0;k.g=0;k.b=0;k.r=b;k.g=d;k.b=f;k.color=new g.mxgraph.io.vsdx.theme.Color(b,d,f);return k}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.ScrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(B.theme||(B.theme={}))})(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){var d=c.call(this)||this;d.hexVal=null;d.hexVal=b;d.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(b);return d}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SrgbClr=h;h.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(B.theme||(B.theme={}))})(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){var f=c.call(this)||this;f.lastClr=null;f.val=b;f.lastClr=d;if(null==d)switch(b){case "windowText":d="000000";break;case "window":d="FFFFFF";break;default:d="FFFFFF"}f.color=g.mxgraph.io.vsdx.theme.Color.decodeColorHex(d);return f}__extends(a,c);return a}(g.mxgraph.io.vsdx.theme.OoxmlColor);m.SysClr=h;h.__class="com.mxgraph.io.vsdx.theme.SysClr"})(B.theme||(B.theme={}))})(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,p,n,x){return c.call(this,b,d,f,k,p,n,x)||this}__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()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=d.getWidth()/g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=f;this.a*=k;this.b*=f}return c.prototype.handle.call(this,
b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.RelEllipticalArcTo"})(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(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 J=A;if("rel"==J.nodeName.toLowerCase()&&(J=J.getAttribute("r:id"),null!=J&&0!==J.length)){A=C.lastIndexOf("/");var M="",K="";try{M=C.substring(0,A),K=C.substring(A,C.length)}catch(P){break}A=b.getRelationship(J,M+"/_rels"+K+".rels");
if(null!=A){C=A.getAttribute("Target")||"";J=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(P){break}return{type:J,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),p=a.getAttribute("CompressionType")||"",n=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))p=p.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))p="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"))p="png";else if("Object"==k){if(n=d(a,f),0<n.type.indexOf("/oleObject"))if(p=b.getRelationship("rId1","visio/embeddings/_rels/"+n.target+".rels"),null!=p){n=p.getAttribute("Target");k=p.getAttribute("Type");try{var x=n.lastIndexOf("/");n=n.substring(x+1,n.length)}catch(A){return}p="png";n={type:k,target:n}}else return}else return;null==n&&(n=d(a,f));k=n.type;n=n.target;null!=k&&function(A,
C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+n))?(this.imageData.iData=a,function(A,C){var J=A.length-C.length;A=A.indexOf(C,J);return-1!==A&&A===J}(n.toLowerCase(),".bmp")&&(p="jpg"),this.imageData.iType=p):(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(J,M){return J&&J.equals?J.equals(M):J===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(J,M){return J&&J.equals?J.equals(M):J===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(J,M){return J&&J.equals?J.equals(M):J===M}("1",
b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),p="",n="",x=0;x<k.length;x++){var A=k[x];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":p=A;break;case "Format":n=A}}if("esc(0)"==n)this.fields[f]=p;else if(0!==p.length){try{var C=isNaN(p)?new Date(p):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(p)));n="c"==n?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":
"m/d/yyyy h:MM:ss tt":"ddddd"==n?"m/d/yyyy":"dddddd"==n?"dddd, mmmm dd, yyyy":"C"==n?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==n?"h:MM:ss tt":n.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");p=Graph.prototype.formatDate(C,"UTC:"+n.replace(RegExp("\\{|\\}","g"),""))}catch(J){}this.fields[f]=p}}}}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)+";",p="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",n="line-height:"+this.getSpcLine(this.pp),x=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(J,M){return J&&J.equals?J.equals(M):
J===M})(C,"1")?a=a.toUpperCase():function(J,M){return J&&J.equals?J.equals(M):J===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(J,M){return J&&J.equals?J.equals(M):J===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(J,M){return J&&J.equals?J.equals(M):J===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,
"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+p+n+x+'">'+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,
"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};c.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};c.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&
d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};c.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,"")||function(d,f){return d&&d.equals?d.equals(f):d===f}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};c.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};c.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,g.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.round(100*a)/100};c.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),
"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};c.prototype.getGeomList=function(){return this.geomList};c.prototype.getLastX=function(){return this.lastX};c.prototype.getLastY=function(){return this.lastY};c.prototype.getLastMoveX=function(){return this.lastMoveX};c.prototype.getLastMoveY=function(){return this.lastMoveY};c.prototype.getLastKnot=function(){return this.lastKnot};c.prototype.setLastX=function(a){this.lastX=a};c.prototype.setLastY=function(a){this.lastY=
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 p=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),n,x,A=0;A<p.length;A++){var C=
p[A],J=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==J?n=mxUtils.format(C/d):"Y"==J&&(x=mxUtils.format(1-C/b))}null!=n&&null!=x&&a.push({x:n,y:x})}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=
(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,p){var n=this;n.masterShape=null;n.master=null;n.parentHeight=0;n=h.call(this,b,p)||this;n.htmlLabels=!0;n.rootShape=n;n.shapeName=null;n.shapeIndex=0;n.vertex=!0;n.childShapes={};var x=n.getMasterId(),A=n.getShapeMasterId();n.master=null!=x?f[x]?f[x]:null:k;null!=n.master&&(n.masterShape=null==x&&null!=A?n.master.getSubShape(A):n.master.getMasterShape());f=n.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,
k));n.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),n.childShapes=a.parseShapes(b,n.master,!1));b=n.calcRotation();n.rotation=100*b/100;n.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(n.getValue(n.getCellElement$java_lang_String("ThemeIndex"),"0")));b=function(C,J){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(J)||C.entries[M].key===
J)return C.entries[M].value;return null}(p.getThemes(),b);null==b&&(b=p.getDefaultTheme());p=a.getCellIntValue("VariationColorIndex",0);n.setThemeAndVariant(b,p);f=function(C){null==C.entries&&(C.entries=[]);return C.entries}(n.childShapes);for(k=0;k<f.length;k++)x=f[k].getValue(),x.setRootShape(n),null==x.theme&&x.setThemeAndVariant(b,p);n.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(n.getValue(n.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=n.masterShape?(n.masterShape.processGeomList(null),n.processGeomList(n.masterShape.getGeomList()),0===n.width&&(n.width=n.getScreenNumericalValue$org_w3c_dom_Element$double(n.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===n.height&&(n.height=n.getScreenNumericalValue$org_w3c_dom_Element$double(n.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
0))):n.processGeomList(null);n.vertex=d||!a.connectsMap[n.Id]&&null!=n.childShapes&&!function(C){null==C.entries&&(C.entries=[]);return 0==C.entries.length}(n.childShapes)||null!=n.geomList&&(!n.geomList.isNoFill()||1<n.geomList.getGeoCount());n.layerMember=n.getValue(n.getCellElement$java_lang_String("LayerMember"));n.layerMember&&(n.layerMember=n.layerMember.split(";"));return n}__extends(c,h);c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};
c.OFFSET_ARRAY_$LI$=function(){c.__static_initialize();null==c.OFFSET_ARRAY&&(c.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return c.OFFSET_ARRAY};c.arrowSizes_$LI$=function(){c.__static_initialize();null==c.arrowSizes&&(c.arrowSizes=[2,3,5,7,9,22,45]);return c.arrowSizes};c.arrowTypes_$LI$=function(){c.__static_initialize();return c.arrowTypes};c.__static_initializer_0=function(){c.arrowTypes={};(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),2,"blockThin");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=
0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),14,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),17,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),20,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
22,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),23,"dash");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),24,"ERone");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
25,"ERmandOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),27,"ERmany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===
b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
29,"ERzeroToMany");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
7,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),9,"openAsync");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
11,"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),15,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
16,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),18,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),19,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),21,c.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,d){null==
a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),31,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===
b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),32,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
33,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),34,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=
a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),35,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),36,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),37,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<
a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),38,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,
value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),39,mxConstants.ARROW_BLOCK);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),40,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),41,c.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),42,mxConstants.ARROW_OVAL);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),
43,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),44,mxConstants.ARROW_OPEN);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var f=0;f<a.entries.length;f++)if(null!=a.entries[f].key.equals&&a.entries[f].key.equals(b)||
a.entries[f].key===b){a.entries[f].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(c.arrowTypes_$LI$(),45,mxConstants.ARROW_OPEN)};c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$=function(){c.__static_initialize();null==c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER&&(c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER={});return c.__com_mxgraph_io_vsdx_VsdxShape_LOGGER};c.prototype.getShapeNode=function(a){var b=this.cellElements;b=b[a]?b[a]:
null;return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getTextLabel=function(a){var b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HIDE_TEXT),"0");b="1".equals?"1".equals(b):"1"===b;if(b)return null;b=this.getTextChildren();null==b&&null!=this.masterShape&&(b=this.masterShape.getTextChildren());if(this.htmlLabels){if(null!=b)return this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=this.getAlignVertical(),
this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign("0",!1),a||(this.styleMap.overflow="width"),this.getHtmlTextContent(b)}else return a=this.getText(),null==a&&null!=this.masterShape?this.masterShape.getText():a;return null};c.prototype.getIndex=function(a){a=a.getAttribute("IX")||"";return 0===a.length?"0":a};c.prototype.initLabels=function(a){this.paragraphs={};for(var b=null,d=null,f=null,k=0;k<a.length;k++){var p=a.item(k);switch(p.nodeName){case "cp":b=this.getIndex(p);break;case "tp":this.getIndex(p);
break;case "pp":d=this.getIndex(p);break;case "fld":f=this.getIndex(p);break;case "#text":p=p.textContent;var n=this.paragraphs;n=n[d]?n[d]:null;null==n?(n=new g.mxgraph.io.vsdx.Paragraph(p,b,d,f),this.paragraphs[d]=n):n.addText(p,b,f)}}};c.prototype.createHybridLabel=function(a){var b=function(n,x){return n[x]?n[x]:null}(this.paragraphs,a);this.styleMap[mxConstants.STYLE_ALIGN]=this.getHorizontalAlign(a,!1);this.styleMap[mxConstants.STYLE_SPACING_LEFT]=this.getIndentLeft(a);this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=
0;this.styleMap.fontStyle=(new String(d)).toString();a=b.numValues();d=null;for(var f=0;f<a;f++){var k=b.getValue(f);if(0===k.length&&null!=this.fields){var p=b.getField(f);null!=p&&(k=function(n,x){return n[x]?n[x]:null}(this.fields,p),null==k&&null!=this.masterShape&&null!=this.masterShape.fields&&(k=function(n,x){return n[x]?n[x]:null}(this.masterShape.fields,p)))}null!=k&&(d=null==d?k:d+k)}return d};c.prototype.getHtmlTextContent=function(a){function b(A){A=g.mxgraph.io.vsdx.mxVsdxUtils.htmlEntities(A);
p&&(A="<li>"+A,p=!1);k?(A=A.split("\n"),A[A.length-1]||(A.pop(),p=!0),A=A.join("</li><li>")):A=A.replace(RegExp("\n","g"),"<br/>").replace(new RegExp(g.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP,"g"),"<br/>");return this.getTextCharFormated(A)}var d="",f=!0,k=!1,p=!1;if(null!=a&&0<a.length)for(var n=0;n<a.length;n++){var x=a.item(n);(function(A,C){return A&&A.equals?A.equals(C):A===C})(x.nodeName,"cp")?this.cp=this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"tp")?this.tp=
this.getIndex(x):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"pp")?(this.pp=this.getIndex(x),k&&(d+="</li></ul>"),f?f=!1:d+="</p>",d+=this.getTextParagraphFormated("<p>"),x=this.getPPList(this.pp),p=k=null!=x,d+=k?x:""):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"fld")?(this.fld=this.getIndex(x),x=null,null!=this.fields&&(x=function(A,C){return A[C]?A[C]:null}(this.fields,this.fld)),null==x&&null!=this.masterShape&&null!=this.masterShape.fields&&(x=function(A,
C){return A[C]?A[C]:null}(this.masterShape.fields,this.fld)),null!=x&&(d+=b.call(this,x))):function(A,C){return A&&A.equals?A.equals(C):A===C}(x.nodeName,"#text")&&(x=x.textContent,d+=b.call(this,x))}k&&(d+="</li></ul>");return g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(d+(f?"":"</p>"),"div","font-size: 1px")};c.prototype.isConnectorBigNameU=function(a){return function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,
d.length)===d}(a,"45 degree single")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree double")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree  tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree  tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"45 degree tail")||function(b,d,f){void 0===
f&&(f=0);return b.substr(f,d.length)===d}(a,"60 degree tail")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 2")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 1")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Flexi-arrow 3")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Double flexi-arrow")||function(b,d,f){void 0===f&&(f=0);return b.substr(f,d.length)===d}(a,"Fancy arrow")};
c.prototype.isVertex=function(){return this.vertex};c.prototype.getOriginPoint=function(a,b){var d=this.getPinX(),f=this.getPinY(),k=this.getLocPinY(),p=this.getLocPinX(),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);d-=p;a-=f+(x-k);return!b||k===x/2&&p===n/2||0===this.rotation?new mxPoint(d,a):(b=n/2-p,k-=
x/2,x=Math.cos((360-this.rotation)*Math.PI/180),p=Math.sin((360-this.rotation)*Math.PI/180),new mxPoint(d+b-(b*x-k*p),b*p+k*x+a-k))};c.prototype.getDimensions=function(){var a=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0),b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return new mxPoint(0===a&&0<b?1:a,0===b&&0<a?1:b)};c.prototype.getPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_X),
0)};c.prototype.getPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.PIN_Y),0)};c.prototype.getLocPinX=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_X),0)};c.prototype.getLocPinY=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.LOC_PIN_Y),0)};c.prototype.getOpacity=
function(a){this.isGroup();a=this.getValueAsDouble(this.getCellElement$java_lang_String(a),0);a=Math.max(100-100*a,0);return a=Math.min(a,100)};c.prototype.getGradient=function(){if(function(d,f){return d&&d.equals?d.equals(f):d===f}("1",this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_GRADIENT_ENABLED),"0"))){var a=function(d,f){return d[f]?d[f]:null}(this.sections,"FillGradient");if(null!=a){var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a.elem,
"Row");a=this.getColor(a.getIndexedCell(b[b.length-1].getAttribute("IX"),"GradientStopColor"));if(null!=a&&0!==a.length)return a}}a="";b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");25<=parseInt(b)?a=this.getColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_BKGND)):(b=this.getTheme(),null!=b&&(b=b.getFillGraientColor(this.getQuickStyleVals()),null!=b&&(a=b.toHexStr())));return a};c.prototype.getGradientDirection=
function(){var a="",b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_PATTERN),"0");(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"25")?a=mxConstants.DIRECTION_EAST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"27")?a=mxConstants.DIRECTION_WEST:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"28")?a=mxConstants.DIRECTION_SOUTH:function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"30")&&(a=mxConstants.DIRECTION_NORTH);return a};c.prototype.calcRotation=
function(){var a=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ANGLE),"0"));a=180*a/Math.PI;return 360-a%360*100/100};c.prototype.propagateRotation=function(a){this.rotation+=a;this.rotation%=360;this.rotation=100*this.rotation/100};c.prototype.getTopSpacing=function(){return 100*(this.getTextTopMargin()/2-2.8)/100};c.prototype.getBottomSpacing=function(){return 100*(this.getTextBottomMargin()/2-2.8)/100};c.prototype.getLeftSpacing=function(){return 100*
(this.getTextLeftMargin()/2-2.8)/100};c.prototype.getRightSpacing=function(){return 100*(this.getTextRightMargin()/2-2.8)/100};c.prototype.getLabelRotation=function(){var a=!0,b=this.calcRotation(),d=parseFloat(this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),"0"));d=180*d/Math.PI;d-=b;45>Math.abs(d)||270<Math.abs(d)||(a=!1);return a};c.prototype.getHyperlink=function(){var a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("Address",
null,"Hyperlink");a=this.getValue(a,"");var b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String("SubAddress",null,"Hyperlink");b=this.getValue(b,"");return{extLink:a,pageLink:b}};c.prototype.getProperties=function(){var a=[];if(this.sections&&this.sections.Property)for(var b=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Property.elem,"Row"),d=0;d<b.length;d++){var f=b[d],k=f.getAttribute("N");f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f);
for(var p=0;p<f.length;p++){var n=f[p];if("Value"==n.getAttribute("N")){a.push({key:k,val:n.getAttribute("V")});break}}}return a};c.prototype.getStyleFromShape=function(){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();this.rotation=Math.round(this.rotation);0!==this.rotation&&(this.styleMap[mxConstants.STYLE_ROTATION]=""+this.rotation);var a=this.getFillColor();(function(p,n){return p&&p.equals?p.equals(n):p===n})(a,"")?this.styleMap[mxConstants.STYLE_FILLCOLOR]=
"none":this.styleMap[mxConstants.STYLE_FILLCOLOR]=a;var b=this.getId();this.styleDebug("ID = "+b+" , Fill Color = "+a);a=this.getGradient();(function(p,n){return p&&p.equals?p.equals(n):p===n})(a,"")?this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]="none":(this.styleMap[mxConstants.STYLE_GRADIENTCOLOR]=a,a=this.getGradientDirection(),function(p,n){return p&&p.equals?p.equals(n):p===n}(a,"")||function(p,n){return p&&p.equals?p.equals(n):p===n}(a,mxConstants.DIRECTION_SOUTH)||(this.styleMap[mxConstants.STYLE_GRADIENT_DIRECTION]=
a));a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.FILL_FOREGND_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_FILL_OPACITY]=""+a);a=this.getOpacity(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_COLOR_TRANS);100>a&&(this.styleMap[mxConstants.STYLE_STROKE_OPACITY]=""+a);a=this.getForm();a.hasOwnProperty(mxConstants.STYLE_SHAPE)&&function(p,n,x){void 0===x&&(x=0);return p.substr(x,n.length)===n}(function(p,n){return p[n]?p[n]:null}(a,mxConstants.STYLE_SHAPE),"image;")&&(this.styleMap[mxConstants.STYLE_WHITE_SPACE]=
"wrap");for(var d in a)this.styleMap[d]=a[d];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",d=this.getDashPattern(),null!=d&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=d));d=this.getStrokeColor();var f=this.getStrokeTransparency();this.styleDebug("ID = "+b+" , Color = "+d+" , stroke transparency = "+f);(function(p,n){return p&&p.equals?p.equals(n):p===n})(d,"")||1===f||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=d);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=
""+b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);b=Math.round(this.getTopSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b);b=Math.round(this.getBottomSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b);b=Math.round(this.getLeftSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+b);b=Math.round(this.getRightSpacing())|0;0!==b&&(this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b);a=
this.getDirection(a);a!==mxConstants.DIRECTION_EAST&&(this.styleMap[mxConstants.STYLE_DIRECTION]=a);a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_X),"0");b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.FLIP_Y),"0");(function(p,n){return p&&p.equals?p.equals(n):p===n})("1",a)&&(this.styleMap[mxConstants.STYLE_FLIPH]="1");(function(p,n){return p&&p.equals?p.equals(n):p===n})("1",b)&&(this.styleMap[mxConstants.STYLE_FLIPV]=
"1");try{var k=this.getConnections();a=[];for(b=0;b<k.length;b++)a.push("["+k[b].x+","+k[b].y+",0]");this.styleMap.points="["+a.join(",")+"]"}catch(p){console.log(p)}this.resolveCommonStyles();return this.styleMap};c.prototype.getDashPattern=function(){var a=null,b=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");(b&&b.equals?b.equals("Themed"):"Themed"===b)?(b=this.getTheme(),null!=b&&(a=this.isVertex()?b.getLineDashPattern$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
b.getConnLineDashPattern(this.getQuickStyleVals()))):a=B.Style.getLineDashPattern(parseInt(b));if(null!=a&&0!=a.length){b="";for(var d=0;d<a.length;d++)b=b.concat(a[d].toFixed(2)+" ");return b.trim()}return null};c.prototype.isDashed=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_PATTERN),"0");if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")){if(a=this.getTheme(),null!=a)return this.isVertex()?a.isLineDashed$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
a.isConnLineDashed(this.getQuickStyleVals())}else if(!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,"1"))return!0;return!1};c.prototype.getLineWidth=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.LINE_WEIGHT),"1"),b=1;try{var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=(this.isVertex()?f.getLineWidth$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()):
f.getConnLineWidth(this.getQuickStyleVals()))/1E4)}else b=parseFloat(a),b=this.getScreenNumericalValue$double(b)}catch(k){}1>b&&(b*=2);return b};c.prototype.getStartArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getStartSize(this.getQuickStyleVals()):f.getConnStartSize(this.getQuickStyleVals()))}else b=
parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getFinalArrowSize=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW_SIZE),"4");try{var b=4;var d=a&&a.equals?a.equals("Themed"):"Themed"===a;if(d){var f=this.getTheme();null!=f&&(b=this.isVertex()?f.getEndSize(this.getQuickStyleVals()):f.getConnEndSize(this.getQuickStyleVals()))}else b=parseFloat(a);return c.arrowSizes_$LI$()[b]}catch(k){}return 4};c.prototype.getRounding=
function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.ROUNDING),"0");var b=a;b="Themed".equals?"Themed".equals(b):"Themed"===b;b&&(a="0");return parseFloat(a)};c.prototype.isShadow=function(){var a=this.getValue(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.SHDW_PATTERN),"0");return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Themed")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")?!1:!0};c.prototype.getEdgeStyle$java_util_Map=
function(a){var b={};(function(d,f){return d&&d.equals?d.equals(f):d===f})(function(d,f){return d[f]?d[f]:null}(a,mxConstants.STYLE_SHAPE),"mxgraph.lean_mapping.electronic_info_flow_edge")?b[mxConstants.STYLE_EDGE]=mxConstants.NONE:b[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_ELBOW;return b};c.prototype.getEdgeStyle=function(a){if(null!=a&&a instanceof Object||null===a)return this.getEdgeStyle$java_util_Map(a);if(void 0===a)return this.getEdgeStyle$();throw Error("invalid overload");};c.prototype.getMasterId=
function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER):null};c.prototype.getShapeMasterId=function(){return this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE)?this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.MASTER_SHAPE):null};c.prototype.isGroup=function(){var a=(a=this.shape.getAttribute("Type"))&&a.equals?a.equals("Group"):"Group"===a;return a};c.getType=function(a){return a.getAttribute("Type")};
c.prototype.getMaster=function(){return this.master};c.prototype.getNameU=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};c.prototype.getName=function(){var a=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};
c.prototype.getMasterName=function(){return this.shapeName};c.prototype.setLabelOffset=function(a,b){var d="",f="";this.shape.hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.shape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(f=this.getMaster().getMasterElement().getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));
if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(d,"Organizational unit")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(f,"Organizational unit")){var 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.hasAttribute("F")?d.getAttribute("F"):d.textContent,f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
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 p="",n=0;n<b.length;n++){var x=b[n];x=x.trim();(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C})(x,"tabHeight=")&&
(p=x.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(p,"")&&(p="20");b=parseFloat(p);d=parseFloat(d);f=parseFloat(f);p=k.height;d=.1*k.width+100*d;d=new mxPoint(d,p-p*f-b/2);a.getGeometry().offset=d}else if(function(A,C,J){void 0===J&&(J=0);return A.substr(J,C.length)===C}(d,"Domain 3D")||function(A,C,J){void 0===J&&(J=0);return A.substr(J,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);p=k.height;d=.1*k.width+100*d;d=new mxPoint(d,p-p*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(P,R){return P&&P.equals?P.equals(R):P===R}(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(P,R){return P[R]?P[R]:null}(d,"iType"),k=function(P,R){return P[R]?P[R]:null}(d,"iData"),p=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),x=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")),J=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=p||0!=n||x!=C||A!=J?this.toBeCroppedImg={imgOffsetX:p,imgOffsetY:n,imgWidth:x,imgHeight:A,width:C,height:J,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(P,R){return P&&P.equals?P.equals(R):P===R}(M,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(M);a[mxConstants.STYLE_SHAPE]=
"stencil("+K+")"}catch(P){}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,p){return k&&k.equals?k.equals(p):k===p}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,p){return k&&k.equals?k.equals(p):k===p}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,p){return k&&k.equals?k.equals(p):
k===p}(d.toLowerCase(),"inh"))d=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===f||function(k,p){return k&&k.equals?k.equals(p):k===p}(f.toLowerCase(),"inh"))f=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(k,p){return k&&k.equals?k.equals(p):k===p}(a.toLowerCase(),"width*0.5")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(b.toLowerCase(),"height*0.5")&&function(k,p){return k&&k.equals?k.equals(p):
k===p}(d.toLowerCase(),"width*1")&&function(k,p){return k&&k.equals?k.equals(p):k===p}(f.toLowerCase(),"height*1")||!(function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(a.toLowerCase(),"width*")&&function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(b.toLowerCase(),"height*")&&function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(d.toLowerCase(),"width*")&&function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(f.toLowerCase(),"height*")||function(k,
p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(a.toLowerCase(),"controls.row_")||function(k,p,n){void 0===n&&(n=0);return k.substr(n,p.length)===p}(b.toLowerCase(),"controls.row_"))?!1:!0};c.prototype.isVerticalLabel=function(){var a=this.getAttribute("TextDirection","V","");a||null==this.masterShape||(a=this.masterShape.getAttribute("TextDirection","V",""));return"1"==a};c.prototype.isRotatedLabel=function(){if(this.isVerticalLabel())return!0;var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,
"V","");null!=this.masterShape&&function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")&&(a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE,"V",""));return 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,"0.0")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")?!1:!0};c.prototype.setRootShape=function(a){this.rootShape=a};c.prototype.getRootShape=function(){return this.rootShape};c.prototype.getStartXY=
function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_X),0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getEndXY=function(a){var b=Math.floor(Math.round(100*this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_X),
0))/100);a=Math.floor(Math.round(100*(a-this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.END_Y),0)))/100);return new mxPoint(b,a)};c.prototype.getRoutingPoints=function(a,b,d){return null!=this.geomList?this.geomList.getRoutingPoints(a,b,d):null};c.prototype.getControlPoints=function(a){var b=this.getStartXY(a);a=this.getEndXY(a);var d=[];if(null!=this.shape){var f=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.GEOM);
if(0<f.length&&(f=f.item(0).getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.NURBS_TO).item(0).getElementsByTagName("E").item(0),null!=f)){f=f.getAttribute("F")||"";f=f.replace(RegExp("NURBS\\(","g"),"");f=f.replace(RegExp("\\)","g"),"");f=f.replace(RegExp(",","g")," ");f=f.replace(RegExp("\\s\\s","g")," ");f=f.split(" ");for(var k=f.length,p=[];0<k--;)p.push(0);for(k=0;k<f.length;k++)p[k]=parseFloat(f[k]);for(k=2;k+4<f.length;k+=4){var n=new mxPoint,x=p[k+3];n.x=Math.floor(Math.round(100*(b.x+
Math.min(100,Math.abs(a.x-b.x))*p[k+2]))/100);n.y=Math.floor(Math.round(100*(b.y-100*x))/100);d.push(n)}return d}}return null};c.prototype.getStyleFromEdgeShape=function(a){this.styleMap[g.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID]=this.getId().toString();a=this.getForm();if(null!=a&&!function(d,f){return d&&d.equals?d.equals(f):d===f}(a,""))for(var b in a)this.styleMap[b]=a[b];this.isDashed()&&(this.styleMap[mxConstants.STYLE_DASHED]="1",b=this.getDashPattern(),null!=b&&(this.styleMap[mxConstants.STYLE_DASH_PATTERN]=
b));b=this.getEdgeMarker(!0);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_STARTFILL]="0"),this.styleMap[mxConstants.STYLE_STARTARROW]=b);b=this.getEdgeMarker(!1);null!=b&&(function(d,f,k){void 0===k&&(k=0);return d.substr(k,f.length)===f}(b,c.ARROW_NO_FILL_MARKER)&&(b=b.substring(c.ARROW_NO_FILL_MARKER.length),this.styleMap[mxConstants.STYLE_ENDFILL]="0"),this.styleMap[mxConstants.STYLE_ENDARROW]=
b);b=Math.round(this.getStartArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_STARTSIZE]=""+b);b=Math.round(this.getFinalArrowSize())|0;6!==b&&(this.styleMap[mxConstants.STYLE_ENDSIZE]=""+b);b=Math.round(this.getLineWidth())|0;1!==b&&(this.styleMap[mxConstants.STYLE_STROKEWIDTH]=""+b);b=this.getStrokeColor();(function(d,f){return d&&d.equals?d.equals(f):d===f})(b,"")||(this.styleMap[mxConstants.STYLE_STROKECOLOR]=b);this.isShadow()&&(this.styleMap[mxConstants.STYLE_SHADOW]=g.mxgraph.io.vsdx.mxVsdxConstants.TRUE);
this.isConnectorBigNameU(this.getNameU())&&(this.styleMap[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_ARROW,b=this.getFillColor(),function(d,f){return d&&d.equals?d.equals(f):d===f}(b,"")||(this.styleMap[mxConstants.STYLE_FILLCOLOR]=b));b=Math.round(this.getTopSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_TOP]=""+b;b=Math.round(this.getBottomSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_BOTTOM]=""+b;b=Math.round(this.getLeftSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_LEFT]=""+
b;b=Math.round(this.getRightSpacing())|0;this.styleMap[mxConstants.STYLE_SPACING_RIGHT]=""+b;b=this.getAlignVertical();this.styleMap[mxConstants.STYLE_VERTICAL_ALIGN]=b;this.styleMap.html="1";this.resolveCommonStyles();return this.styleMap};c.prototype.resolveCommonStyles=function(){var a=this.getTextBkgndColor(this.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.TEXT_BKGND));var b=a&&a.equals?a.equals(""):""===a;b||"1"!=this.getValue(this.getCellElement$java_lang_String("TextBkgndTrans"),
"0")&&(this.styleMap[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=a);this.styleMap[mxConstants.STYLE_ROUNDED]=0<this.getRounding()?g.mxgraph.io.vsdx.mxVsdxConstants.TRUE:g.mxgraph.io.vsdx.mxVsdxConstants.FALSE;return this.styleMap};c.prototype.getEdgeMarker=function(a){var b=this.getValue(this.getCellElement$java_lang_String(a?g.mxgraph.io.vsdx.mxVsdxConstants.BEGIN_ARROW:g.mxgraph.io.vsdx.mxVsdxConstants.END_ARROW),"0"),d=0;try{if(function(k,p){return k&&k.equals?k.equals(p):k===p}(b,"Themed")){var f=
this.getTheme();null!=f&&(d=this.isVertex()?f.getEdgeMarker(a,this.getQuickStyleVals()):f.getConnEdgeMarker(a,this.getQuickStyleVals()))}else d=parseInt(b)}catch(k){}a=function(k,p){null==k.entries&&(k.entries=[]);for(var n=0;n<k.entries.length;n++)if(null!=k.entries[n].key.equals&&k.entries[n].key.equals(p)||k.entries[n].key===p)return k.entries[n].value;return null}(c.arrowTypes_$LI$(),d);0<d&&null==a&&(a=function(k,p){null==k.entries&&(k.entries=[]);for(var n=0;n<k.entries.length;n++)if(null!=
k.entries[n].key.equals&&k.entries[n].key.equals(p)||k.entries[n].key===p)return k.entries[n].value;return null}(c.arrowTypes_$LI$(),1));return a};c.prototype.getCellElement$java_lang_String=function(a){var b=h.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,d){var f=h.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,
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),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),
f/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),x=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),p),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 J=mxUtils.clone(this.getStyleMap())||{};J[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;J[mxConstants.STYLE_STROKECOLOR]=
mxConstants.NONE;J[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;J.hasOwnProperty("align")||(J.align="center");J.hasOwnProperty("verticalAlign")||(J.verticalAlign="middle");J.hasOwnProperty("whiteSpace")||(J.whiteSpace="wrap");delete J.shape;delete J.image;this.isVerticalLabel()&&(A+=Math.PI+.01,J.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(J.rotation=""+A));J="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(J,"=");p=b.getGeometry().height-
(x+f-p);k=n-k;0<M&&(n=new mxGeometry(k,p,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(n,M,k.width/2,k.height/2),k=n.x,p=n.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*p)/100,Math.round(100*d)/100,Math.round(100*f)/100,J+";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()),p=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),x=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-n+k/2);a=x-p+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={}));
(function(g){(function(y){(function(z){var B=function(){function m(){}m.__static_initialize=function(){m.__static_initialized||(m.__static_initialized=!0,m.__static_initializer_0())};m.CA_$LI$=function(){m.__static_initialize();null==m.CA&&(m.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return m.CA};m.IA_$LI$=function(){m.__static_initialize();if(null==m.IA){for(var h=256,c=[];0<h--;)c.push(0);m.IA=c}return m.IA};m.__static_initializer_0=function(){for(var h=m.IA_$LI$(),
c=0;c<h.length;c++)h[c]=-1;h=0;for(c=m.CA_$LI$().length;h<c;h++)m.IA_$LI$()[m.CA_$LI$()[h].charCodeAt(0)]=h;m.IA_$LI$()[61]=0};m.encodeToChar=function(h,c,a){var b=null!=h?h.length-c:0;if(0===b)return[];var d=3*(b/3|0),f=((b-1)/3|0)+1<<2;f+=a?((f-1)/76|0)<<1:0;for(var k=Array(f),p=c,n=0,x=0;p<d+c;){var A=(h[p++]&255)<<16|(h[p++]&255)<<8|h[p++]&255;k[n++]=m.CA_$LI$()[A>>>18&63];k[n++]=m.CA_$LI$()[A>>>12&63];k[n++]=m.CA_$LI$()[A>>>6&63];k[n++]=m.CA_$LI$()[A&63];a&&19===++x&&n<f-2&&(k[n++]="\r",k[n++]=
"\n",x=0)}a=b-d;0<a&&(A=(h[d+c]&255)<<10|(2===a?(h[b+c-1]&255)<<2:0),k[f-4]=m.CA_$LI$()[A>>12],k[f-3]=m.CA_$LI$()[A>>>6&63],k[f-2]=2===a?m.CA_$LI$()[A&63]:"=",k[f-1]="=");return k};m.decode$char_A=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b].charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b].charCodeAt(0)];)61==function(n){return null==n.charCodeAt?n:n.charCodeAt(0)}(h[b])&&d++;c=(6*(c-a)>>3)-d;a=function(n){for(var x=
[];0<n--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var p=m.IA_$LI$()[h[d++].charCodeAt(0)];0<=p?b|=p<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decode=function(h){if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decode$byte_A(h);
if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decode$java_lang_String(h);throw Error("invalid overload");};m.decodeFast$char_A=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a].charCodeAt(0)];)a++;for(;0<b&&0>m.IA_$LI$()[h[b].charCodeAt(0)];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b])?61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h[b-1])?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?
C:C.charCodeAt(0)}(h[76])?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var p=0,n=0,x=3*(f/3|0);p<x;){var A=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18|m.IA_$LI$()[h[a++].charCodeAt(0)]<<12|m.IA_$LI$()[h[a++].charCodeAt(0)]<<6|m.IA_$LI$()[h[a++].charCodeAt(0)];c[p++]=A>>16|0;c[p++]=A>>8|0;c[p++]=A|0;0<k&&19===++n&&(a+=2,n=0)}if(p<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++].charCodeAt(0)]<<18-6*k;for(h=16;p<f;h-=8)c[p++]=A>>h|0}return c};m.decodeFast=function(h){if(null!=
h&&h instanceof Array&&(0==h.length||null==h[0]||"string"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$char_A(h);if(null!=h&&h instanceof Array&&(0==h.length||null==h[0]||"number"===typeof h[0])||null===h)return g.mxgraph.online.mxBase64.decodeFast$byte_A(h);if("string"===typeof h||null===h)return g.mxgraph.online.mxBase64.decodeFast$java_lang_String(h);throw Error("invalid overload");};m.encodeToByte=function(h,c){var a=null!=h?h.length:0;if(0===a)return[];for(var b=3*(a/
3|0),d=((a-1)/3|0)+1<<2,f=d+=c?((d-1)/76|0)<<1:0,k=[];0<f--;)k.push(0);for(var p=0,n=0,x=0;p<b;)f=(h[p++]&255)<<16|(h[p++]&255)<<8|h[p++]&255,k[n++]=m.CA_$LI$()[f>>>18&63].charCodeAt(0),k[n++]=m.CA_$LI$()[f>>>12&63].charCodeAt(0),k[n++]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[n++]=m.CA_$LI$()[f&63].charCodeAt(0),c&&19===++x&&n<d-2&&(k[n++]=13,k[n++]=10,x=0);c=a-b;0<c&&(f=(h[b]&255)<<10|(2===c?(h[a-1]&255)<<2:0),k[d-4]=m.CA_$LI$()[f>>12].charCodeAt(0),k[d-3]=m.CA_$LI$()[f>>>6&63].charCodeAt(0),k[d-2]=
2===c?m.CA_$LI$()[f&63].charCodeAt(0):61,k[d-1]=61);return k};m.decode$byte_A=function(h){for(var c=h.length,a=0,b=0;b<c;b++)0>m.IA_$LI$()[h[b]&255]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h[--b]&255];)61==h[b]&&d++;b=c=(6*(c-a)>>3)-d;for(a=[];0<b--;)a.push(0);for(var f=d=0;f<c;){for(var k=b=0;4>k;k++){var p=m.IA_$LI$()[h[d++]&255];0<=p?b|=p<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$byte_A=function(h){var c=h.length;if(0===
c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[h[a]&255];)a++;for(;0<b&&0>m.IA_$LI$()[h[b]&255];)b--;var d=61==h[b]?61==h[b-1]?2:1:0,f=b-a+1,k=76<c?(13==h[76]?f/78|0:0)<<1:0,p=f=(6*(f-k)>>3)-d;for(c=[];0<p--;)c.push(0);for(var n=p=0,x=3*(f/3|0);p<x;){var A=m.IA_$LI$()[h[a++]]<<18|m.IA_$LI$()[h[a++]]<<12|m.IA_$LI$()[h[a++]]<<6|m.IA_$LI$()[h[a++]];c[p++]=A>>16|0;c[p++]=A>>8|0;c[p++]=A|0;0<k&&19===++n&&(a+=2,n=0)}if(p<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h[a++]]<<18-6*k;for(h=16;p<f;h-=8)c[p++]=A>>
h|0}return c};m.encodeToString=function(h,c,a){return m.encodeToChar(h,c,a).join("")};m.decode$java_lang_String=function(h){var c=null!=h?h.length:0;if(0===c)return[];for(var a=0,b=0;b<c;b++)0>m.IA_$LI$()[h.charAt(b).charCodeAt(0)]&&a++;if(0!==(c-a)%4)return null;var d=0;for(b=c;1<b&&0>=m.IA_$LI$()[h.charAt(--b).charCodeAt(0)];)61==function(n){return null==n.charCodeAt?n:n.charCodeAt(0)}(h.charAt(b))&&d++;c=(6*(c-a)>>3)-d;a=function(n){for(var x=[];0<n--;)x.push(0);return x}(c);for(var f=d=0;f<c;){for(var k=
b=0;4>k;k++){var p=m.IA_$LI$()[h.charAt(d++).charCodeAt(0)];0<=p?b|=p<<18-6*k:k--}a[f++]=b>>16|0;f<c&&(a[f++]=b>>8|0,f<c&&(a[f++]=b|0))}return a};m.decodeFast$java_lang_String=function(h){var c=h.length;if(0===c)return[];for(var a=0,b=c-1;a<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(a))&255];)a++;for(;0<b&&0>m.IA_$LI$()[function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))&255];)b--;var d=61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b))?
61==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(b-1))?2:1:0,f=b-a+1,k=76<c?(13==function(C){return null==C.charCodeAt?C:C.charCodeAt(0)}(h.charAt(76))?f/78|0:0)<<1:0;f=(6*(f-k)>>3)-d;c=function(C){for(var J=[];0<C--;)J.push(0);return J}(f);for(var p=0,n=0,x=3*(f/3|0);p<x;){var A=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<12|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<6|m.IA_$LI$()[h.charAt(a++).charCodeAt(0)];c[p++]=A>>16|0;c[p++]=A>>
8|0;c[p++]=A|0;0<k&&19===++n&&(a+=2,n=0)}if(p<f){for(k=A=0;a<=b-d;k++)A|=m.IA_$LI$()[h.charAt(a++).charCodeAt(0)]<<18-6*k;for(h=16;p<f;h-=8)c[p++]=A>>h|0}return c};return m}();B.__static_initialized=!1;z.mxBase64=B;B.__class="com.mxgraph.online.mxBase64"})(y.online||(y.online={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$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,p=b.dy,
n=0;n<d.length;n++)this.importEdge(d[n],c,f,k,p)}catch(V){throw console.log(V),V;}finally{a.endUpdate()}a.beginUpdate();try{var x=c.getModel().cells,A;for(A in x){var C=x[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var J=C.children[B].geometry;if(J.adjustIt){var M=c.view.getState(C),K=M.absolutePoints,P=K[0],R=K[K.length-1],H=J.x,I=J.y;k=R.x-P.x;p=R.y-P.y;var L=P.x+H*k,N=P.y+H*p,Q=Math.sqrt(k*k+p*p);k/=Q;p/=Q;L-=I*p;N+=I*k;var ha=c.view.getRelativePoint(M,L,N);J.x=ha.x;J.y=
ha.y}}}}catch(V){throw console.log(V),V;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(V){z&&z(V)}};
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=
this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.X_KEY),this.sharedData[h]=a[m];else for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_RESOURCES),y=0;y<c.length;y++)for(a=this.getDirectChildElements(c[y]),m=0;m<a.length;m++)h=a[m].getAttribute(mxGraphMlConstants.ID),this.sharedData[h]=a[m]};
mxGraphMlCodec.prototype.parseAttributes=function(g,y){if(g=g.attributes)for(var z=0;z<g.length;z++){var B=g[z].nodeValue,m=this.refRegexp.exec(B),h=this.staticRegexp.exec(B);m?(B=m[1],m=this.cachedRefObj[B],m||(m={},m[this.sharedData[B].nodeName]=this.dataElem2Obj(this.sharedData[B]),this.cachedRefObj[B]=m),y[g[z].nodeName]=m):h?(y[g[z].nodeName]={},y[g[z].nodeName][h[1]]=h[2]):y[g[z].nodeName]=B}};
mxGraphMlCodec.prototype.dataElem2Obj=function(g){var y=this.getDirectFirstChildNamedElements(g,mxGraphMlConstants.GRAPHML_REFERENCE)||g.getAttribute(mxGraphMlConstants.REFID),z=null,B=g,m={};if(y){z="string"===typeof y?y:y.getAttribute(mxGraphMlConstants.RESOURCE_KEY);if(y=this.cachedRefObj[z])return this.parseAttributes(g,y),y;g=this.sharedData[z]}this.parseAttributes(g,m);for(y=0;y<g.childNodes.length;y++){var h=g.childNodes[y];if(1==h.nodeType){var c=h.nodeName;if(c==mxGraphMlConstants.X_LIST){var a=
[];h=this.getDirectChildElements(h);for(var b=0;b<h.length;b++)c=h[b].nodeName,a.push(this.dataElem2Obj(h[b]));m[c]=a}else c==mxGraphMlConstants.X_STATIC?(c=h.getAttribute(mxGraphMlConstants.MEMBER),a=c.lastIndexOf("."),m[c.substr(0,a)]=c.substr(a+1)):(a=c.lastIndexOf("."),0<a&&(c=c.substr(a+1)),null!=m[c]?(m[c]instanceof Array||(m[c]=[m[c]]),m[c].push(this.dataElem2Obj(h))):m[c]=this.dataElem2Obj(h))}else 3!=h.nodeType&&4!=h.nodeType||!h.textContent.trim()||(m["#text"]=h.textContent)}return z?(g=
{},this.parseAttributes(B,g),g[this.sharedData[z].nodeName]=m,this.cachedRefObj[z]=g):m};mxGraphMlCodec.prototype.mapArray=function(g,y,z){for(var B={},m=0;m<g.length;m++)g[m].name&&(B[g[m].name]=g[m].value||g[m]);this.mapObject(B,y,z)};
mxGraphMlCodec.prototype.mapObject=function(g,y,z){if(y.defaults)for(var B in y.defaults)z[B]=y.defaults[B];for(B in y){for(var m=B.split("."),h=g,c=0;c<m.length&&h;c++)h=h[m[c]];null==h&&g&&(h=g[B]);if(null!=h)if(m=y[B],"string"===typeof h)if("string"===typeof m)z[m]=h.toLowerCase();else if("object"===typeof m){c=h.toLowerCase();switch(m.mod){case "color":0==h.indexOf("#")&&9==h.length?c="#"+h.substr(3)+h.substr(1,2):"TRANSPARENT"==h&&(c="none");break;case "shape":c=mxGraphMlShapesMap[h.toLowerCase()];
break;case "bpmnOutline":c=mxGraphMlShapesMap.bpmnOutline[h.toLowerCase()];break;case "bpmnSymbol":c=mxGraphMlShapesMap.bpmnSymbol[h.toLowerCase()];break;case "bool":c="true"==h?"1":"0";break;case "scale":try{c=parseFloat(h)*m.scale}catch(a){}break;case "arrow":c=mxGraphMlArrowsMap[h]}null!=c&&(z[m.key]=c)}else m(h,z);else h instanceof Array?this.mapArray(h,m,z):null!=h.name&&null!=h.value?this.mapArray([h],m,z):this.mapObject(h,m,z)}};mxGraphMlCodec.prototype.createMxGraph=function(){return new mxGraph};
mxGraphMlCodec.prototype.importGraph=function(g,y,z){for(var B=this.getDirectChildNamedElements(g,mxGraphMlConstants.NODE),m=z,h=0,c=0;m&&m.geometry;)h+=m.geometry.x,c+=m.geometry.y,m=m.parent;for(m=0;m<B.length;m++)this.importNode(B[m],y,z,h,c);this.edges.push({edges:this.getDirectChildNamedElements(g,mxGraphMlConstants.EDGE),parent:z,dx:h,dy:c})};
mxGraphMlCodec.prototype.importPort=function(g,y){var z=g.getAttribute(mxGraphMlConstants.PORT_NAME),B={};g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(var m=0;m<g.length;m++){var h=g[m];h.getAttribute(mxGraphMlConstants.KEY);h=this.dataElem2Obj(h);h.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(h,{"y:FreeNodePortLocationModelParameter.Ratio":function(c,a){c=c.split(",");a.pos={x:c[0],y:c[1]}}},B)}y[z]=B};
mxGraphMlCodec.prototype.styleMap2Str=function(g){var y="",z="",B;for(B in g)z+=y+B+"="+g[B],y=";";return z};
mxGraphMlCodec.prototype.importNode=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);y.addCell(a,z);z={graphMlID:c};for(var b=null,d=null,f=null,k=null,p=0;p<h.length;p++){var n=this.dataElem2Obj(h[p]);if(n.key)if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,n,B,m);else if(n.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)f=
n;else if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)b=n,n["yjs:StringTemplateNodeStyle"]?d=n["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,n,z);else if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)k=n;else if(n.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var x=b=null;for(x in n)if("key"!=x&&"#text"!=x){if("y:ProxyAutoBoundsNode"==x){if(x=n[x]["y:Realizers"])for(var A in x)if("active"!=A&&"#text"!=A){b=x[A][x.active];n={};n[A]=b;break}}else b=
n[x];break}b&&(b[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,b[mxGraphMlConstants.GEOMETRY],B,m),b[mxGraphMlConstants.NODE_LABEL]&&(k=b[mxGraphMlConstants.NODE_LABEL]));b=n;this.addNodeStyle(a,n,z)}}m=this.getDirectChildNamedElements(g,mxGraphMlConstants.PORT);B={};for(p=0;p<m.length;p++)this.importPort(m[p],B);d&&this.handleTemplates(d,f,a,z);this.handleFixedRatio(a,z);this.handleCompoundShape(a,z,b,null);0==z.strokeWidth&&(z.strokeColor="none");a.style=this.styleMap2Str(z);g=this.getDirectChildNamedElements(g,
mxGraphMlConstants.GRAPH);for(p=0;p<g.length;p++)this.importGraph(g[p],y,a,B);k&&this.addLabels(a,k,z,y);this.nodesMap[c]={node:a,ports:B}};
mxGraphMlCodec.prototype.addNodeStyle=function(g,y,z){g=function(H,I){if("line"!=H){I.dashed=1;switch(H){case "DashDot":H="3 1 1 1";break;case "Dot":H="1 1";break;case "DashDotDot":H="3 1 1 1 1 1";break;case "Dash":H="3 1";break;case "dotted":H="1 3";break;case "dashed":H="5 2";break;default:H=H.replace(/0/g,"1")}H&&(0>H.indexOf(" ")&&(H=H+" "+H),I.dashPattern=H)}};g={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",
mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(H,I){"true"==H&&(I.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(H,I){"false"==H&&(I.strokeColor="none")},
type:g},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"}};var B=mxUtils.clone(g);B.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var m=mxUtils.clone(g);m.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var h=mxUtils.clone(g);h.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};
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 p=mxUtils.clone(g);p.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};p.inset="strokeWidth";p.radius="arcSize";p.drawShadow={key:"shadow",mod:"bool"};p.color={key:"fillColor",mod:"color",addGradient:"north"};p["color.yjs:Color.value"]=p.color;var n=mxUtils.clone(g);n.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};n.drawShadow={key:"shadow",mod:"bool"};var x=mxUtils.clone(g);x.defaults={shape:"swimlane",
startSize:20,strokeWidth:4,spacingLeft:10};x.isCollapsible={key:"collapsible",mod:"bool"};x.borderColor={key:"strokeColor",mod:"color"};x.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 J=mxUtils.clone(g);J.defaults={shape:"image"};J.image=function(H,I){I.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,I){I.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,I){"roundrectangle"==H&&(I.rounded=1,I.arcSize=5)};var P=mxUtils.clone(g);P.defaults={shape:"js:table2"};
var R=mxUtils.clone(g);R.defaults={gradientDirection:"east"};R["y:Fill"].color2={key:"gradientColor",mod:"color"};R["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":p,"yjs:ShinyPlateNodeStyle":n,"demostyle:DemoGroupStyle":x,"yjs:CollapsibleNodeStyleDecorator":A,
"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":J,"y:ShapeNode":g,"y:GenericNode":R,"y:GenericGroupNode":R,"y:TableNode":P,"y:SVGNode":M,"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))}};
mxGraphMlCodec.prototype.handleCompoundShape=function(g,y,z,B){var m=y.shape;if(m&&0==m.indexOf("js:")){switch(m){case "js:bpmnArtifactShadow":y.shadow="1";case "js:bpmnArtifact":y.shape=y.symbol;delete y.fillColor;delete y.strokeColor;delete y.gradientColor;this.handleCompoundShape(g,y,z,B);break;case "js:bpmnDataObjectShadow":case "js:bpmnDataObject":y.shape="note;size=16";z=z["bpmn:DataObjectNodeStyle"]||z["y:GenericNode"]||z["y:GenericGroupNode"];B={};this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.dataObjectType":"dataObjectType",
"com.yworks.bpmn.marker1":"marker1"}},B);if("true"==z.collection||"bpmn_marker_parallel"==B.marker1){var h=new mxCell("",new mxGeometry(.5,1,10,10),"html=1;whiteSpace=wrap;shape=parallelMarker;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-5,-10);g.insert(h)}if("INPUT"==z.type||"data_object_type_input"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,
2),g.insert(h);else if("OUTPUT"==z.type||"data_object_type_output"==B.dataObjectType)h=new mxCell("",new mxGeometry(0,0,10,10),"html=1;shape=singleArrow;arrowWidth=0.4;arrowSize=0.4;fillColor=#000000;"),h.vertex=!0,h.geometry.relative=!0,h.geometry.offset=new mxPoint(2,2),g.insert(h);break;case "js:BpmnChoreography":this.mapObject(z,{defaults:{shape:"swimlane;collapsible=0;rounded=1",startSize:"20",strokeColor:"#006000",fillColor:"#CCCCCC"}},y);h=g.geometry;h=new mxCell("",new mxGeometry(0,h.height-
20,h.width,20),"strokeColor=#006000;fillColor=#777777;rounded=1");h.vertex=!0;g.insert(h);B&&B.lblTxts&&(g.value=B.lblTxts[0],h.value=B.lblTxts[1]);break;case "js:bpmnActivityShadow":case "js:bpmnActivity":y.shape="ext;rounded=1";B={};z=z["y:GenericNode"]||z["y:GenericGroupNode"];this.mapObject(z,{"y:StyleProperties.y:Property":{"com.yworks.bpmn.taskType":"taskType","com.yworks.bpmn.activityType":"activityType","com.yworks.bpmn.marker1":"marker1","com.yworks.bpmn.marker2":"marker2","com.yworks.bpmn.marker3":"marker3",
"com.yworks.bpmn.marker4":"marker4"}},B);switch(B.activityType){case "activity_type_transaction":y["double"]="1"}switch(B.taskType){case "task_type_send":var c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;fillColor=#000000;strokeColor=#FFFFFF;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_receive":c=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_user":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");
c.geometry.offset=new mxPoint(4,5);break;case "task_type_manual":c=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_business_rule":c=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");c.geometry.offset=new mxPoint(4,7);break;case "task_type_service":c=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");c.geometry.offset=new mxPoint(4,5);break;case "task_type_script":c=
new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),c.geometry.offset=new mxPoint(4,5)}c&&(c.vertex=!0,c.geometry.relative=!0,g.insert(c),c=null);var a=0;for(h=1;4>=h;h++)B["marker"+h]&&a++;z=-7.5*a-2*(a-1);for(h=1;h<=a;h++){switch(B["marker"+h]){case "bpmn_marker_closed":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_open":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=rect;part=1;");c.geometry.offset=
new mxPoint(z,-20);var b=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");b.geometry.offset=new mxPoint(-4,-1);b.geometry.relative=!0;b.vertex=!0;c.insert(b);break;case "bpmn_marker_loop":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_parallel":c=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_sequential":c=new mxCell("",
new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");c.geometry.offset=new mxPoint(z,-20);break;case "bpmn_marker_ad_hoc":c=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");c.geometry.offset=new mxPoint(z,-17);break;case "bpmn_marker_compensation":c=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),c.geometry.offset=new mxPoint(z,-18)}c.geometry.relative=!0;c.vertex=!0;g.insert(c);
z+=20}break;case "js:table":y.shape="swimlane;collapsible=0;swimlaneLine=0";B=z["yjs:TableNodeStyle"]||z["demotablestyle:DemoTableStyle"];!B&&z["bpmn:PoolNodeStyle"]&&(B=z["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(B,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",
mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},y);y.swimlaneFillColor=y.fillColor;B=B.table["y:Table"];var d=a=0,f={x:0};z=0;(h=B.Insets)?(h=h.split(","),"0"!=h[0]?(y.startSize=h[0],f.x=parseFloat(h[0]),y.horizontal="0"):"0"!=h[1]&&(y.startSize=h[1],z=parseFloat(h[1]),d+=z)):y.startSize="0";var k={},p={Insets:function(A,C){C.startSize=A.split(",")[0]},
mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(B.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":p},k);c={};b={Insets:function(A,C){C.startSize=A.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",
"y:StripeDefaults":b},c);h=g.geometry;a=B.Rows["y:Row"];d+=parseFloat(c.startSize);var n=f.x,x=f.x;f.lx=f.x;if(a)for(a instanceof Array||(a=[a]),h=0;h<a.length;h++)f.x=x,f.lx=x,d=this.addRow(a[h],g,h&1,d,f,p,k),n=Math.max(f.x,n);B=B.Columns["y:Column"];a=n;if(B)for(B instanceof Array||(B=[B]),h=0;h<B.length;h++)a=this.addColumn(B[h],g,h&1,a,z,b,c);break;case "js:table2":y.shape="swimlane;collapsible=0;swimlaneLine=0";B={};this.mapObject(z,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",
POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},B);y.swimlaneFillColor=y.fillColor;p=c=0;"pool_type_lane_and_column"==B.isHorz||"pool_type_empty"==B.isHorz||"pool_type_lane"==B.isHorz?p=parseFloat(B.tblHWidth):c=parseFloat(B.tblHHeight);
y.startSize=c?c:p;try{a=z["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];b=z["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];d="lane.style.rows"==B.laneStyle||"lane_style_rows"==B.laneStyle;a instanceof Array||(a=[a]);b instanceof Array||(b=[b]);f=parseFloat(B.rowHWidth);for(h=0;h<a.length;h++)a[h]["y:Insets"]&&(f=Math.max(f,parseFloat(a[h]["y:Insets"].left)+parseFloat(a[h]["y:Insets"].right)));k=parseFloat(B.colHHeight);for(h=0;h<b.length;h++)b[h]["y:Insets"]&&(k=Math.max(k,parseFloat(b[h]["y:Insets"].top)+
parseFloat(b[h]["y:Insets"].bottom)));d?(this.addTbl2Rows(g,a,c,p,f,k,d,B),this.addTbl2Cols(g,b,c,p,f,k,d,B)):(this.addTbl2Cols(g,b,c,p,f,k,d,B),this.addTbl2Rows(g,a,c,p,f,k,d,B))}catch(A){}break;case "js:relationship_big_entity":y.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(g=z["y:GenericNode"]["y:Fill"])y.fillColor=g.color2,y.swimlaneFillColor=g.color;break;case "js:relationship_attribute":y.shape="1"==y["double"]?"doubleEllipse":"ellipse"}0<m.indexOf("Shadow")&&(y.shadow=
mxGraphMlCodec.prototype.addTbl2Rows=function(g,y,z,B,m,h,c,a){z+=h;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var p={shape:"swimlane;collapsible=0;horizontal=0",startSize:m,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(p.startSize)&&(p.fillColor="none",p.swimlaneLine="0");if(c){var n=f?a.headerColorAlt:a.headerColor;p.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;p.fillColor=n?n:p.swimlaneFillColor}f=parseFloat(y[d].height);n=b&&0==d?h:0;
k.geometry=new mxGeometry(B,z-n,g.geometry.width-B,f+n);z+=f;k.style=this.styleMap2Str(p);g.insert(k)}};
mxGraphMlCodec.prototype.addTbl2Cols=function(g,y,z,B,m,h,c,a){B=m+B;for(var b=null!=a.isHorz,d=0;d<y.length;d++){var f=d&1,k=new mxCell;k.vertex=!0;var p={shape:"swimlane;collapsible=0",startSize:h,fillColor:a.secColor||"none",swimlaneLine:b?"0":"1"};0==parseFloat(p.startSize)&&(p.fillColor="none");if(!c){var n=f?a.headerColorAlt:a.headerColor;p.swimlaneFillColor=f?a.laneColorAlt:a.laneColor;p.fillColor=n?n:p.swimlaneFillColor}f=parseFloat(y[d].width);n=b&&0==d?m:0;k.geometry=new mxGeometry(B-n,
z,f+n,g.geometry.height-z);B+=f;k.style=this.styleMap2Str(p);g.insert(k)}};
mxGraphMlCodec.prototype.addRow=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.height);a.geometry=new mxGeometry(m.lx,B,y.geometry.width-m.lx,z);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Row"];m.lx=0;b.startSize&&
(m.lx=parseFloat(b.startSize),m.x+=m.lx);y=b=m.x;d=m.lx;var f=0;if(g){g instanceof Array||(g=[g]);for(var k=0;k<g.length;k++)m.x=b,m.lx=d,f=this.addRow(g[k],a,k&1,f,m,h,c),y=Math.max(m.x,y)}m.x=y;z=Math.max(z,f);a.geometry.height=z;return B+=z};
mxGraphMlCodec.prototype.addColumn=function(g,y,z,B,m,h,c){var a=new mxCell;a.vertex=!0;var b=mxUtils.clone(c);this.mapObject(g,h,b);z?(b.oddFill&&(b.fillColor=b.oddFill),b.oddLaneFill&&(b.swimlaneFillColor=b.oddLaneFill)):(b.evenFill&&(b.fillColor=b.evenFill),b.evenLaneFill&&(b.swimlaneFillColor=b.evenLaneFill));z=parseFloat(b.width);a.geometry=new mxGeometry(B,m,z,y.geometry.height-m);var d=g.Labels;d&&this.addLabels(a,d,b);a.style=this.styleMap2Str(b);y.insert(a);g=g["y:Column"];y=0;if(g)for(g instanceof
Array||(g=[g]),b=0;b<g.length;b++)y=this.addColumn(g[b],a,b&1,y,m,h,c);z=Math.max(z,y);a.geometry.width=z;return B+=z};mxGraphMlCodec.prototype.handleFixedRatio=function(g,y){y=y.shape;g=g.geometry;if(y&&g)if(0<y.indexOf(";aspect=fixed"))y=Math.min(g.height,g.width),y==g.height&&(g.x+=(g.width-y)/2),g.height=y,g.width=y;else if(0<y.indexOf(";rotation=90")||0<y.indexOf(";rotation=-90")){y=g.height;var z=g.width;g.height=z;g.width=y;y=(y-z)/2;g.x-=y;g.y+=y}};
mxGraphMlCodec.prototype.addNodeGeo=function(g,y,z,B){var m=y[mxGraphMlConstants.RECT],h=0,c=0,a=30,b=30;m?(h=m[mxGraphMlConstants.X],c=m[mxGraphMlConstants.Y],a=m[mxGraphMlConstants.WIDTH],b=m[mxGraphMlConstants.HEIGHT]):(h=y[mxGraphMlConstants.X_L]||h,c=y[mxGraphMlConstants.Y_L]||c,a=y[mxGraphMlConstants.WIDTH_L]||a,b=y[mxGraphMlConstants.HEIGHT_L]||b);g=g.geometry;g.x=parseFloat(h)-z;g.y=parseFloat(c)-B;g.width=parseFloat(a);g.height=parseFloat(b)};
mxGraphMlCodec.prototype.importEdge=function(g,y,z,B,m){var h=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA),c=g.getAttribute(mxGraphMlConstants.ID),a=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE),b=g.getAttribute(mxGraphMlConstants.EDGE_TARGET),d=g.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);g=g.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];b=this.nodesMap[b];z=y.insertEdge(z,null,"",a.node,b.node,"graphMLId="+c);c={graphMlID:c};for(var f=0;f<h.length;f++){var k=
this.dataElem2Obj(h[f]),p=k["y:PolyLineEdge"]||k["y:GenericEdge"]||k["y:ArcEdge"]||k["y:BezierEdge"]||k["y:QuadCurveEdge"]||k["y:SplineEdge"];k.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(z,k,B,m):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(z,k,c):k.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(z,k,c,y):p&&(this.addEdgeStyle(z,k,c),k=this.addEdgePath(z,p["y:Path"],c,B,m),p["y:EdgeLabel"]&&this.addLabels(z,p["y:EdgeLabel"],
c,y,k),null!=c.shape&&0==c.shape.indexOf("link")&&(c.width=c.strokeWidth,c.strokeWidth=1))}a.ports&&d&&(y=a.ports[d],y.pos&&(c.exitX=y.pos.x,c.exitY=y.pos.y));b.ports&&g&&(y=b.ports[g],y.pos&&(c.entryX=y.pos.x,c.entryY=y.pos.y));z.style=this.styleMap2Str(c);return z};
mxGraphMlCodec.prototype.addEdgeGeo=function(g,y,z,B){if(y=y[mxGraphMlConstants.Y_BEND]){for(var m=[],h=0;h<y.length;h++){var c=y[h][mxGraphMlConstants.LOCATION];c&&(c=c.split(","),m.push(new mxPoint(parseFloat(c[0])-z,parseFloat(c[1])-B)))}g.geometry.points=m}};
mxGraphMlCodec.prototype.addEdgePath=function(g,y,z,B,m){var h=[];if(y){var c=parseFloat(y.sx),a=parseFloat(y.sy),b=parseFloat(y.tx),d=parseFloat(y.ty),f=g.source.geometry;0!=c||0!=a?(z.exitX=(c+f.width/2)/f.width,z.exitY=(a+f.height/2)/f.height,h.push(new mxPoint(f.x+z.exitX*f.width-B,f.y+z.exitY*f.height-m))):h.push(new mxPoint(f.x+f.width/2-B,f.y+f.height/2-m));c=g.target.geometry;0!=b||0!=d?(z.entryX=(b+c.width/2)/c.width,z.entryY=(d+c.height/2)/c.height,z=new mxPoint(c.x+z.entryX*c.width-B,c.y+
z.entryY*c.height-m)):z=new mxPoint(c.x+c.width/2-B,c.y+c.height/2-m);if(y=y["y:Point"]){y instanceof Array||(y=[y]);b=[];for(d=0;d<y.length;d++)c=new mxPoint(parseFloat(y[d].x)-B,parseFloat(y[d].y)-m),b.push(c),h.push(c);g.geometry.points=b}h.push(z)}return h};
mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1;switch(a){case "DashDot":a="3 1 1 1";break;case "Dot":a="1 1";break;case "DashDotDot":a="3 1 1 1 1 1";break;case "Dash":a="3 1";break;default:a=a.replace(/0/g,"1")}a&&(0>a.indexOf(" ")&&(a=a+" "+a),b.dashPattern=a)};var B=function(a,b){b.endFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"1"},m=function(a,b){b.startFill="WHITE"==a||0==a.indexOf("white_")||0==a.indexOf("transparent_")?"0":"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 p=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},n=function(K,P){K&&(K=K.toUpperCase());var R=P.fontStyle||0;switch(K){case "ITALIC":R|=2;break;case "BOLD":R|=1;break;case "UNDERLINE":R|=4}P.fontStyle=R};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,P){K&&(P.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
fontSize:"fontSize",fontStyle:n,fontWeight:n,textDecoration:n}},"Style.y:VoidLabelStyle":function(K,P){P.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:n,underlinedText:function(K,P){var R=P.fontStyle||0;"true"==K&&(R|=4);P.fontStyle=R},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(p))}}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/>");p=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,p.width,p.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"])p=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=p.width,h.height=p.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=p.height,h.height=p.width,h.y=p.height/2-p.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=p.height,h.height=p.width,h.y=p.height/2-p.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=p.height,h.height=p.width,h.y=p.height/2-p.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;p=a[b]["y:FreeEdgeLabelModelParameter"];
d=p.Ratio;n=p.Distance;var x=p.Angle;d&&(h.x=parseFloat(d));n&&(h.y=parseFloat(n));x&&(f.style+=";rotation="+parseFloat(x)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;p=a[b]["y:EdgePathLabelModelParameter"];k=p.SideOfEdge;d=p.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(p=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"]){p=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];x=parseFloat(p.angle);n=parseFloat(p.distance);var A=p.position;d=parseFloat(p.ratio);p=parseFloat(p.segment);var C=
new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var J="left"==A?1:-1;if(-1==p&&6.283185307179586==x)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,J*n);else{-1==p&&(p=0);for(var M=x=0;M<p;M++)x+=C.segments[M];x+=C.segments[p]*d;h.x=x/C.length*2-1;h.y=(("center"==A?0:n)+h.height/2*J*(Math.abs(f)>Math.abs(k)?1:-1))*J}}else isNaN(p)||isNaN(d)||(h.offset=new mxPoint(p+f/2+(0<f?-h.width:h.width),d));else h.x=p||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,
y){return"string"===typeof g&&17<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):g},"orgchartconverters.overviewconverter":function(g,y){return"string"===typeof g&&0<g.length?g.replace(/^(.)(\S*)(.*)/,"$1.$3"):""}},mxGraphMlArrowsMap={SIMPLE:"open",TRIANGLE:"block",DIAMOND:"diamond",CIRCLE:"oval",CROSS:"cross",SHORT:"classicThin",DEFAULT:"classic",NONE:"none",none:"none",white_delta_bar:"block",delta:"block",standard:"classic",diamond:"diamond",white_diamond:"diamond",white_delta:"block",plain:"open",
EditorUi.prototype.doImportGraphML=function(g,y,z){(new mxGraphMlCodec).decode(g,y,z)};/*!
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.3",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b,c){b=null!=b?b:!1;var d=null;if(null!=a)for(var e=0;e<a.length;e++)if(b||this.model.isVertex(a[e])){var f=this.getCellGeometry(a[e]);if(null!=f){var g=null;if(this.model.isEdge(a[e])){g=function(m){null!=m&&(null==k?k=new mxRectangle(m.x,m.y,0,0):k.add(new mxRectangle(m.x,m.y,0,0)))};null==this.model.getTerminal(a[e],!0)&&g(f.getTerminalPoint(!0));null==this.model.getTerminal(a[e],!1)&&g(f.getTerminalPoint(!1));f=f.points;if(null!=f&&0<f.length)for(var k=
new mxRectangle(f[0].x,f[0].y,0,0),l=1;l<f.length;l++)g(f[l]);g=k}else l=this.model.getParent(a[e]),f.relative?this.model.isVertex(l)&&l!=this.view.currentRoot&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g=new mxRectangle(f.x*k.width,f.y*k.height,f.width,f.height),0<=mxUtils.indexOf(null!=c?c:a,l)&&(g.x+=k.x,g.y+=k.y))):(g=mxRectangle.fromRectangle(f),this.model.isVertex(l)&&0<=mxUtils.indexOf(null!=c?c:a,l)&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g.x+=
k.x,g.y+=k.y))),null!=g&&null!=f.offset&&(g.x+=f.offset.x,g.y+=f.offset.y),f=this.getCurrentCellStyle(a[e]),null!=g&&(f=mxUtils.getValue(f,mxConstants.STYLE_ROTATION,0),0!=f&&(g=mxUtils.getBoundingBox(g,f)));null!=g&&(null==d?d=mxRectangle.fromRectangle(g):d.add(g))}}return d};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};
mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();a=b.getEvent();var c=mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)&&!this.graph.isSelectionEmpty();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null!=b.getState()||c)&&!mxEvent.isMultiTouchEvent(a)){var d=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(d,b);this.cell=null;null==d&&c&&(d=this.graph.getSelectionCell());this.isSelectEnabled()&&!this.delayedSelection&&
this.graph.selectCellForEvent(d,a);this.isMoveEnabled()&&(this.delayedSelection?this.cell=d:this.start(d,b.getX(),b.getY()),this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b))}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
function Dialog(b,e,g,n,y,q,E,K,S,G,M){this.editorUi=b;var R=S?57:0,V=g,d=n,f=S?0:64,l=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(l.height=window.innerHeight);var u=l.height;l=Math.max(1,Math.round((l.width-g-f)/2));var A=Math.max(1,Math.round((u-n-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-f):g;n=Math.min(n,u-f);0<b.dialogs.length&&
q.className="geDialogClose",q.style.top=A+14+"px",q.style.left=l+g+38-R+"px",q.style.zIndex=this.zIndex,mxEvent.addListener(q,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(q),this.dialogImg=q,!M)){var L=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(O){L=!0}),null,mxUtils.bind(this,function(O){L&&(b.hideDialog(!0),L=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var O=G();null!=O&&(V=g=O.w,d=n=O.h)}O=Editor.inlineFullscreen||
var ErrorDialog=function(b,e,g,n,y,q,E,K,S,G,M){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var V=document.createElement("div");V.style.padding="0px";V.style.margin="0px";V.style.fontSize="18px";V.style.paddingBottom="16px";V.style.marginBottom="10px";V.style.borderBottom="1px solid #c0c0c0";V.style.color="gray";V.style.whiteSpace="nowrap";V.style.textOverflow="ellipsis";V.style.overflow="hidden";mxUtils.write(V,e);V.setAttribute("title",e);R.appendChild(V)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=g;R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=M&&M()}),G.className="geBtn",g.appendChild(G));var d=mxUtils.button(n,
PrintDialog.prototype.create=function(b){function e(d){var f=E.checked||G.checked,l=parseInt(R.value)/100;isNaN(l)&&(l=1,R.value="100%");mxClient.IS_SF&&(l*=.75);var u=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,A=1/g.pageScale;if(f){var B=E.checked?1:parseInt(M.value);isNaN(B)||(A=mxUtils.getScaleForPageCount(B,g,u))}var F=B=0;u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*l);u.height=Math.ceil(u.height*l);A*=l;!f&&g.pageVisible?(l=g.getPageLayout(),B-=l.x*u.width,F-=l.y*u.height):
"click",function(d){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(d)});q.appendChild(K);var M=document.createElement("input");M.setAttribute("value","1");M.setAttribute("type","number");M.setAttribute("min","1");M.setAttribute("size","4");M.setAttribute("disabled","disabled");M.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(M);mxUtils.write(K," "+mxResources.get("pages")+" (max)");q.appendChild(K);y.appendChild(q);mxEvent.addListener(G,"change",
function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");E.checked=!G.checked});q=q.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");q.appendChild(K);K=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";K.appendChild(R);q.appendChild(K);y.appendChild(q);q=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
var PageSetupDialog=function(b){function e(){var l=R;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(M.style.backgroundImage="url("+l.src+")",M.style.display="inline-block"):(M.style.backgroundImage="",M.style.display="none");M.style.backgroundColor="";null!=V&&V!=mxConstants.NONE&&(M.style.backgroundColor=V,M.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var y=document.createElement("tbody");
q.appendChild(E);E=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var M=document.createElement("div");M.style.display="inline-block";M.style.verticalAlign="middle";M.style.backgroundPosition="center center";M.style.backgroundRepeat="no-repeat";M.style.backgroundSize="contain";M.style.border="1px solid lightGray";M.style.borderRadius="4px";M.style.marginRight="14px";M.style.height="32px";
M.style.width="64px";M.style.cursor="pointer";M.style.padding="4px";var R=g.backgroundImage,V=g.background,d=g.shadowVisible,f=function(l){b.showBackgroundImageDialog(function(u,A,B,F){A||(null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src}),R=u,d=F);V=B;e()},R,V,!0);mxEvent.consume(l)};mxEvent.addListener(G,"click",f);mxEvent.addListener(M,"click",f);e();E.appendChild(M);E.appendChild(G);q.appendChild(E);y.appendChild(q);q=document.createElement("tr");E=document.createElement("td");
ja.format.width&&g.height==ja.format.height?(K.value=ja.key,q.setAttribute("checked","checked"),q.defaultChecked=!0,q.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,O=!0):g.width==ja.format.height&&g.height==ja.format.width&&(K.value=ja.key,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,O=E.checked=!0));O?(S.style.display="",M.style.display="none"):(R.value=g.width/100,V.value=g.height/100,q.setAttribute("checked",
"checked"),K.value="custom",S.style.display="none",M.style.display="")}}e="format-"+e;var q=document.createElement("input");q.setAttribute("name",e);q.setAttribute("type","radio");q.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.width=
"206px";var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";q.style.marginRight="6px";S.appendChild(q);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));S.appendChild(G);var M=document.createElement("div");
M.style.marginLeft="4px";M.style.width="210px";M.style.height="24px";var R=document.createElement("input");R.setAttribute("size","7");R.style.textAlign="right";M.appendChild(R);mxUtils.write(M," in x ");var V=document.createElement("input");V.setAttribute("size","7");V.style.textAlign="right";M.appendChild(V);mxUtils.write(M," in");S.style.display="none";M.style.display="none";for(var d={},f=PageSetupDialog.getFormats(),l=0;l<f.length;l++){var u=f[l];d[u.key]=u;var A=document.createElement("option");
A.setAttribute("value",u.key);mxUtils.write(A,u.title);K.appendChild(A)}var B=!1;y();b.appendChild(K);mxUtils.br(b);b.appendChild(S);b.appendChild(M);var F=g,L=function(O,H){O=d[K.value];null!=O.format?(R.value=O.format.width/100,V.value=O.format.height/100,M.style.display="none",S.style.display=""):(S.style.display="none",M.style.display="");O=parseFloat(R.value);if(isNaN(O)||0>=O)R.value=g.width/100;O=parseFloat(V.value);if(isNaN(O)||0>=O)V.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100*
parseFloat(R.value)),Math.floor(100*parseFloat(V.value)));"custom"!=K.value&&E.checked&&(O=new mxRectangle(0,0,O.height,O.width));H&&B||O.width==F.width&&O.height==F.height||(F=O,null!=n&&n(F))};mxEvent.addListener(e,"click",function(O){q.checked=!0;L(O);mxEvent.consume(O)});mxEvent.addListener(G,"click",function(O){E.checked=!0;L(O);mxEvent.consume(O)});mxEvent.addListener(R,"blur",L);mxEvent.addListener(R,"click",L);mxEvent.addListener(V,"blur",L);mxEvent.addListener(V,"click",L);mxEvent.addListener(E,
"change",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(K,"change",function(O){B="custom"==K.value;L(O,!0)});L();return{set:function(O){g=O;y(null,null,!0)},get:function(){return F},widthInput:R,heightInput:V}};
var FilenameDialog=function(b,e,g,n,y,q,E,K,S,G,M,R,V){S=null!=S?S:!0;var d=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),u=document.createElement("td");d.style.margin="0 auto";u.style.textOverflow="ellipsis";u.style.whiteSpace="nowrap";u.style.textAlign="right";u.style.maxWidth=(V?V+15:100)+"px";u.style.fontSize="10pt";u.style.width=(V?V:84)+"px";mxUtils.write(u,(y||mxResources.get("filename"))+":");l.appendChild(u);var A=document.createElement("input");
A.setAttribute("value",e||"");A.style.marginLeft="4px";A.style.width=null!=R?R+"px":"180px";var B=mxUtils.button(g,function(){if(null==q||q(A.value))S&&b.hideDialog(),n(A.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=y||null==E)if(null!=M?Editor.selectFilename(A):(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var F=d.parentNode;if(null!=F){var L=null;mxEvent.addListener(F,"dragleave",
function(O){null!=L&&(L.style.backgroundColor="",L=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=A,L.style.backgroundColor="#ebf2f9");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(O.dataTransfer.getData("text/uri-list")),
B.click());O.stopPropagation();O.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(A);l.appendChild(u);if(null!=y||null==E)f.appendChild(l),null!=M&&(u.appendChild(FilenameDialog.createTypeHint(b,A,M)),null!=b.editor.diagramFileTypes&&(l=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+
2;u.style.paddingTop=null!=M?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});R.className="geBtn";null!=K&&(e=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),e.className="geBtn",u.appendChild(e));b.editor.cancelFirst&&u.appendChild(R);mxEvent.addListener(A,"keypress",function(F){13==F.keyCode&&B.click()});u.appendChild(B);b.editor.cancelFirst||u.appendChild(R);
mxGraphView.prototype.validateBackgroundStyles=function(E,K,S){var G=this.graph;E=null!=E?E:1;var M=null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background,R=null!=M&&this.gridColor!=M.toLowerCase()?this.gridColor:"#ffffff",V="none",d="";if(G.isGridEnabled()||G.gridVisible){d=10;mxClient.IS_SVG?(V=unescape(encodeURIComponent(this.createSvgGrid(R,E))),V=window.btoa?btoa(V):Base64.encode(V,!0),V="url(data:image/svg+xml;base64,"+V+")",d=G.gridSize*this.scale*this.gridSteps*
null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=d,G.view.backgroundPageShape.node.style.backgroundImage=V,G.view.backgroundPageShape.node.style.backgroundColor=M,G.view.backgroundPageShape.node.style.borderColor=G.defaultPageBorderColor,G.container.classList.add("geDiagramBackdrop"),E.style.backgroundImage="none",E.style.backgroundColor="",G.container.style.backgroundColor=R?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),
E.style.backgroundPosition=d,E.style.backgroundImage=V,!R||null!=G.background&&G.background!=mxConstants.NONE?E.style.backgroundColor=M:(E.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E,K){for(K=this.graph.gridSize*this.scale*(null!=K?K:1);K<this.minGridSize;)K*=2;for(var S=this.gridSteps*K,G=[],M=1;M<this.gridSteps;M++){var R=M*K;G.push("M 0 "+R+" L "+S+" "+R+" M "+R+" 0 L "+R+" "+S)}return'<svg width="'+S+'" height="'+
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+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+K,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.view.scale,M=this.view.translate,R=this.pageFormat,V=G*this.pageScale,d=this.view.getBackgroundPageBounds();K=d.width;S=d.height;var f=new mxRectangle(G*
M.x,G*M.y,R.width*V,R.height*V),l=(E=E&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,u=E?Math.ceil(K/f.width)-1:0,A=d.x+K,B=d.y+S;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(F){if(null!=F){for(var L=F==this.horizontalPageBreaks?l:u,O=0;O<=L;O++){var H=F==this.horizontalPageBreaks?[new mxPoint(Math.round(d.x),Math.round(d.y+(O+1)*f.height)),new mxPoint(Math.round(A),
Math.round(d.y+(O+1)*f.height))]:[new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(d.y)),new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(B))];null!=F[O]?(F[O].points=H,F[O].redraw()):(H=new mxPolyline(H,this.pageBreakColor),H.dialect=this.dialect,H.isDashed=this.pageBreakDashed,H.pointerEvents=!1,H.init(this.view.backgroundPane),H.redraw(),F[O]=H)}for(O=L;O<F.length;O++)null!=F[O]&&F[O].destroy();F.splice(L,F.length-L)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,S){for(var G=0;G<K.length;G++){if(this.graph.isTableCell(K[G])||this.graph.isTableRow(K[G]))return!1;if(this.graph.getModel().isVertex(K[G])){var M=this.graph.getCellGeometry(K[G]);if(null!=M&&M.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,S){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,M=this.graph.pageScale,R=G.width*M;G=G.height*M;M=Math.floor(Math.min(0,K)/R);var V=Math.floor(Math.min(0,
S)/G);return new mxRectangle(this.scale*(this.translate.x+M*R),this.scale*(this.translate.y+V*G),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/R)-M)*R,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/G)-V)*G)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,S,G,M,R){var V=y.apply(this,arguments);null==R||R||mxEvent.addListener(V,"mousedown",function(d){mxEvent.consume(d)});return V};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,K,S){var G=this.graph.model.getParent(E);if(K){var M=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);
M=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=M&&M.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(M=q.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))M=G,this.graph.isTable(M)||(M=this.graph.model.getParent(M)),M=!this.graph.selectionCellsHandler.isHandled(M)||this.graph.isCellSelected(M)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&
this.graph.isCellSelected(G);return M};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),S=K.getParent(E),G=this.graph.view.getState(S),M=this.graph.isCellSelected(E);null!=G&&(K.isVertex(S)||K.isEdge(S));){var R=this.graph.isCellSelected(S);M=M||R;if(R||!M&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=K.getParent(S)}return E}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this,y=this.editor.graph;y.lightbox=g;var q=y.getGraphBounds;y.getGraphBounds=function(){var P=q.apply(this,arguments),U=this.backgroundImage;if(null!=U&&null!=U.width&&null!=U.height){var k=this.view.translate,z=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((k.x+U.x)*z,(k.y+U.y)*z,U.width*z,U.height*z))}return P};y.useCssTransforms&&(this.lazyZoomDelay=
S="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),G=!1,M=!1;this.setDefaultStyle=function(P){try{y.getModel().isEdge(P)?M=!1:G=!1;var U=y.getCellStyle(P,!1),k=[],z=[],J;for(J in U)k.push(U[J]),z.push(J);y.getModel().isEdge(P)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",z,"values",k,"cells",[P],"force",!0));y.getModel().isEdge(P)?M=!0:G=!0}catch(W){this.handleError(W)}};
this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);G=M=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var R=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<R.length;e++)0>mxUtils.indexOf(E,R[e])&&E.push(R[e]);var V="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize",
var F=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(P){return F.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var L=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return n.isSpaceDown()||L.apply(this,arguments)};var O=!1,H=null,ja=null,da=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&O!=y.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,
window.setTimeout(function(){null!=n.hoverIcons&&n.hoverIcons.update(y.view.getState(k[k.length-1]))},0));f(k)});this.addListener("styleChanged",mxUtils.bind(this,function(P,U){P=U.getProperty("force");if(this.updateDefaultStyle||P){var k=U.getProperty("cells"),z=P=!1;if(0<k.length)for(var J=0;J<k.length&&(P=y.getModel().isVertex(k[J])||P,!(z=y.getModel().isEdge(k[J])||z)||!P);J++);else z=P=!0;P=P&&!G;z=z&&!M;k=U.getProperty("keys");U=U.getProperty("values");for(J=0;J<k.length;J++){var W=0<=mxUtils.indexOf(R,
EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,n=g.getParent(e[0]),y=g.getParent(n);if(null!=n&&null!=y){for(var q=n.getIndex(e[0]),E=y.getIndex(n),K=null,S=1,G=1,M=0,R=E<y.getChildCount()-1?g.getChildAt(g.getChildAt(y,E+1),q):null;M<e.length-1;){var V=e[++M];null==R||R!=V||null!=K&&S!=K||(K=S,S=0,G++,n=g.getParent(R),R=E+G<y.getChildCount()?g.getChildAt(g.getChildAt(y,E+G),q):null);var d=this.editor.graph.view.getState(V);
if(V==g.getChildAt(n,q+S)&&null!=d&&1==mxUtils.getValue(d.style,"colspan",1)&&1==mxUtils.getValue(d.style,"rowspan",1))S++;else break}M==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};
{willReadFrequently:!0});y.filter="invert(100%) hue-rotate(180deg) saturate(1.3)";g.model.beginUpdate();try{for(var q=0;q<b.length;q++)if(g.model.isEdge(b[q])||g.model.isVertex(b[q])){var E=g.getCurrentCellStyle(b[q]);if(null!=E)for(var K=0;K<e.length;K++)try{var S=E[e[K]];if(null!=S&&"#"==S.charAt(0)){var G=n[S];if(null==G){y.fillStyle=S;y.fillRect(0,0,1,1);var M=y.getImageData(0,0,1,1);G="#"+(16777216|M.data[2]|M.data[1]<<8|M.data[0]<<16).toString(16).substring(1);n[S]=G}g.setCellStyles(e[K],G,
function(){return n.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var y=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(M.x,M.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
g);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();q.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,M){var R=M.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?E.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(V,d,f){var l=b.getCompositeParent(S.cell);V=b.getCellGeometry(l);for(M.consume();null!=l&&b.model.isVertex(l)&&null!=V&&V.relative;)cell=
l,l=b.model.getParent(cell),V=b.getCellGeometry(l);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(M.getGraphX(),M.getGraphY(),l,mxUtils.bind(this,function(u){f(u);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(u))}),G)}),30)}),mxUtils.bind(this,function(V){this.graph.selectCellsForConnectVertex(V,R,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var M=
G.getProperty("arrow"),R=G.getProperty("direction"),V=G.getProperty("event");M=M.getBoundingClientRect();var d=mxUtils.getOffset(b.container),f=b.container.scrollLeft+M.x-d.x;d=b.container.scrollTop+M.y-d.y;var l=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),u=e.showShapePicker(f,d,l,mxUtils.bind(this,function(A){null!=A&&b.connectVertex(l,R,b.defaultEdgeLength,V,!0,!1,function(B,F,L){L(A);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(A))},
function(B){b.selectCellsForConnectVertex(B)},V,this.hoverIcons)}),R,!0);this.centerShapePicker(u,M,f,d,R);mxUtils.setOpacity(u,30);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K)}))}};
EditorUi.prototype.createShapePicker=function(b,e,g,n,y,q,E,K,S,G,M){M=null!=M?M:!0;var R=this.editor.graph,V=null;S=null!=S?S:function(l){l=l[0];var u=0,A=0,B=l.geometry;null!=B&&(R.model.isEdge(l)&&(l=B.getTerminalPoint(!1),B=new mxRectangle(0,0,l.x,l.y)),u=B.width/2,A=B.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-u),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-A))};if(null!=E&&0<E.length){var d=this;R=this.editor.graph;V=document.createElement("div");
0,A.x,A.y));null!=A&&u.appendChild(this.sidebar.createVertexTemplateFromCells([l],A.width,A.height,"",!0,!1,null,!1,mxUtils.bind(this,function(B){if(!mxEvent.isShiftDown(B)||null==g&&R.isSelectionEmpty()){var F=R.cloneCell(l);if(null!=n)n(F);else{var L=S([F]);R.model.isEdge(F)?F.geometry.translate(L.x,L.y):(F.geometry.x=L.x,F.geometry.y=L.y);R.model.beginUpdate();try{R.addCell(F),R.model.isVertex(F)&&R.isAutoSizeCell(F)&&R.updateCellSize(F)}finally{R.model.endUpdate()}R.setSelectionCell(F);R.scrollCellToVisible(F);
M&&R.startEditing(F);null!=d.hoverIcons&&d.hoverIcons.update(R.view.getState(F))}}else F=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(l,F);null!=q&&q(B);mxEvent.consume(B)}),25,25,null,null,g))});for(G=0;G<(K?Math.min(E.length,4):E.length);G++)y(E[G]);E=V.offsetTop+V.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<E&&(V.style.top=Math.max(R.container.scrollTop+22,e-E)+"px");E=V.offsetLeft+V.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<E&&(V.style.left=
EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var E=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||q.getSelectionCells();E=q.getExportableCells(q.model.getTopmostCells(E));for(var K={},S=q.createCellLookup(E),G=q.cloneCells(E,null,K),M=new mxGraphModel,R=M.getChildAt(M.getRoot(),
0),V=0;V<G.length;V++){M.add(R,G[V]);var d=q.view.getState(E[V]);if(null!=d){var f=q.getCellGeometry(G[V]);null!=f&&f.relative&&!M.isEdge(E[V])&&null==S[mxObjectIdentity.get(M.getParent(E[V]))]&&(f.offset=null,f.relative=!1,f.x=d.x/d.view.scale-d.view.translate.x,f.y=d.y/d.view.scale-d.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(K,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(q){var E=
"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var M=q(mxUtils.bind(this,function(z){this.actions.get("nextPage").funct();mxEvent.consume(z)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";M.style.paddingLeft="4px";M.style.paddingRight=
"0px";var V=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(M.style.display="",S.style.display="",G.style.display="inline-block"):(M.style.display="none",S.style.display="none",G.style.display="none");R()});this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",R)}q(mxUtils.bind(this,function(z){this.actions.get("zoomOut").funct();mxEvent.consume(z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(V=0;V<this.lightboxToolbarActions.length;V++){var F=this.lightboxToolbarActions[V];F.elem=q(F.fn,F.icon,F.tooltip)}if(null!=y.refreshBtn){var L=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);
q(mxUtils.bind(this,function(z){null!=L?window.location.href=L:window.location.reload();mxEvent.consume(z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(z){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&
e.cells.length);this.actions.get("group").setEnabled(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0]));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&
(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("copyData").setEnabled(1==e.cells.length);this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("editStyle").setEnabled(1==e.cells.length);this.actions.get("editTooltip").setEnabled(1==
EditorUi.prototype.addSplitHandler=function(b,e,g,n){function y(R){if(null!=E){var V=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));n(Math.max(0,K+(e?V.x-E.x:E.y-V.y)-g));mxEvent.consume(R);K!=M()&&(S=!0,G=null)}}function q(R){y(R);E=K=null}var E=null,K=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var M=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){E=new mxPoint(mxEvent.getClientX(R),
mxEvent.getClientY(R));K=M();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var V=null!=G?G-g:0;G=M();n(V);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
EditorUi.prototype.showError=function(b,e,g,n,y,q,E,K,S,G,M,R,V){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),n,y,q,E,R,K,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,M||100+20*e,!0,!1,V);b.init()};EditorUi.prototype.showDialog=function(b,e,g,n,y,q,E,K,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,n,y,q,E,K,S,G);this.dialogs.push(this.dialog)};
0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(M){}try{var S=q.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(M){}}catch(M){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(y){b(null)})}))["catch"](function(n){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(n){n.text().then(function(y){b(y)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
f=0,37==R?f=-V:38==R?l=-V:39==R?f=V:40==R&&(l=V),B.currentDx+=f*A,B.currentDy+=l*A,B.checkPreview(),B.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=B.first){var F=B.roundLength(B.currentDx/A),L=B.roundLength(B.currentDy/A);B.moveCells(B.cells,F,L);B.reset()}},400))}}}}var g=this,n=this.editor.graph,y=new mxKeyHandler(n),q=y.isEventIgnored;y.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||
mxEvent.isShiftDown(R)?n.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?n.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(R,V,d,f){var l=this.actions.get(d);null!=l&&(d=function(){l.isEnabled()&&l.funct.apply(this,arguments)},V?f?y.bindControlShiftKey(R,d):y.bindControlKey(R,d):f?y.bindShiftKey(R,d):y.bindKey(R,d))});var G=this,M=y.escape;y.escape=function(R){M.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){n.exitGroup()});
!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,"paste"),y.bindAction(71,
!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,!0,"subscript"),
y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){n.isEnabled()&&n.startEditingAtCell()});return y};
arguments[2])}var K=Number(y.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),g);for(var S=e(this)?Object(new this(K)):Array(K),G=0,M;G<K;)M=y[G],S[G]=q?"undefined"===typeof E?q(M,G):q.call(E,M,G):M,G+=1;S.length=K;return S}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
return null!=X?"1"==X.html||"wrap"==X[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var E=null,K=null,S=null,G=null,M=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(X,P){if("mouseDown"==P.getProperty("eventName")&&this.isEnabled()){X=P.getProperty("event");var U=X.getState();P=this.view.scale;if(!mxEvent.isAltDown(X.getEvent())&&null!=U&&(R=this.isCellSelected(U.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(X.getEvent()))){var k=this.selectionCellsHandler.getHandler(U.cell);
this.isEnabled()){X=P.getProperty("event");var U=X.getState();mxEvent.isAltDown(X.getEvent())||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P)||R||null==U||!this.model.isEdge(U.cell)||(E=new mxPoint(X.getGraphX(),X.getGraphY()),M=this.isCellSelected(U.cell),S=U,K=X,null!=U.text&&null!=U.text.boundingBox&&mxUtils.contains(U.text.boundingBox,X.getGraphX(),X.getGraphY())?G=mxEvent.LABEL_HANDLE:(P=this.selectionCellsHandler.getHandler(U.cell),null!=P&&null!=P.bends&&0<P.bends.length&&(G=P.getHandleForEvent(X))))}}));
if(null!=z&&null!=z.bends&&0<z.bends.length){z.redrawHandles();var J=null!=G?G:z.getHandleForEvent(K),W=this.view.getEdgeStyle(U),T=W==mxEdgeStyle.EntityRelation;k=U.absolutePoints;M||(J=G);J!=mxEvent.LABEL_HANDLE&&null!=k&&(J=G,null==J&&(X=new mxRectangle(E.x,E.y),X.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(X,k[0].x,k[0].y)?J=0:mxUtils.contains(X,k[k.length-1].x,k[k.length-1].y)?J=z.bends.length-1:null!=k&&(null==W&&null==J||W==mxEdgeStyle.SegmentConnector||W==mxEdgeStyle.OrthConnector)&&
this.isCellSelected(U.cell)||(this.selectionCellsHandler.handlers.put(U.cell,z),this.selectCellForEvent(U.cell,P.getEvent())):this.isCellSelected(U.cell)||z.destroy());M=!1;E=K=S=G=null}}else if(U=P.getState(),null!=U&&this.isCellEditable(U.cell)){z=null;if(this.model.isEdge(U.cell)&&!this.isCellSelected(U.cell)&&!mxEvent.isAltDown(P.getEvent())&&!mxEvent.isControlDown(P.getEvent())&&!mxEvent.isShiftDown(P.getEvent())){if(X=new mxRectangle(P.getGraphX(),P.getGraphY()),X.grow(mxEdgeHandler.prototype.handleImage.width/
this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(X){return mxEvent.isShiftDown(X.getEvent())&&mxEvent.isAltDown(X.getEvent())?!1:null!=this.currentState&&X.getState()==this.currentState&&2E3<A||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&F.apply(this,arguments)};var L=this.isToggleEvent;this.isToggleEvent=function(X){return L.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(X)};var O=
1;var E=q[0].getAttribute("width"),K=q[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var S=q[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(K)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/E,n=parseFloat(G[3])/K)}var M=q[0].getBBox();0<M.width&&0<M.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",M.x+" "+M.y+" "+M.width+" "+M.height),g.getElementsByTagName("svg")[0].setAttribute("width",
M.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",M.height/n))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(q[0]))}}}catch(R){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=g.view.graph.tolerance,q=!0,E=null,K=mxUtils.bind(this,function(M){q=!0;E=new mxPoint(mxEvent.getClientX(M),mxEvent.getClientY(M))}),S=mxUtils.bind(this,function(M){q=q&&null!=E&&Math.abs(E.x-mxEvent.getClientX(M))<y&&Math.abs(E.y-mxEvent.getClientY(M))<y}),G=mxUtils.bind(this,function(M){if(q)for(var R=mxEvent.getSource(M);null!=
R&&R!=n.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,M);break}R=R.parentNode}});mxEvent.addGestureListeners(n.node,K,S,G);mxEvent.addListener(n.node,"click",function(M){mxEvent.consume(M)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var n=mxEvent.getSource(g);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
E?E:!0;K=null!=K?K:!0;var S=this.model;return S.filterDescendants(function(G){return E&&S.isVertex(G)||K&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(E,K,S){E=this.getCellStyle(E).newEdgeStyle;if(null!=E){this.model.beginUpdate();try{var G=JSON.parse(E),M;for(M in G)this.setCellStyles(M,G[M],K),"edgeStyle"==M&&"elbowEdgeStyle"==G[M]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",K)}finally{this.model.endUpdate()}}};
Graph.prototype.getCommonStyle=function(E){for(var K={},S=0;S<E.length;S++){var G=this.view.getState(E[S]);null!=G&&this.mergeStyle(G.style,K,0==S)}return K};Graph.prototype.mergeStyle=function(E,K,S){if(null!=E){var G={},M;for(M in E){var R=E[M];null!=R&&(G[M]=!0,null==K[M]&&S?K[M]=R:K[M]!=R&&delete K[M])}for(M in K)G[M]||delete K[M]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||
function(E,K,S,G){null!=E&&(G||(S=null!=S?S:Graph.pasteStyles,Graph.removeKeys(E,function(M){return 0>mxUtils.indexOf(S,M)})),this.updateCellStyles(E,K))};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var S=0;S<K.length;S++)if(this.model.isVertex(K[S])||this.model.isEdge(K[S])){var G=this.getCellStyle(K[S],!1),M=G[mxConstants.STYLE_PERIMETER],R=!1;for(d in E){var V=E[d];if(G[d]!=V){if(d==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[d]&&"umlLifeline"!=V){R=!0;var d="participant"}this.setCellStyles(d,
V,[K[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,M,[K[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(E,K,S,G,M,R){this.useCssTransforms&&
(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,S,G,M,R){G=null!=G?G:!0;M=null!=M?M:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var V=this.model.getChildCount(S)-1;0<=V;V--){var d=this.model.getChildAt(S,V),f=this.getScaledCellAt(E,K,d,G,M,R);if(null!=f)return f;if(this.isCellVisible(d)&&(M&&this.model.isEdge(d)||
K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K=new mxDictionary,S=[],G=0;G<E.length;G++){var M=this.getCompositeParent(E[G]);this.isTableCell(M)&&(M=this.graph.model.getParent(M));this.isTableRow(M)&&(M=this.graph.model.getParent(M));null==M||K.get(M)||(K.put(M,!0),S.push(M))}return S};Graph.prototype.getReferenceTerminal=
this.graph.currentTranslate);y.apply(this,arguments);E&&(this.scale=K,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.useCssTransforms,M=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);G&&(this.view.scale=M,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),n=b.segments,y=b.length,q=g.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var S=[g[0]];K=E/K;e||(K=1-K);for(var G=y*K,M=1;M<q;M++)if(G<=n[M-1]){S.push(new mxPoint(g[M-1].x+(g[M].x-g[M-1].x)*G/n[M-1],g[M-1].y+(g[M].y-g[M-1].y)*G/n[M-1]));break}else G-=n[M-1],S.push(g[M]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var K=g?"getUTC":"get",S=b[K+"Date"](),G=b[K+"Day"](),M=b[K+"Month"](),R=b[K+"FullYear"](),V=b[K+"Hours"](),d=b[K+"Minutes"](),f=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var l=g?0:b.getTimezoneOffset(),u={d:S,dd:E(S),ddd:n.i18n.dayNames[G],dddd:n.i18n.dayNames[G+7],m:M+1,mm:E(M+1),mmm:n.i18n.monthNames[M],mmmm:n.i18n.monthNames[M+
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var n=this.getModel(),y=n.getChildCount(n.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function K(){n.isVisible(E)?(M.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(M.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[S]));var M=document.createElement("img");M.setAttribute("draggable","false");M.setAttribute("align","absmiddle");M.setAttribute("border","0");M.style.position="relative";M.style.width="16px";M.style.padding="0px 6px 0 4px";e&&(M.style.filter="invert(100%)",M.style.top="-2px");G.appendChild(M);mxUtils.write(G,S);g.appendChild(G);
Graph.prototype.connectVertex=function(b,e,g,n,y,q,E,K){q=q?q:!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),M=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(M.x+=G.geometry.width/2,M.y-=g):e==
mxConstants.DIRECTION_SOUTH?(M.x+=G.geometry.width/2,M.y+=G.geometry.height+g):(M.x=e==mxConstants.DIRECTION_WEST?M.x-g:M.x+(G.geometry.width+g),M.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var V=this.view.translate;G=V.x*g;V=V.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,V=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(M.x+=b.parent.geometry.x,M.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(G+M.x*g,V+M.y*g)).grow(40*g);q=null!=q?
!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||y;A&&("1"!=urlParams.sketch||y)&&(e==mxConstants.DIRECTION_NORTH?M.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?M.y+=b.geometry.height/2:M.x=e==mxConstants.DIRECTION_WEST?M.x-b.geometry.width/2:M.x+b.geometry.width/2);var B=[],F=f;f=d;y=mxUtils.bind(this,function(L){if(null==E||null!=L||null==f&&S){this.model.beginUpdate();try{if(null==F&&A){var O=this.getAbsoluteParent(null!=L?L:b);O=S?b:this.getCompositeParent(O);F=null!=L?L:this.duplicateCells([O],
!1)[0];null!=L&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var H=this.getCellGeometry(F);null!=H&&(null!=L&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?M.y-=H.height/2:e==mxConstants.DIRECTION_SOUTH?M.y+=H.height/2:M.x=e==mxConstants.DIRECTION_WEST?M.x-H.width/2:M.x+H.width/2),H.x=M.x-H.width/2,H.y=M.y-H.height/2);null!=d?(this.addCells([F],d,null,null,null,!0),f=null):A&&!S&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var ja=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&A||null==f&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());null!=ja&&(B.push(ja),this.applyNewEdgeStyle(b,[ja],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ja,b));if(null==f&&null!=F&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var da=b.parent.getIndex(b);this.model.add(b.parent,F,da)}null==f&&null!=F&&B.push(F);null==F&&null!=ja&&ja.geometry.setTerminalPoint(M,!1);null!=ja&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[ja]))}finally{this.model.endUpdate()}}if(null!=K)K(B);else return B});if(null==E||null!=F||!A||null==f&&S)return y(F);E(G+M.x*g,V+M.y*g,y)};
Graph.prototype.foldCells=function(b,e,g,n,y){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<g.length;q++){var E=this.view.getState(g[q]),K=this.getCellGeometry(g[q]);if(null!=E&&null!=K){var S=0,G=0;if(K.alternateBounds)S=K.width-K.alternateBounds.width,G=K.height-K.alternateBounds.height;else{var M=this.useCssTransforms?1:this.view.scale;
S=Math.round(K.width-E.width/M);G=Math.round(K.height-E.height/M)}if(0!=G||0!=S){var R=this.model.getParent(g[q]),V=this.layoutManager.getLayout(R);null==V?null!=y&&this.isMoveCellsEvent(y,E)&&this.moveSiblings(E,R,S,G):null!=y&&mxEvent.isAltDown(y)||V.constructor!=mxStackLayout||V.resizeLast||this.resizeParentStacks(R,V,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,S,G){if(null!=g){var M=new mxRectangle(S,G,K.clientWidth,K.clientHeight);mxUtils.intersects(M,g)&&(K==this.arrowUp?G-=M.y+M.height-g.y:K==this.arrowRight?S+=g.x+g.width-M.x:K==this.arrowDown?G+=g.y+g.height-M.y:K==this.arrowLeft&&(S-=M.x+M.width-g.x))}K.style.left=S+"px";K.style.top=G+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
Graph.prototype.visitTableCells=function(b,e){var g=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<n.length;y++){for(var q=this.getActualStartSize(n[y],!0),E=this.model.getChildCells(n[y],!0),K=this.getCellStyle(n[y],!0),S=null,G=[],M=0;M<E.length;M++){var R=this.getCellGeometry(E[M]),V={cell:E[M],rospan:1,colspan:1,row:y,col:M,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;V.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+q.x),R.height+(null!=g&&null!=
g[0]?g[0].point.y:b.y+q.y));V.actual=V;null!=g&&null!=g[M]&&1<g[M].rowspan?(V.rowspan=g[M].rowspan-1,V.colspan=g[M].colspan,V.actual=g[M].actual):null!=S&&1<S.colspan?(V.rowspan=S.rowspan,V.colspan=S.colspan-1,V.actual=S.actual):(S=this.getCurrentCellStyle(E[M],!0),null!=S&&(V.rowspan=parseInt(S.rowspan||1),V.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(V,E.length,
Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var n=this.getModel();n.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=e;n.setGeometry(b,y);var q=n.getParent(b),E=n.getChildCells(q,!0);if(!g){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var S=E[K+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,n.setGeometry(S,G))}}var M=this.getCellGeometry(q);null!=M&&(g||(g=b==E[E.length-1]),g&&(M=M.clone(),M.height+=e,n.setGeometry(q,M)))}}finally{n.endUpdate()}};
Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var n=this.getModel(),y=n.getParent(b),q=n.getParent(y),E=n.getChildCells(y,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;n.beginUpdate();try{for(var S=n.getChildCells(q,!0),G=0;G<S.length;G++){y=S[G];E=n.getChildCells(y,!0);var M=E[b],R=this.getCellGeometry(M);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),n.setGeometry(M,R));b<E.length-1&&(M=E[b+1],R=this.getCellGeometry(M),null!=R&&(R=R.clone(),
R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),n.setGeometry(M,R)))}if(K||g){var V=this.getCellGeometry(q);null!=V&&(V=V.clone(),V.width+=e,n.setGeometry(q,V))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(n,"resizeLastRow","0"),q="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,M=E.getChildCells(b,!0),R=0;R<M.length;R++)E.setVisible(M[R],!0);var V=this.getSize(M,!1);if(0<S&&0<G&&0<
M.length&&0<V){if(y){var d=this.graph.getCellGeometry(M[M.length-1]);null!=d&&(d=d.clone(),d.height=S-V+d.height,E.setGeometry(M[M.length-1],d))}var f=q?null:this.getRowLayout(M[0],G),l=[],u=e.y;for(R=0;R<M.length;R++)d=this.graph.getCellGeometry(M[R]),null!=d&&(d=d.clone(),d.x=e.x,d.width=G,d.y=Math.round(u),u=y||n?u+d.height:u+d.height/V*S,d.height=Math.round(u)-d.y,E.setGeometry(M[R],d)),K=Math.max(K,this.layoutRow(M[R],f,d.height,G,l));n&&S<V&&(g=g.clone(),g.height=u+e.height,E.setGeometry(b,
g));q&&G<K+Graph.minTableColumnWidth&&(g=g.clone(),g.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(A){E.setVisible(A.cell,A.actual.cell==A.cell);if(A.actual.cell!=A.cell){if(A.actual.row==A.row){var B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo;A.actual.geo.width+=B.width}A.actual.col==A.col&&(B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo,A.actual.geo.height+=B.height)}}))}else for(R=0;R<M.length;R++)E.setVisible(M[R],
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(M,R){R=null!=R?R:!0;var V=this.getState(M);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&!V.invalid&&this.updateLineJumps(V)&&this.graph.cellRenderer.redraw(V,!1,this.isRendering());V=e.apply(this,
arguments);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(V);return V};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var M=this.node.getElementsByTagName("path");if(1<M.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&M[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var R=this.state.view.graph.getFlowAnimationStyle();null!=R&&M[1].setAttribute("class",R.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(M,R){return n.apply(this,arguments)||null!=M.routedPoints&&null!=R.routedPoints&&!mxUtils.equalPoints(R.routedPoints,M.routedPoints)};var y=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(M){y.apply(this,arguments);this.graph.model.isEdge(M.cell)&&1!=M.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(M)};mxGraphView.prototype.updateLineJumps=function(M){var R=M.absolutePoints;if(Graph.lineJumpsEnabled){var V=null!=M.routedPoints,d=null;if(null!=R&&null!=this.validEdges&&"none"!==mxUtils.getValue(M.style,"jumpStyle","none")){var f=function(ia,ma,aa){var la=new mxPoint(ma,aa);la.type=ia;d.push(la);la=null!=M.routedPoints?M.routedPoints[d.length-1]:null;return null==la||
la.type!=ia||la.x!=ma||la.y!=aa},l=.5*this.scale;V=!1;d=[];for(var u=0;u<R.length-1;u++){for(var A=R[u+1],B=R[u],F=[],L=R[u+2];u<R.length-2&&mxUtils.ptSegDistSq(B.x,B.y,L.x,L.y,A.x,A.y)<1*this.scale*this.scale;)A=L,u++,L=R[u+2];V=f(0,B.x,B.y)||V;for(var O=0;O<this.validEdges.length;O++){var H=this.validEdges[O],ja=H.absolutePoints;if(null!=ja&&mxUtils.intersects(M,H)&&"1"!=H.style.noJump)for(H=0;H<ja.length-1;H++){var da=ja[H+1],ca=ja[H];for(L=ja[H+2];H<ja.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,
L.x,L.y,da.x,da.y)<1*this.scale*this.scale;)da=L,H++,L=ja[H+2];L=mxUtils.intersection(B.x,B.y,A.x,A.y,ca.x,ca.y,da.x,da.y);if(null!=L&&(Math.abs(L.x-B.x)>l||Math.abs(L.y-B.y)>l)&&(Math.abs(L.x-A.x)>l||Math.abs(L.y-A.y)>l)){da=L.x-B.x;ca=L.y-B.y;L={distSq:da*da+ca*ca,x:L.x,y:L.y};for(da=0;da<F.length;da++)if(F[da].distSq>L.distSq){F.splice(da,0,L);L=null;break}null==L||0!=F.length&&F[F.length-1].x===L.x&&F[F.length-1].y===L.y||F.push(L)}}}for(H=0;H<F.length;H++)V=f(1,F[H].x,F[H].y)||V}L=R[R.length-
1];V=f(0,L.x,L.y)||V}M.routedPoints=d;return V}return!1};var q=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(M,R,V){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)q.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-
2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),u=!0,A=null,B=null,F=[],L=null;M.begin();for(var O=0;O<this.state.routedPoints.length;O++){var H=this.state.routedPoints[O],ja=new mxPoint(H.x/this.scale,H.y/this.scale);0==O?ja=R[0]:O==this.state.routedPoints.length-1&&(ja=R[R.length-1]);var da=!1;if(null!=A&&1==H.type){var ca=this.state.routedPoints[O+1];H=ca.x/this.scale-ja.x;ca=ca.y/this.scale-ja.y;H=H*H+ca*ca;null==L&&(L=new mxPoint(ja.x-A.x,ja.y-A.y),B=Math.sqrt(L.x*L.x+
L.y*L.y),0<B?(L.x=L.x*f/B,L.y=L.y*f/B):L=null);H>f*f&&0<B&&(H=A.x-ja.x,ca=A.y-ja.y,H=H*H+ca*ca,H>f*f&&(da=new mxPoint(ja.x-L.x,ja.y-L.y),H=new mxPoint(ja.x+L.x,ja.y+L.y),F.push(da),this.addPoints(M,F,V,d,!1,null,u),F=0>Math.round(L.x)||0==Math.round(L.x)&&0>=Math.round(L.y)?1:-1,u=!1,"sharp"==l?(M.lineTo(da.x-L.y*F,da.y+L.x*F),M.lineTo(H.x-L.y*F,H.y+L.x*F),M.lineTo(H.x,H.y)):"line"==l?(M.moveTo(da.x+L.y*F,da.y-L.x*F),M.lineTo(da.x-L.y*F,da.y+L.x*F),M.moveTo(H.x-L.y*F,H.y+L.x*F),M.lineTo(H.x+L.y*F,
H.y-L.x*F),M.moveTo(H.x,H.y)):"arc"==l?(F*=1.3,M.curveTo(da.x-L.y*F,da.y+L.x*F,H.x-L.y*F,H.y+L.x*F,H.x,H.y)):(M.moveTo(H.x,H.y),u=!0),F=[H],da=!0))}else L=null;da||(F.push(ja),A=ja)}this.addPoints(M,F,V,d,!1,null,u);M.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(M,R,V,d){return null!=R&&"centerPerimeter"==R.style[mxConstants.STYLE_PERIMETER]?new mxPoint(R.getCenterX(),R.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(M,R,V,d){if(null==R||null==M||"1"!=R.style.snapToPoint&&"1"!=M.style.snapToPoint)K.apply(this,arguments);else{R=this.getTerminalPort(M,R,d);var f=this.getNextPoint(M,V,d),l=this.graph.isOrthogonal(M),u=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),A=new mxPoint(R.getCenterX(),R.getCenterY());if(0!=u){var B=Math.cos(-u),F=Math.sin(-u);f=mxUtils.getRotatedPoint(f,B,F,A)}B=parseFloat(M.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);B+=parseFloat(M.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==u&&l,B);0!=u&&(B=Math.cos(u),F=Math.sin(u),f=mxUtils.getRotatedPoint(f,B,F,A));M.setAbsoluteTerminalPoint(this.snapToAnchorPoint(M,R,V,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(M,R,V,d,f){if(null!=R&&null!=M){M=this.graph.getAllConnectionConstraints(R);d=V=null;if(null!=M)for(var l=0;l<M.length;l++){var u=this.graph.getConnectionPoint(R,
M[l]);if(null!=u){var A=(u.x-f.x)*(u.x-f.x)+(u.y-f.y)*(u.y-f.y);if(null==d||A<d)V=u,d=A}}null!=V&&(f=V)}return f};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(M,R,V){var d=S.apply(this,arguments);"1"==M.getAttribute("placeholders")&&null!=V.state&&(d=V.state.view.graph.replacePlaceholders(V.state.cell,d));return d};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(M){if(null!=M.style&&"undefined"!==typeof pako){var R=
mxUtils.getValue(M.style,mxConstants.STYLE_SHAPE,null);if(null!=R&&"string"===typeof R&&"stencil("==R.substring(0,8))try{var V=R.substring(8,R.length-1),d=mxUtils.parseXml(Graph.decompress(V));return new mxShape(new mxStencil(d.documentElement))}catch(f){null!=window.console&&console.log("Error in shape: "+f)}}return G.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(v){return null!=v&&S.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellMovable(this.model.getParent(v)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(v){var N=this.model.getParent(v);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==N||!this.isTable(N))};var M=Graph.prototype.splitEdge;
Graph.prototype.splitEdge=function(v,N,Q,Y,ea,ka,oa,wa){null==wa&&(wa=this.model.getParent(v),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=M.apply(this,[v,N,Q,Y,ea,ka,oa,wa]);this.model.setValue(Q,"");var sa=this.getChildCells(Q,!0);for(N=0;N<sa.length;N++){var ua=this.getCellGeometry(sa[N]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(sa[N])}var Fa=this.getChildCells(v,!0);for(N=0;N<Fa.length;N++)ua=this.getCellGeometry(Fa[N]),
wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(v,N){if(null!=this.textarea)if(v=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=v){var Q=v.view.scale;this.bounds=mxRectangle.fromRectangle(v);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=
Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(v,N){if("0"==mxUtils.getValue(v.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var Q=this.graph.getEditingValue(v.cell,N);"1"==mxUtils.getValue(v.style,"nl2Br",
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function R(){mxShape.call(this)}
function V(){mxShape.call(this)}function d(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function f(){mxActor.call(this)}function l(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");
c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.close(),c.fill()),c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.end(),c.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(M,G);mxCellRenderer.registerShape("note2",M);M.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=
this.scale,0,0,0):null};M.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(L,mxActor);L.prototype.size=.2;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,x,p,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,t)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",L);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,
new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ma.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,m,x,p){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=t?L.prototype.fixedSize:L.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));t&&(C*=m.view.scale);var D=c.x,fa=c.y,I=c.width,va=c.height;m=null!=m?mxUtils.getValue(m.style,
"size",G.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[hb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,
!0,aa.prototype.fixedSize),hexagon:gb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:gb(H.prototype.size,!1),display:gb(Sa.prototype.size,!1),cube:ub(1,n.prototype.size,!1),card:ub(.5,A.prototype.size,!0),loopLimit:ub(.5,v.prototype.size,!0),trapezoid:tb(.5,O.prototype.size,O.prototype.fixedSize),parallelogram:tb(1,L.prototype.size,L.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=Ab;var Db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
.25),!1)];L.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;F.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),
Actions.prototype.init=function(){function b(G){q.escape();G=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),G);null!=G&&q.setSelectionCells(G)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),M=0;M<G.length;M++)q.cellLabelChanged(G[M],"")}finally{q.getModel().endUpdate()}}}function g(G,M,R,V,d){d.getModel().beginUpdate();try{var f=d.getCellGeometry(G);null!=f&&R&&V&&(R/=V,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,d.getModel().setGeometry(G,
f));d.setCellStyles(mxConstants.STYLE_CLIP_PATH,M,[G]);d.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{d.getModel().endUpdate()}}var n=this.editorUi,y=n.editor,q=y.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),
function(){q.popupMenuHandler.hideMenu();var G=q.view.scale,M=q.container.scrollLeft,R=q.container.scrollTop,V=q.view.translate.x,d=q.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(G-q.view.scale)&&5>Math.abs(M-q.container.scrollLeft)&&5>Math.abs(R-q.container.scrollTop)&&V==q.view.translate.x&&d==q.view.translate.y&&n.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){q.isEnabled()&&(q.isSelectionEmpty()?n.actions.get("smartFit").funct():
q.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,M){try{var R=mxUtils.parseXml(G);y.graph.setSelectionCells(y.graph.importGraphModel(R.documentElement))}catch(V){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+V.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null!=G&&q.removeCells(G,!1)}catch(M){}try{null==G&&mxClipboard.cut(q)}catch(M){n.handleError(M)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(G){}try{mxClipboard.copy(q)}catch(G){n.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(M){if(null!=M){q.getModel().beginUpdate();
try{n.pasteXml(M,!0)}finally{q.getModel().endUpdate()}}else mxClipboard.paste(q)}),G=!0)}catch(M){}G||mxClipboard.paste(q)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function M(V){if(null!=V){for(var d=!0,f=0;f<V.length&&d;f++)d=d&&q.model.isEdge(V[f]);var l=q.view.translate;f=q.view.scale;var u=l.x,A=l.y;l=null;if(1==V.length&&d){var B=q.getCellGeometry(V[0]);null!=B&&(l=B.getTerminalPoint(!0))}l=null!=l?l:q.getBoundingBoxFromGeometry(V,d);null!=l&&(d=Math.round(q.snap(q.popupMenuHandler.triggerX/
f-u)),f=Math.round(q.snap(q.popupMenuHandler.triggerY/f-A)),q.cellsMoved(V,d-l.x,f-l.y))}}function R(){q.getModel().beginUpdate();try{M(mxClipboard.paste(q))}finally{q.getModel().endUpdate()}}if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(V){if(null!=V){q.getModel().beginUpdate();try{M(n.pasteXml(V,!0))}finally{q.getModel().endUpdate()}}else R()}),G=!0)}catch(V){}G||R()}});this.addAction("swap",function(){var G=
q.getSelectionCells(),M=q.getModel();if(2==G.length&&M.isVertex(G[0])&&M.isVertex(G[1])&&2==q.getMovableCells(G).length){var R=q.getCellGeometry(G[0]),V=q.getCellGeometry(G[1]);if(null!=R&&null!=V){R=R.clone();V=V.clone();M.beginUpdate();try{M.setGeometry(G[0],V),M.setGeometry(G[1],R)}finally{M.endUpdate()}}}});this.addAction("copySize",function(){var G=q.getSelectionCell();q.isEnabled()&&null!=G&&q.getModel().isVertex(G)&&(G=q.getCellGeometry(G),null!=G&&(n.copiedSize=new mxRectangle(G.x,G.y,G.width,
G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedSize){q.getModel().beginUpdate();try{for(var G=q.getResizableCells(q.getSelectionCells()),M=0;M<G.length;M++)if(q.getModel().isVertex(G[M])){var R=q.getCellGeometry(G[M]);null!=R&&(R=R.clone(),R.width=n.copiedSize.width,R.height=n.copiedSize.height,q.getModel().setGeometry(G[M],R))}}finally{q.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",
function(){var G=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(n.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,M){function R(f,l){var u=V.getValue(f);l=f.cloneValue(l);l.removeAttribute("placeholders");null==u||isNaN(u.nodeType)||l.setAttribute("placeholders",u.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||l.setAttribute("label",q.convertValueToString(f));V.setValue(f,l)}G=null!=
M?M:G;var V=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedValue){V.beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());if(0==d.length)R(V.getRoot(),n.copiedValue);else for(M=0;M<d.length;M++)R(d[M],n.copiedValue)}finally{V.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,M){G=null!=M?M:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",
G.colspan,[G.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=n.getSelectionState();if(0<G.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,G.cells),q.setCellStyles("colspan",null,G.cells)}finally{q.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,M){G=null!=M?M:G;q.turnShapes(q.getResizableCells(q.getSelectionCells()),
!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){q.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),M=q.getCurrentCellStyle(q.getSelectionCell()),R=1==mxUtils.getValue(M,mxConstants.STYLE_EDITABLE,1)?0:1;q.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);q.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);q.setCellStyles(mxConstants.STYLE_ROTATABLE,R,
mxUtils.sortCells(q.getSelectionCells(),!0);1!=G.length||q.isTable(G[0])||q.isTableRow(G[0])?(G=q.getCellsForGroup(G),1<G.length&&q.setSelectionCell(q.groupCells(null,0,G))):q.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(q.isEnabled()){var G=q.getEditableCells(q.getSelectionCells());q.model.beginUpdate();try{var M=q.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)q.model.contains(G[R])&&(0==q.model.getChildCount(G[R])&&q.model.isVertex(G[R])&&
q.setCellStyles("container","0",[G[R]]),M.push(G[R]))}finally{q.model.endUpdate()}0<M.length&&q.setSelectionCells(M)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var G=q.getSelectionCells();if(null!=G){for(var M=[],R=0;R<G.length;R++)q.isTableRow(G[R])||q.isTableCell(G[R])||M.push(G[R]);q.removeCellsFromParent(M)}}});this.addAction("edit",function(){q.isEnabled()&&q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=
q.getSelectionCell()||q.getModel().getRoot();n.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var M="";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(M=R)}M=new TextareaDialog(n,
mxResources.get("editTooltip")+":",M,function(V){q.setTooltipForCell(G,V)});n.showDialog(M.container,320,200,!0,!0);M.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=q.getLinkForCell(q.getSelectionCell());null!=G&&q.openLink(G)});this.addAction("editLink...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var M=q.getLinkForCell(G)||"";n.showLinkDialog(M,mxResources.get("apply"),function(R,V,d){R=mxUtils.trim(R);q.setLinkForCell(G,
n.showLinkDialog("",mxResources.get("insert"),function(G,M,R){G=mxUtils.trim(G);if(0<G.length){var V=null,d=q.getLinkTitle(G);null!=M&&0<M.length&&(V=M[0].iconUrl,d=M[0].name||M[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));M=new mxCell(d,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=V?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+V:"spacing=10;"));M.vertex=!0;V=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([M],
!0));M.geometry.x=V.x;M.geometry.y=V.y;q.setAttributeForCell(M,"linkTarget",R);q.setLinkForCell(M,G);q.cellSizeUpdated(M,!0);q.getModel().beginUpdate();try{M=q.addCell(M),q.fireEvent(new mxEventObject("cellsInserted","cells",[M]))}finally{q.getModel().endUpdate()}q.setSelectionCell(M);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var G=q.getSelectedElement(),
M=q.getParentByName(G,"A",q.cellEditor.textarea),R="";if(null==M&&null!=G&&null!=G.getElementsByTagName)for(var V=G.getElementsByTagName("a"),d=0;d<V.length&&null==M;d++)V[d].textContent==G.textContent&&(M=V[d]);null!=M&&"A"==M.nodeName&&(R=M.getAttribute("href")||"",q.selectNode(M));var f=q.cellEditor.saveSelection();n.showLinkDialog(R,mxResources.get("apply"),mxUtils.bind(this,function(l){q.cellEditor.restoreSelection(f);null!=l&&q.insertLink(l)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():
this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=q.getSelectionCells();if(null!=G){q.getModel().beginUpdate();try{for(var M=0;M<G.length;M++){var R=G[M];q.getModel().isVertex(R)&&(0<q.getModel().getChildCount(R)?q.updateGroupBounds([R],0,!0):q.updateCellSize(R))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();
var G=q.getCommonStyle(q.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var M=q.getEditableCells(q.getSelectionCells()),R=0;R<M.length;R++)if(state=q.getView().getState(M[R]),null!=state){var V=mxUtils.getValue(state.style,"html","0");if("1"==V&&null==G)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",G,[M[R]]);else if("0"==V&&"1"==G){var d=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,
"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(d));q.setCellStyles("html",G,[M[R]])}}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",M))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=q.getView().getState(q.getSelectionCell()),M="wrap";q.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(M=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,M)});this.addAction("rotation",
function(){var G="0",M=q.getView().getState(q.getSelectionCell());null!=M&&(G=M.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(n,G,mxResources.get("apply"),function(R){null!=R&&0<R.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){q.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){q.isFastZoomEnabled()?
mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&0<M&&q.zoomTo(M/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&0<M&&(M=new ChangePageSetup(n,null,null,null,M/100),M.ignoreColor=!0,M.ignoreImage=!0,q.model.execute(M))}),
"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));K=mxUtils.bind(this,function(G,M,R,V){return this.addAction(G,function(){if(null!=R&&q.cellEditor.isContentEditing())R();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,M,d);(M&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?q.updateLabelElements(d,function(l){l.style.fontWeight=null;"B"==l.nodeName&&q.replaceElement(l)}):(M&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(d,function(l){l.style.fontStyle=null;"I"==l.nodeName&&q.replaceElement(l)}):(M&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(d,function(l){l.style.textDecoration=null;"U"==l.nodeName&&q.replaceElement(l)});for(var f=0;f<d.length;f++)0==q.model.getChildCount(d[f])&&q.autoSizeCell(d[f],
!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),M=0;M<G.length;M++)q.removeTextStyleForCell(G[M],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),M=q.getCurrentCellStyle(G[0]),R="1"==mxUtils.getValue(M,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,R);q.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
M="1";null!=G&&null!=q.getFoldingImage(G)&&(M="0");q.setCellStyles("collapsible",M);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[M],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var G=q.getEditableCells(q.getSelectionCells());if(null!=G&&0<G.length){var M=q.getModel();M=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",M.getStyle(G[0])||"",function(R){null!=R&&q.setCellStyle(mxUtils.trim(R),G)},null,null,
400,220);this.editorUi.showDialog(M.container,420,300,!0,!0);M.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&n.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=q.getSelectionCell();if(null!=G&&q.getModel().isEdge(G)){var M=y.graph.selectionCellsHandler.getHandler(G);
if(M instanceof mxEdgeHandler){var R=q.view.translate,V=q.view.scale,d=R.x;R=R.y;G=q.getModel().getParent(G);for(var f=q.getCellGeometry(G);q.getModel().isVertex(G)&&null!=f;)d+=f.x,R+=f.y,G=q.getModel().getParent(G),f=q.getCellGeometry(G);d=Math.round(q.snap(q.popupMenuHandler.triggerX/V-d));V=Math.round(q.snap(q.popupMenuHandler.triggerY/V-R));M.addPointAt(M.state,d,V)}}});this.addAction("removeWaypoint",function(){var G=n.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,
G.index)});this.addAction("clearWaypoints",function(G,M){G=null!=M?M:G;var R=q.getSelectionCells();if(null!=R){R=q.getEditableCells(q.addAllEdges(R));q.getModel().beginUpdate();try{for(var V=0;V<R.length;V++){var d=R[V];if(q.getModel().isEdge(d)){var f=q.getCellGeometry(d);null!=M&&mxEvent.isShiftDown(G)?(q.setCellStyles(mxConstants.STYLE_EXIT_X,null,[d]),q.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_Y,
mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",M=q.getView().getState(q.getSelectionCell()),R="",V=null;null!=M&&(R=M.style[mxConstants.STYLE_IMAGE]||R,V=M.style[mxConstants.STYLE_CLIP_PATH]||V);var d=
q.cellEditor.saveSelection();n.showImageDialog(G,R,function(f,l,u,A,B,F){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(d),q.insertImage(f,l,u);else{var L=q.getSelectionCells();if(null!=f&&(0<f.length||0<L.length)){var O=null;q.getModel().beginUpdate();try{if(0==L.length){L=[q.insertVertex(q.getDefaultParent(),null,"",0,0,l,u,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(L,!0));
L[0].geometry.x=H.x;L[0].geometry.y=H.y;null!=A&&g(L[0],A,B,F,q);O=L;q.fireEvent(new mxEventObject("cellsInserted","cells",O))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<f.length?f:null,L);var ja=q.getCurrentCellStyle(L[0]);"image"!=ja[mxConstants.STYLE_SHAPE]&&"label"!=ja[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",L):0==f.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,L);null==A&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,L);if(null!=l&&null!=u)for(f=0;f<
L.length;f++){var da=L[f];if("0"!=q.getCurrentCellStyle(da).expand){var ca=q.getModel().getGeometry(da);null!=ca&&(ca=ca.clone(),ca.width=l,ca.height=u,q.getModel().setGeometry(da,ca))}null!=A&&g(da,A,B,F,q)}}finally{q.getModel().endUpdate()}null!=O&&(q.setSelectionCells(O),q.scrollCellToVisible(O[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,V)}}).isEnabled=E;this.addAction("crop...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
null!=G){var M=q.getCurrentCellStyle(G),R=M[mxConstants.STYLE_IMAGE],V=M[mxConstants.STYLE_SHAPE];R&&"image"==V&&(M=new CropImageDialog(n,R,M[mxConstants.STYLE_CLIP_PATH],function(d,f,l){g(G,d,f,l,q)}),n.showDialog(M.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
null!=G){var M=new ConnectionPointsDialog(n,G);n.showDialog(M.container,350,450,!0,!1,function(){M.destroy()});M.init()}},null,null,"Alt+Shift+Q").isEnabled=E};Actions.prototype.addAction=function(b,e,g,n,y){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var q=mxResources.get(b)+"..."}else q=mxResources.get(b);return this.put(b,new Action(q,e,g,n,y))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
K[0]),M=this.ui.getHashValueForPages(G,n),R=this.ui.getHashValueForPages(q,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",E,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",M,"current",R,"valid",M==R,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=M&&M!=R){var V=this.compressReportData(this.getAnonymizedXmlForPages(q)),d=this.compressReportData(this.getAnonymizedXmlForPages(G)),f=this.ui.hashValue(b.getCurrentEtag()),
l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(g,K,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+M+"\nCurrent: "+R+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+f+"\nTo: "+l+"\n\nFile Data:\n"+V+"\nPatched Shadow:\n"+d,null,"mergeFile",M,R,b.getCurrentRevisionId())}else{if(null!=this.sync){var u=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null,null,y);null==u||mxUtils.isEmptyObject(u)||K.push(u)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:
null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(F);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var A=this.getCurrentUser(),B=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,F)}}catch(L){}}}else throw Error(mxResources.get("notADiagramFile"));
25E3);this.sendErrorReport("Checksum Error in "+y+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+u+(null!=l?"\n\nRemote:\n"+l:""),null,7E4)});null==n?G(null):this.getLatestVersion(mxUtils.bind(this,function(l){null!=l&&l.getCurrentEtag()==n?G(l):G(null)}),function(){})}else{var M=this.getCurrentUser(),R=null!=M?M.id:"unknown",V=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(e).length,f=null;if(null!=e&&this.constructor==DriveFile&&400>d){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
DrawioFile.prototype.sendErrorReport=function(b,e,g,n){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),M=G.lastIndexOf(".");E="xml";0<M&&(E=G.substring(M));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
DrawioFile.prototype.patch=function(b,e,g,n){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),E=y.indexOfNextAdd,K=this.ui.editor.graph;K.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=K.foldingEnabled,M=K.mathEnabled,R=K.cellRenderer.redraw;K.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());R.apply(this,arguments)};K.model.beginUpdate();
this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{K.container.style.visibility="";K.model.endUpdate();K.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(y.history=q,y.indexOfNextAdd=E,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)M!=K.mathEnabled?(this.ui.editor.updateGraphComponents(),K.refresh()):(G!=K.foldingEnabled?K.view.revalidate():
this.inConflictState=!0;this.descriptorChanged();null!=n&&n(G);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,G);else{var K=this.getCurrentUser(),S=null!=K?K.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}}catch(M){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=n&&n(G)}};
LocalFile.prototype.saveFile=function(b,e,g,n,y){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var q=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),S=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var M=mxUtils.bind(this,
function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){try{var l=this.desc;this.savingFile=!1;this.desc=f;this.fileSaved(E,l,K,M);this.removeDraft()}catch(u){M(u)}}),M)}),M)}),M):(this.inConflictState=!0,M())}),mxUtils.bind(this,function(d){this.invalidFileHandle=!0;M(d)}))}),M)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,q?"image/png":"text/xml",q);else if(G.length<MAX_REQUEST_SIZE){var R=b.lastIndexOf(".");R=0<R?b.substring(R+1):"xml";
mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,z){var J=null;null!=k.editor.graph.getModel().getParent(z)?J=z.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 M=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
"1"==urlParams.embed||this.editorUi.editor.chromeless?M.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.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 z=this.editorUi,J=z.editor.graph;if(J.isEnabled()){var W=z.getCurrentFile();null!=W&&W.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
k&&null!=k.src){var J=Graph.getSvgFromDataUri(k.src);if(null!=J)try{var W=(new DOMParser).parseFromString(J,"text/xml"),T=W.getElementsByTagName("style");for(J=0;J<T.length;J++)if(T[J].innerHTML==Graph.svgDarkModeCss){T[J].parentNode.removeChild(T[J]);break}if("dark"==z||"auto"==z){var Z=Graph.createSvgDarkModeStyle(W,z);W.getElementsByTagName("defs")[0].appendChild(Z)}k=new mxImage(Editor.createSvgDataUri(mxUtils.getXml(W.documentElement)),k.width,k.height,k.x,k.y)}catch(ba){}}return k};var L=Graph.prototype.getSvg;
this.refresh());var Pa=null;Editor.enableCssDarkMode&&null!=this.backgroundImage&&(Pa=this.backgroundImage,this.backgroundImage=this.adaptBackgroundPage(Pa,xa));var ta=L.apply(this,arguments);if(Editor.enableCssDarkMode&&("dark"==xa||"auto"==xa)){var Da=Graph.createSvgDarkModeStyle(ta.ownerDocument,xa);ta.getElementsByTagName("defs")[0].appendChild(Da)}var Aa=this.getCustomFonts();if(pa&&0<Aa.length){var ya=ta.ownerDocument;Da=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,n){n.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.6.3";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
"")+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=A.stack?"&stack="+encodeURIComponent(A.stack):""))}catch(L){}try{F||null==window.console||console.error(B,d,f,l,u,A)}catch(L){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?
!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,f,l){var u=null==d||null==f;l=null!=l?l:24;var A=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=A.spin;A.spin=function(L,O){var H=
!1;this.active||(B.call(this,L),this.active=!0,null!=O&&(u&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,
d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),H.innerHTML=O,L.appendChild(H),A.status=H),this.pause=mxUtils.bind(this,function(){var ja=function(){};this.active&&(ja=mxUtils.bind(this,function(){this.spin(L,O)}));
[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=l)for(A=0;A<l.length;A++)f.model.execute(new ChangePage(this,l[A],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,l,u,A,B,F,L,O,H,ja){f=null!=f?f:this.editor.graph;A=null!=A?A:!1;O=null!=O?O:!0;ja=
f,u,null,L,O,da,null,null,l.scale,l.border);return ja};EditorUi.prototype.getXmlFileData=function(d,f,l,u){d=null!=d?d:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var A=this.editor.getGraphXml(d,u);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(O){var H=O.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&l?(H=mxUtils.trim(mxUtils.getTextContent(O)),O=O.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&O.appendChild(mxUtils.parseXml(H).documentElement))):
null==H||l?O=O.cloneNode(!0):(O=O.cloneNode(!1),mxUtils.setTextContent(O,Graph.compressNode(H)));A.appendChild(O)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(A)),A=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],F=B.node;if(B!=this.currentPage)if(B.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
L,null,u);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(L));delete B.needsUpdate}else u&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
null!=B.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,L,null,u),F=F.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(L))));d(F)}return A};EditorUi.prototype.anonymizeString=function(d,f){for(var l=[],u=0;u<d.length;u++){var A=d.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(A)?l.push(A):isNaN(parseInt(A))?A.toLowerCase()!=A?l.push(String.fromCharCode(65+Math.round(25*
d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var u in d[EditorUi.DIFF_UPDATE]){var A=d[EditorUi.DIFF_UPDATE][u];null!=A.name&&(A.name=this.anonymizeString(A.name));null!=A.cells&&(f=mxUtils.bind(this,function(B){var F=A.cells[B];if(null!=F){for(var L in F)null!=F[L].value&&(F[L].value="["+F[L].value.length+"]"),null!=F[L].xmlValue&&(F[L].xmlValue="["+F[L].xmlValue.length+"]"),null!=F[L].style&&(F[L].style=
"["+F[L].style.length+"]"),mxUtils.isEmptyObject(F[L])&&delete F[L];mxUtils.isEmptyObject(F)&&delete A.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(A.cells)&&delete A.cells);mxUtils.isEmptyObject(A)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&
L,O,H,ja){A=null!=A?A:!0;B=null!=B?B:!1;H=null!=H?H:!Editor.defaultCompressed;var da=this.editor.graph;if(f||!d&&null!=O&&/(\.svg)$/i.test(O.getTitle())){var ca=null!=da.themes&&"darkTheme"==da.defaultThemeName;if(ca||null!=this.pages&&this.currentPage!=this.pages[0]){var ia=da.getGlobalVariable;da=this.createTemporaryGraph(ca?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var ma=null!=this.pages?
d,f,l,u,A,L,H);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,l,u,A,B){B=null!=B?B:!0;var F=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var O=f.view.scale;B=Math.floor(F.x/O-f.view.translate.x);O=Math.floor(F.y/O-f.view.translate.y);F=f.background;null==A&&(f=this.getBasenames().join(";"),0<f.length&&(L=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",
(null==A?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+A+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,l,u,A){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=A&&(A=A.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
L=F.getChildren(F.root);for(A=0;A<L.length;A++){var O=L[A];F.setVisible(O,f[O.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,l,u,A,B,F,L,O,H,ja,da){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename("remoteSvg"==d?!1:!A),ia=ca+("xml"==d||"pdf"==d&&ja?".drawio":"")+"."+d;if("xml"==d){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,A,null,null,null,f);this.saveData(ia,d,ma,"text/xml")}else if("html"==d)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,
ca),this.saveData(ia,d,ma,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)ia=ca+".png";else if("jpeg"==d)ia=ca+".jpg";else if("remoteSvg"==d){ia=ca+".svg";d="svg";var aa=parseInt(O);"string"===typeof L&&0<L.indexOf("%")&&(L=parseInt(L)/100);if(0<aa){var la=this.editor.graph,X=la.getGraphBounds();var P=Math.ceil(X.width*L/la.view.scale+2*aa);var U=Math.ceil(X.height*L/la.view.scale+2*aa)}}this.saveRequest(ia,d,mxUtils.bind(this,
function(T,Z){try{var ba=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ha=this.createDownloadRequest(T,d,u,Z,F,A,L,O,H,ja,da,P,U);this.editor.graph.pageVisible=ba;return ha}catch(qa){this.handleError(qa)}}))}else{var k=null,z=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ia,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==
function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){d=this.downloadRequestBuilder(d,f,l,u,A,B,F,L,O,H,ja,da,ca);f="";for(var ia in d)l=d[ia],null!=l&&(f+=ia+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){var ia=this.editor.graph,ma=ia.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==B?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var aa=null,la=null,X=null;if(ma.width*ma.height>
steps:ia.view.gridSteps,color:ia.view.gridColor});Graph.translateDiagram&&(A.diagramLanguage=Graph.diagramLanguage);return{format:f,from:aa,to:la,allPages:X,bg:null!=B?B:mxConstants.NONE,base64:u,embedXml:H,xml:l,filename:null!=d?d:"",extras:JSON.stringify(A),scale:F,border:L,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null}};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=
this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){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==d||mxUtils.isEmptyObject(d)||(f=f+"#"+encodeURIComponent(JSON.stringify(d)))}catch(u){}window.location.hash=f}};EditorUi.prototype.loadDescriptor=function(d,f,l){var u=window.location.hash,A=mxUtils.bind(this,function(F){var L=null!=d.data?d.data:"";null!=F&&0<F.length&&
(0<L.length&&(L+="\n"),L+=F);F=new LocalFile(this,"csv"!=d.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return u};this.fileLoaded(F);"csv"==d.format&&this.importCsv(L,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var O=null!=d.interval?parseInt(d.interval):6E4,H=null,ja=mxUtils.bind(this,function(){var ca=
d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var A=this.editor.graph,B=A.getModel();B.beginUpdate();var F=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var L=B.getCell(d.getAttribute("id"));if(null!=L){try{var O=d.getAttribute("value");if(null!=O){var H=mxUtils.parseXml(O).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))B.setValue(L,H);else for(var ja=H.attributes,da=0;da<ja.length;da++)A.setAttributeForCell(L,ja[da].nodeName,0<ja[da].nodeValue.length?
ja[da].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+L.id+": "+U)}try{var ca=d.getAttribute("style");null!=ca&&A.model.setStyle(L,ca)}catch(U){null!=window.console&&console.log("Error in style for "+L.id+": "+U)}try{var ia=d.getAttribute("icon");if(null!=ia){var ma=0<ia.length?JSON.parse(ia):null;null!=ma&&ma.append||A.removeCellOverlays(L);null!=ma&&A.addCellOverlay(L,f(ma))}}catch(U){null!=window.console&&console.log("Error in icon for "+L.id+": "+U)}try{var aa=
d.getAttribute("geometry");if(null!=aa){aa=JSON.parse(aa);var la=A.getCellGeometry(L);if(null!=la){la=la.clone();for(key in aa){var X=parseFloat(aa[key]);"dx"==key?la.x+=X:"dy"==key?la.y+=X:"dw"==key?la.width+=X:"dh"==key?la.height+=X:la[key]=parseFloat(aa[key])}A.model.setGeometry(L,la)}}}catch(U){null!=window.console&&console.log("Error in icon for "+L.id+": "+U)}}}else if("model"==d.nodeName){for(var P=d.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(new mxCodec(d.firstChild)).decode(P,
f){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var u=l.lastIndexOf(".");0<=u&&(d=l.substring(u),l=l.substring(0,u));if(f){f=l;var A=new Date;l=A.getFullYear();u=A.getMonth()+1;var B=A.getDate(),F=A.getHours(),L=A.getMinutes();A=A.getSeconds();l=f+(" "+(l+"-"+u+"-"+B+"-"+F+"-"+L+"-"+A))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.fileLoaded=function(d,f,l){var u=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);
d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+F})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(L){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(L){}}catch(L){this.fileLoadedError=L;if(null!=
d)try{d.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+L.message,label:"stack_"+L.stack})}catch(O){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=u?this.fileLoaded(u)||B():B()});f?d():this.handleError(L,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else B();
return A};EditorUi.prototype.getHashValueForPages=function(d,f){var l=0,u=new mxGraphModel,A=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var F=d[B].node.cloneNode(!1);F.removeAttribute("name");u.root=d[B].root;var L=A.encode(u);this.editor.graph.saveViewState(d[B].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");F.appendChild(L);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,
d;B=this.sidebar.palettes[d.getHash()];B=null!=B?B[B.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var F=null,L=mxUtils.bind(this,function(P,U){0==P.length&&d.isEditable()?(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),U.appendChild(F)):this.addLibraryEntries(P,U)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
var O=this.sidebar.addPalette(d.getHash(),l,null!=u?u:!0,mxUtils.bind(this,function(P){L(f,P)}));null!=A&&(A.div=O);this.repositionLibrary(B);var H=O.parentNode.previousSibling;u=H.getAttribute("title");null!=u&&0<u.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+u);var ja=document.createElement("div");ja.style.position="absolute";ja.style.right="0px";ja.style.top="0px";ja.style.padding="8px";ja.style.backgroundColor="inherit";H.style.position="relative";
JSON.parse(mxUtils.getTextContent(pa.documentElement));L(Ca,O);f=f.concat(Ca);aa(P);this.spinner.stop();qa=!0}catch(Qa){}else if("mxfile"==pa.documentElement.nodeName)try{var Ba=pa.documentElement.getElementsByTagName("diagram");for(Ca=0;Ca<Ba.length;Ca++){var za=this.stringToCells(Editor.getDiagramNodeXml(Ba[Ca])),Ma=this.editor.graph.getBoundingBoxFromGeometry(za);la(za,new mxRectangle(0,0,Ma.width,Ma.height),P)}qa=!0}catch(Qa){null!=window.console&&console.log("error in drop handler:",Qa)}qa||
".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,l,u,A,B,F){d=new ImageDialog(this,d,f,l,u,A,B,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,f,l,u,A,B){var F=localStorage.getItem(f);d=new TextareaDialog(this,d,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(L){if(null!=L)try{if(null!=B&&
B(L),L==F)this.hideDialog();else{if(0<L.length){var O=JSON.parse(L);localStorage.setItem(f,JSON.stringify(O))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(H){this.handleError(H)}}),null,mxResources.get("close"),null,null,null,!0,null,null,A,l,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f,l,u){d=null!=d?d:mxUtils.bind(this,function(A,B,F,L){B||(A=new ChangePageSetup(this,
u?F:null,A),A.ignoreColor=!u,null!=L&&u&&(A.shadowVisible=L),this.editor.graph.model.execute(A))});d=new BackgroundImageDialog(this,d,f,l,u);this.showDialog(d.container,400,u?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,l,u,A){d=new LibraryDialog(this,d,f,l,u,A);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
function(d){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(d,f,l,u,A,B,F){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+
(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(ia){}if(null!=O||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var H=mxResources.get("ok"),ja=null;f=null!=f?f:mxResources.get("error");if(null!=O){null!=O.retry&&(H=mxResources.get("cancel"),ja=function(){L();O.retry()});if(404==O.code||404==O.status||403==O.code){F=403==O.code?null!=O.message?mxUtils.htmlEntities(O.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
l&&l()};EditorUi.prototype.alert=function(d,f,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,l,u,A,B){d=null!=d?d:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=l&&l()},u,A,null,null,null,null,L);this.showDialog(d.container,
340,46+L,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,l,u,A,B,F,L,O){var H=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";L=null!=L?L:"translate(-50%,0%)";var ja=A?500:1E3;H=A?"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");
aa()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,function(){aa()}),ja)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(X){var P=mxEvent.getSource(X);P!=ia&&P!=ma?(null!=l&&l(),aa(),mxEvent.consume(X)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",L)}),ja/2);window.setTimeout(la,A?4E3:3E4);H=!0}return H};EditorUi.prototype.setCurrentFile=function(d){null!=
typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(L?parseInt(L[2],10):!1)?!1:B}if(B||this.isOffline()){F.href=URL.createObjectURL(u?this.base64ToBlob(d,l):new Blob([d],{type:l}));B?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(O){}}else this.createEchoRequest(d,f,l,u,A).simulate(document,
"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,l,u,A,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=l?"&mime="+l:"")+(null!=A?"&format="+A:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(u?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var l=d.length,u=Math.ceil(l/1024),A=Array(u),B=0;B<u;++B){for(var F=1024*B,L=Math.min(F+1024,l),O=Array(L-F),H=0;F<L;++H,++F)O[H]=d[F].charCodeAt(0);A[B]=
new Uint8Array(O)}return new Blob(A,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,l,u,A,B,F,L){B=null!=B?B:!1;F=null!=F?F:"vsdx"!=A&&(!mxClient.IS_IOS||!navigator.standalone);var O=mxUtils.bind(this,function(ja,da,ca,ia){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,u);else if(null!=l&&"text/html"==l.substring(0,9)){var ma=new EmbedDialog(this,d);this.showDialog(ma.container,450,240,!0,!0);ma.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,
!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(d,ja,l,u,null,L);else if(null!=ja&&0<ja.length){var la=mxUtils.bind(this,function(X){try{this.exportFile(d,ja,l,u,da,X)}catch(P){this.handleError(P)}});null!=ia?la(ia):this.pickFolder(da,la)}}catch(X){this.handleError(X)}});if("1"==urlParams["save-dialog"])A=[],B||A.push(App.MODE_BROWSER),F||A.push("_blank"),f=new SaveDialog(this,f,mxUtils.bind(this,
mxEvent.addListener(this.editor.graph.container,"click",A);this.editor.exportToCanvas(mxUtils.bind(this,function(L){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var O=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border",
"0");L.setAttribute("src",O);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.openInNewWindow(O.substring(O.indexOf(",")+1),"image/png",!0);A.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(u)}),
Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,l,u,A){this.isLocalFileSave()?this.saveLocalFile(l,d,u,A,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,F){return this.createEchoRequest(l,B,u,A,f,F)}),l,A,u)};EditorUi.prototype.saveRequest=function(d,f,l,u,A,B,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var L=mxUtils.bind(this,function(ja,da,ca,ia){if("_blank"==da||null!=ja&&0<ja.length){var ma=l("_blank"==da?null:ja,da==App.MODE_DEVICE||"download"==
aa)}catch(la){this.handleError(la)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}))}),null!=ia?ca(ia):this.pickFolder(da,ca)))}});if("1"==urlParams["save-dialog"]){var O=[App.MODE_BROWSER];F||O.push("_blank");d=new SaveDialog(this,d,mxUtils.bind(this,function(ja,da,ca){L(ja.value,da,ja,ca);this.hideDialog()}),O,null,"application/pdf");this.showDialog(d.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}))}else{O=
this.getServiceCount(!1);isLocalStorage&&O++;var H=4>=O?2:6<O?4:3;d=new CreateDialog(this,d,L,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<O,H,u,B,A);F=this.isServices(O)?4<O?390:280:160;this.showDialog(d.container,420,F,!0,!0)}d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,l,u,A,B){};EditorUi.prototype.getServiceForName=
function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,f,l){f(null)};EditorUi.prototype.exportSvg=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca,ia){if(this.spinner.spin(document.body,mxResources.get("export")))try{var ma=this.editor.graph.isSelectionEmpty();l=null!=l?l:ma;var aa=f?null:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);null==aa&&0==f&&(aa="dark"!=ja||Editor.enableSvgDarkMode?"#ffffff":Editor.darkColor);
var la=this.editor.graph.getSvg(aa,d,F,L,null,l,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!ca,ja,da);u&&this.editor.graph.addSvgShadow(la);var X=this.getBaseFilename()+(A?".drawio":"")+".svg";ia=null!=ia?ia:mxUtils.bind(this,function(k){this.isLocalFileSave()||k.length<=MAX_REQUEST_SIZE?this.saveData(X,"svg",k,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});var P=mxUtils.bind(this,
EditorUi.prototype.addRadiobox=function(d,f,l,u,A,B,F){return this.addCheckbox(d,l,u,A,B,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,l,u,A,B,F,L){B=null!=B?B:!0;var O=document.createElement("input");O.style.marginRight="8px";O.style.marginTop="16px";O.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();O.id=F;null!=L&&O.setAttribute("name",L);l&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);u&&O.setAttribute("disabled","disabled");B&&(d.appendChild(O),l=document.createElement("label"),
"geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));B.appendChild(u);u=document.createElement("option");u.setAttribute("value","custom");mxUtils.write(u,mxResources.get("custom")+"...");B.appendChild(u);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var F=new FilenameDialog(this,A,mxResources.get("ok"),function(L){null!=L?A=L:B.value="blank"},mxResources.get("url"),null,null,null,
null,function(){B.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===B.value?"_blank":A:null},getEditInput:function(){return l},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=function(d,f){function l(){var L=document.createElement("div");
L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(L.style.border="1px solid black",L.style.backgroundColor=B):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(L)}mxUtils.write(d,mxResources.get("links")+":");var u=document.createElement("select");u.style.width="100px";u.style.padding="0px";u.style.marginLeft="8px";u.style.marginRight=
mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),u.appendChild(f));d.appendChild(u);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(B||"none",function(O){B=O;l()});mxEvent.consume(L)}));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||
F.push("edit="+encodeURIComponent(A)),B&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));l&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,l,u,A,B,F,L,O,H){O=this.createUrlParameters(d,f,l,u,A,B,O);d=this.getCurrentFile();f=!0;null!=F?l="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),L||null==d||d.constructor!=window.DriveFile?l="#R"+encodeURIComponent(l?
"/"+(0<O.length?"?"+O.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,f,l,u,A,B,F,L,O,H,ja,da){this.getBasenames();var ca={};""!=A&&A!=mxConstants.NONE&&(ca.highlight=A);"auto"!==u&&(ca.target=u);H||(ca.lightbox=!1);ca.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ca.zoom=l/100);l=[];F&&(l.push("pages"),ca.resize=!0,null!=this.pages&&null!=this.currentPage&&(ca.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ca.resize=!0);L&&l.push("layers");
var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","type-embedhtmldialog");B=L.cloneNode(!0);B.setAttribute("value","copy");F.appendChild(B);var O=document.createElement("span");mxUtils.write(O,mxResources.get("includeCopyOfMyDiagram"));
F.appendChild(O);mxUtils.br(F);F.appendChild(L);O=document.createElement("span");mxUtils.write(O,mxResources.get("publicDiagramUrl"));F.appendChild(O);var H=this.getCurrentFile();null==l&&null!=H&&H.constructor==window.DriveFile&&(O=document.createElement("a"),O.style.paddingLeft="12px",O.style.color="gray",O.style.cursor="pointer",mxUtils.write(O,mxResources.get("share")),F.appendChild(O),mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));
B.setAttribute("checked","checked");null==l&&L.setAttribute("disabled","disabled");A.appendChild(F);var ja=this.addLinkSection(A),da=this.addCheckbox(A,mxResources.get("zoom"),!0,null,!0);mxUtils.write(A,":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value="100%";A.appendChild(ca);var ia=this.addCheckbox(A,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;
P.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,A,mxUtils.bind(this,function(){u(L.checked?l:null,da.checked,ca.value,ja.getTarget(),ja.getColor(),ia.checked,ma.checked,aa.checked,la.checked,X.checked,null!=P?P.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,l,u,A,B,F,L){var O=document.createElement("div");O.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,
U.checked,null!=ca?ca.value:null,null!=ia?ia.value:null,k.checked)}),null,mxResources.get("create"),F,L);this.showDialog(f.container,340,300+d,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,l,u,A){var B=document.createElement("div");B.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:"+(A?"10":"4")+"px";B.appendChild(F);if(A){mxUtils.write(B,mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";B.appendChild(L);mxUtils.write(B,mxResources.get("borderWidth")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight=
d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ca=parseInt(L.value)/100||1,ia=parseInt(O.value)||0;l(!H.checked,null!=ja?ja.checked:!1,null!=da?da.checked:!1,ca,ia)}),null,d,f);this.showDialog(d.container,300,(A?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,l,u,A,B,F,L,O){F=null!=F?F:Editor.defaultIncludeDiagram;var H=document.createElement("div");H.style.whiteSpace="nowrap";var ja=this.editor.graph,da="jpeg"==L?220:300,ca=document.createElement("h3");mxUtils.write(ca,
L),z=null;if(Editor.isDarkMode()||Editor.enableCssDarkMode)z=document.createElement("select"),z.style.maxWidth="260px",z.style.marginLeft="8px",z.style.marginTop="16px",B=document.createElement("option"),B.setAttribute("value","light"),mxUtils.write(B,mxResources.get("light")),z.appendChild(B),O=document.createElement("option"),O.setAttribute("value","dark"),mxUtils.write(O,mxResources.get("dark")),z.appendChild(O),Editor.enableCssDarkMode&&"svg"==L&&(d=document.createElement("option"),d.setAttribute("value",
"auto"),mxUtils.write(d,mxResources.get("automatic")),z.appendChild(d)),mxUtils.write(H,mxResources.get("appearance")+":"),H.appendChild(z),mxUtils.br(H),Editor.isDarkMode()||Editor.cssDarkMode?O.setAttribute("selected","selected"):B.setAttribute("selected","selected"),da+=26;var J=this.addCheckbox(H,mxResources.get("shadow"),ja.shadowVisible),W=null;if("png"==L||"jpeg"==L)W=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(H,
mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=L);T.style.marginBottom="16px";var Z=document.createElement("input");Z.style.marginBottom="16px";Z.style.marginRight="8px";Z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Z.setAttribute("disabled","disabled");var ba=document.createElement("select");ba.style.maxWidth="200px";ba.style.marginLeft="8px";ba.style.marginBottom="16px";F=document.createElement("option");F.setAttribute("value","none");mxUtils.write(F,
ha.appendChild(f);var qa=document.createElement("div");mxUtils.write(qa,mxResources.get("LinksLost"));qa.style.margin="7px";qa.style.display="none";"svg"==L&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(ha),H.appendChild(qa),mxUtils.br(H),mxUtils.br(H),da+=50);l=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=ma.value;this.lastExportZoom=ia.value;A(ia.value,k.checked,!aa.checked,J.checked,T.checked,Z.checked,ma.value,la.checked,!1,ha.value,null!=W?W.checked:
null,null!=z?z.value:null,X.value,"embedFonts"==ba.value,"lblToSvg"==ba.value)}),null,l,u);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,l,u,A){var B=document.createElement("div");B.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var L=document.createElement("h3");mxUtils.write(L,f);L.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(L)}var O=this.addCheckbox(B,mxResources.get("fit"),!0),H=this.addCheckbox(B,mxResources.get("shadow"),F.shadowVisible&&u,!u),ja=this.addCheckbox(B,l),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ca=this.addEditButton(B,da),ia=ca.getEditInput(),ma=1<F.model.getChildCount(F.model.getRoot()),aa=this.addCheckbox(B,mxResources.get("layers"),ma,!ma);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="12px";
A);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,l,u,A,B,F,L){function O(ia){var ma=" ",aa="";u&&(ma=" 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"+
ma,"png");O(ia)}),null,null,null,mxUtils.bind(this,function(ia){L({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=
ca.getStatus()?O("data:image/png;base64,"+ca.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,l,u,A,B,F){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l),O=L.getElementsByTagName("a");if(null!=O)for(var H=0;H<O.length;H++){var ja=O[H].getAttribute("href");null!=ja&&"#"==ja.charAt(0)&&"_blank"==O[H].getAttribute("target")&&O[H].removeAttribute("target")}u&&
L.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(L);if(l){var da=" ",ca="";u&&(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"+(A?"&edit=_blank":"")+(B?"&layers=1":
"")+"');}})(this);\"",ca+="cursor:pointer;");d&&(ca+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(ia){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ia))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",u&&(f=this.getSelectedPageIndex(),L.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:"")+(A?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),d&&(d=parseInt(L.getAttribute("width")),A=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+d+" "+A),ca+="max-width:100%;max-height:"+A+"px;",L.removeAttribute("height")),""!=ca&&L.setAttribute("style",ca),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),F(mxUtils.getXml(L))};EditorUi.prototype.timeSince=
EditorUi.prototype.getPngFileProperties=function(d){var f=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var u=parseFloat(d.getAttribute("scale"));!isNaN(u)&&0<u&&(f=u)}d.hasAttribute("border")&&(u=parseInt(d.getAttribute("border")),!isNaN(u)&&0<u&&(l=u))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,f,l,u,A){try{var B=this.editor.graph,F=null!=B.themes&&"darkTheme"==B.defaultThemeName,L=null;if(null!=l&&0<l.length)B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet()),
document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0),B),L=l;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet());var O=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&B.setBackgroundImage(H.viewState.backgroundImage);
B.getGlobalVariable=function(ja){return"page"==ja?H.getName():"pagenumber"==ja?1:O.apply(this,arguments)};document.body.appendChild(B.container);B.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ja){try{null==L&&(L=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ja.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(L));d(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ca){null!=
f&&f(ca)}}),null,null,null,mxUtils.bind(this,function(ja){null!=f&&f(ja)}),null,null,u,null,B.shadowVisible,null,B,A,null,null,null,"diagram",null)}catch(ja){null!=f&&f(ja)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){L=null!=L?L:!0;ja=null!=ja?ja:0;F=null!=O?O:f.background;F==mxConstants.NONE&&(F=null);B=f.getSvg(F,H,ja,null,null,B,null,null,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ja);null!=d&&B.setAttribute("content",
d);null!=l&&B.setAttribute("resource",l);var ia=mxUtils.bind(this,function(ma){ma=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=A&&A(ma);return ma});f.mathEnabled&&this.editor.addMathCss(B);if(null!=A)this.embedFonts(B,mxUtils.bind(this,function(ma){L?this.editor.convertImages(ma,mxUtils.bind(this,function(aa){ia(aa)})):ia(ma)}));else return ia(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),f(d)}catch(u){f(d)}}))}catch(l){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){O=null!=O?O:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ia=this.editor.graph.isSelectionEmpty();l=null!=l?l:ia;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
function(ma){this.spinner.stop();try{this.saveCanvas(ma,A?this.getFileData(!0,null,null,null,l,L):null,O,null==this.pages||0==this.pages.length,ja)}catch(aa){this.handleError(aa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ma){this.spinner.stop();this.handleError(ma)}),null,l,d||1,f,u,null,null,B,F,H,da,ca)}catch(ma){this.spinner.stop(),this.handleError(ma)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=
function(d,f,l,u,A,B,F){f=null!=f?f:0;l=null!=l?l:0;var L=[];try{var O=this.editor.graph;if(null!=d&&0<d.length){O.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var ja=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=ja&&"mxfile"==ja.nodeName&&null!=this.pages){var da=ja.getElementsByTagName("diagram");if(1==da.length&&!B){if(ja=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=
null==aa.getName()&&aa.setName(mxResources.get("pageWithNumber",[la+1]));O.model.execute(new ChangePage(this,aa,aa,la,!0));B.push(aa)}this.updatePageLinks(d,B)}}if(null!=ja&&"mxGraphModel"===ja.nodeName){L=O.importGraphModel(ja,f,l,u);if(null!=L)for(ia=0;ia<L.length;ia++)this.updatePageLinksForCell(d,L[ia]);var X=O.parseBackgroundImage(ja.getAttribute("backgroundImage"));if(null!=X&&null!=X.originalSrc){this.updateBackgroundPageLink(d,X);var P=new ChangePageSetup(this,null,X);P.ignoreColor=!0;O.model.execute(P)}}F&&
this.insertHandler(L,null,null,O.defaultVertexStyle,O.defaultEdgeStyle,!1,!0)}finally{O.model.endUpdate()}}}catch(U){if(A)throw U;this.handleError(U)}return L};EditorUi.prototype.updatePageLinks=function(d,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(d,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(d,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+
1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var l=document.createElement("div"),u=this.editor.graph,A=u.getLinkForCell(f);null!=A&&u.setLinkForCell(f,this.updatePageLink(d,A));if(u.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(u.getLabel(f));for(var B=l.getElementsByTagName("a"),F=!1,L=0;L<B.length;L++)A=B[L].getAttribute("href"),null!=A&&(B[L].setAttribute("href",this.updatePageLink(d,A)),F=!0);F&&u.labelChanged(f,l.innerHTML)}for(L=
0;L<u.model.getChildCount(f);L++)this.updatePageLinksForCell(d,u.model.getChildAt(f,L))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var l=d[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var A=0;A<u.actions.length;A++){var B=u.actions[A];if(null!=B.open&&Graph.isPageLink(B.open)){var F=B.open.substring(B.open.indexOf(",")+1);l=d[F];null!=l?B.open=
"data:page/id,"+l:null==this.getPageById(F)&&delete B.open}}f="data:action/json,"+JSON.stringify(u)}}catch(L){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,l,u,A){var B=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){u=null!=u?u:d.name;var L=mxUtils.bind(this,function(H){F.clear()&&
B(H)}),O=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(u);try{var ja="UNKNOWN-VISIO",da=u.lastIndexOf(".");if(0<=da&&da<u.length)ja=u.substring(da+1).toUpperCase();else{var ca=u.lastIndexOf("/");0<=ca&&ca<u.length&&(u=u.substring(ca+1))}EditorUi.logEvent({category:ja+"-MS-IMPORT-FILE",action:"filename_"+u,label:H?"remote":"local"})}catch(ma){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())L({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):
function(la){try{f(la.target.result)}catch(X){L({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ma)}else this.doImportVisio(ma,f,L,u)}catch(la){L(la)}else try{""==ia.responseType||"text"==ia.responseType?L({message:ia.responseText}):(aa=new FileReader,aa.onload=function(){try{L({message:JSON.parse(aa.result).Message})}catch(la){L(la)}},aa.readAsText(ia.response))}catch(la){L({})}});ia.send(H)}else if(F.clear())try{this.doImportVisio(d,f,L,u)}catch(ma){L(ma)}}else L({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?O():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",O,null,null,null,L))}),B)};EditorUi.prototype.importGraphML=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(L){A.clear()&&u(L)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,
f,u)}catch(L){B(L)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",F,null,null,null,B))}),u)};EditorUi.prototype.exportVisio=function(d){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 u=mxUtils.bind(this,
null,u))}),f)}};EditorUi.prototype.convertLucidChart=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(L){A.clear()&&u(L)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if("undefined"!==typeof window.LucidImporter)try{var L=JSON.parse(d);f(LucidImporter.importState(L));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var O=[(new Date).toISOString(),"convertLucidChart",L];null!=L.state&&O.push(JSON.parse(L.state));if(null!=L.svgThumbs)for(var H=0;H<L.svgThumbs.length;H++)O.push(Editor.createSvgDataUri(L.svgThumbs[H]));null!=L.thumb&&O.push(L.thumb);console.log.apply(console,O)}}catch(ja){}}catch(ja){null!=window.console&&console.error(ja),B(ja)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(B){EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"generateOpenAiMermaidDiagram",label:d});var F=new mxXmlRequest("https://www.draw.io/generate/v1",d,"POST"),L=mxUtils.bind(this,function(O){B.clear()&&(this.spinner.stop(),l(O))});F.send(mxUtils.bind(this,function(O){if(B.isAlive())if(200<=O.getStatus()&&299>=O.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ja=mxUtils.trim(O.getText()),da=this.extractMermaidDeclaration(ja);
this.generateMermaidImage(da,null,mxUtils.bind(this,function(ca,ia,ma){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresponse:",ja,"\nresult:",da),this.spinner.stop(),f(da,ca,ia,ma))}),L)}),L,mxUtils.bind(this,function(ca){3>u++?B.clear()&&(this.spinner.stop(),A()):L(ca)}))}),L);else{var H={message:mxResources.get("error")+" "+O.getStatus()};try{H=JSON.parse(O.getText()),H=H.error}catch(ja){}L(H)}}),L)}),l)});A()};
0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,u)&&(f="classDiagram\n"+f);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",l,"\ntype:",u,"\nvalue:",d,"\ntext:",f);return f};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var f=[],l=0;l<d.length;l++)"%%"!=d[l].substring(0,2)&&f.push(d[l]);return f.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,f,l,u,A){d=this.removeMermaidComments(d);var B=mxUtils.bind(this,function(L){this.loadingMermaid=!1;null!=
u?u(L):this.handleError(L)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;Editor.isDarkMode()&&(f.theme="dark");var L=mxUtils.bind(this,function(O){try{if(mxClient.IS_IE||mxClient.IS_IE11)O=O.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var H=mxUtils.parseXml(O).getElementsByTagName("svg");if(0<H.length&&
(new Date).getTime(),d).then(function(O){L(O.svg)}).catch(function(O){null!=A?A(O):u(O)})}catch(O){u(O)}});"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(L){this.importXml(L,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,B)):mxscript("js/extensions.min.js",F,null,null,null,B))};
EditorUi.prototype.generatePlantUmlImage=function(d,f,l,u){function A(L,O,H){c1=L>>2;c2=(L&3)<<4|O>>4;c3=(O&15)<<2|H>>6;c4=H&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+L);L-=26;return 0==L?"-":1==L?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(L){r="";
for(i=0;i<L.length;i+=3)r=i+2==L.length?r+A(L.charCodeAt(i),L.charCodeAt(i+1),0):i+1==L.length?r+A(L.charCodeAt(i),0,0):r+A(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var O=new FileReader;O.readAsDataURL(this.response);O.onloadend=function(H){var ja=new Image;ja.onload=function(){try{var da=ja.width,ca=
ja.height;if(0==da&&0==ca){var ia=O.result,ma=ia.indexOf(","),aa=decodeURIComponent(escape(atob(ia.substring(ma+1)))),la=mxUtils.parseXml(aa).getElementsByTagName("svg");0<la.length&&(da=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(O.result,da,ca)}catch(X){u(X)}};ja.src=O.result};O.onerror=function(H){u(H)}}else u(L)};F.onerror=function(L){u(L)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,l){var u=this.editor.graph,A=null;u.getModel().beginUpdate();
try{A=u.insertVertex(null,null,"<pre>"+d+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(A,!0)}finally{u.getModel().endUpdate()}return A};EditorUi.prototype.insertTextAt=function(d,f,l,u,A,B,F,L){B=null!=B?B:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==
ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(A||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var O=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,l,B,!0,L)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),null!=H&&0<H.length))return this.importXml(H,
f,l,B,!0,L);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var ja=this.importXml(H,f,l,B,!0,L);if(0<ja.length)return ja}catch(ca){}this.loadImage(d,mxUtils.bind(this,function(ca){if("data:"==d.substring(0,5))this.resizeImage(ca,d,mxUtils.bind(this,function(aa,la,X){O.setSelectionCell(O.insertVertex(null,
d+";"))}}),mxUtils.bind(this,function(){var ca=null;O.getModel().beginUpdate();try{ca=O.insertVertex(O.getDefaultParent(),null,d,O.snap(f),O.snap(l),1,1,"text;"+(u?"html=1;":"")),O.updateCellSize(ca),O.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{O.getModel().endUpdate()}O.setSelectionCell(ca)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,l,B,null,L);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,B,null,L))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{O=this.editor.graph;A=null;O.getModel().beginUpdate();try{A=O.insertVertex(O.getDefaultParent(),null,"",O.snap(f),O.snap(l),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));O.fireEvent(new mxEventObject("textInserted","cells",[A]));u&&(d=O.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");A.value=d;O.updateCellSize(A);if(0<
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,L){StorageFile.listFiles(this,"F",F,L)});window.openBrowserFile=
mxUtils.bind(this,function(F,L,O){StorageFile.getFileContent(this,F,L,O)});window.deleteBrowserFile=mxUtils.bind(this,function(F,L,O){StorageFile.deleteFile(this,F,L,O)});if(!f){var u=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,
mxUtils.bind(this,function(O){this.importXml(O,0,0,!0)}),null,L)):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 A=this.dialog,B=A.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=u;B.apply(A,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
function(d,f,l){var u=this,A=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))l();else{var F=0,L,O=!1;B.forEach(function(H,ja){H=ja.name.toLowerCase();"diagram/diagram.xml"==H?(O=!0,ja.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):l()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>F&&(F=H,L=ja))});0<F?L.async("string").then(function(H){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(H,
d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):u.parseFileData(H,mxUtils.bind(this,function(ja){4==ja.readyState&&(200<=ja.status&&299>=ja.status?f(ja.responseText):l())}),d.name):l()}):O||l()}},function(B){l(B)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A,null,null,null,l))};EditorUi.prototype.importFile=function(d,f,l,u,A,B,F,L,O,H,ja,da){H=null!=
H?H:!0;var ca=!1,ia=null,ma=mxUtils.bind(this,function(aa){var la=null;null!=aa&&"<mxlibrary"==aa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,aa,F)):la=this.importXml(aa,l,u,H,null,null!=da?mxEvent.isControlDown(da):null);null!=L&&L(la)});"image"==f.substring(0,5)?(O=!1,"image/png"==f.substring(0,9)&&(f=ja?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ia=this.importXml(f,l,u,H,null,null!=da?mxEvent.isControlDown(da):null),O=!0)),O||(f=this.editor.graph,O=d.indexOf(";"),0<
F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,A=mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?ma(aa.responseText):null!=L&&(L(null),this.showError(mxResources.get("error"),413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,A,F):this.parseFile(O,A,F)):0==d.indexOf("PK")&&null!=O?(ca=!0,this.importZipFile(O,ma,mxUtils.bind(this,function(){ia=this.insertTextAt(this.validateFileData(d),
l,u,!0,null,H);L(ia)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(ia=this.insertTextAt(this.validateFileData(d),l,u,!0,null,H,null,null!=da?mxEvent.isControlDown(da):null));ca||null==L||L(ia);return ia};EditorUi.prototype.importFiles=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){u=null!=u?u:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var ia=null!=f&&null!=l,ma=!0;f=null!=f?f:0;l=null!=l?l:0;var aa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var la=ja||this.resampleThreshold,X=0;X<
!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,ba,Ca,!0)),null):this.importFile(ba,ha,qa,ra,pa,xa,Ca,Ba,za,ia,da,ca)}catch(Ma){return this.handleError(Ma),null}});B=null!=B?B:mxUtils.bind(this,function(ba){U.setSelectionCells(ba)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,J=z,W=[],T=mxUtils.bind(this,function(ba,ha){W[ba]=ha;if(0==--J){this.spinner.stop();if(null!=L)L(W);else{var qa=[];U.getModel().beginUpdate();try{for(ba=0;ba<W.length;ba++){var ra=
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var L=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H=
Math.max(L/A,O/A);if(1<H){var ja=Math.round(L/H),da=Math.round(O/H),ca=document.createElement("canvas");ca.width=ja;ca.height=da;ca.getContext("2d").drawImage(d,0,0,ja,da);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");ma.width=ja;ma.height=da;var aa=ma.toDataURL();ia!==aa&&(f=ia,L=ja,O=da)}}}catch(la){}l(f,L,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,l){try{var u=
this.editor.getEditBlankUrl=function(P){P=null!=P?P:"";"1"==urlParams.dev&&(P+=(0<P.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var L=f.addClickHandler;f.addClickHandler=function(P,U,k){var z=U;U=function(J,W){if(null==W){var T=mxEvent.getSource(J);"a"==T.nodeName.toLowerCase()&&(W=T.getAttribute("href"))}null!=W&&f.isCustomLink(W)&&(mxEvent.isTouchEvent(J)||!mxEvent.isPopupTrigger(J))&&f.customLinkClicked(W)&&mxEvent.consume(J);null!=z&&z(J,W)};L.call(this,P,U,k)};q.apply(this,arguments);
"row-resize";this.diagramContainer.parentNode.appendChild(A);this.bottomResizer=A;var B=null,F=null,L=null,O=null;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){O=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));A=A.cloneNode(!1);A.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(A);this.rightResizer=A;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){L=parseInt(this.diagramContainer.style.width);
B=mxEvent.getClientX(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(H){var ja=!1;null!=B&&(this.diagramContainer.style.width=Math.max(20,L+mxEvent.getClientX(H)-B)+"px",ja=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,O+mxEvent.getClientY(H)-F)+"px",ja=!0);ja&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
0,0,this.maxImageSize,function(O,H,ja,da,ca,ia){d.insertImage(O,ca,ia)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var H=0;H<O.length;H++)O[H]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],L.x,L.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(O){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",
mxEvent.addListener(l,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=B.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!0,!0)),!mxEvent.isConsumed(B)){var F=f.container.scrollLeft,L=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=L,Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!1,!0)}catch(O){this.handleError(O)}}),
0)}}catch(O){this.handleError(O)}}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==l?!0:A.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,l){function u(L){return"simple"==
L||0==f&&"sketch"==L}f=null!=f?f:150;var A=Editor.currentTheme,B=u(A)&&this.isDefaultTheme(d)||this.isDefaultTheme(A)&&u(d),F=B&&"sketch"!=d&&"sketch"!=A;B&&!this.themeSwitching&&(Editor.currentTheme=d,this.themeSwitching=!0,mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms ease-in-out"),0==f&&(this.container.style.opacity="0"),window.setTimeout(mxUtils.bind(this,function(){var L=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
"flex");this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(L);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&u(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:
!0);null!=l&&l()}),f)}),f)}),f)}),0));return F};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,l+=this.embedViewport.y));return{x:f,y:l,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;
this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*f;this.diagramContainer.scrollTop=d.y+(l.y-d.ty)*f};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display=
"none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var A=this.getCurrentFile();A=null!=A?A.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(A)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(A))+
'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);
l()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
"right 0px top 8px",B.style.backgroundRepeat="no-repeat",B.style.backgroundSize="13px",B.style.paddingRight="16px",B.style.marginRight="-4px");f.appendChild(B);if("simple"==d){var F=this.createMenu("pages",Editor.thinNoteImage);F.style.backgroundSize="24px";F.style.display="inline-block";F.style.width="24px";F.style.height="30px";F.style.opacity="0.7";f.appendChild(F);var L=this.createMenuItem("undo",Editor.thinUndoImage);L.style.marginLeft="auto";L.style.flexShrink="0";L.style.opacity="0.7";f.appendChild(L);
L=this.createMenuItem("redo",Editor.thinRedoImage);L.style.marginLeft="0px";L.style.flexShrink="0";L.style.opacity="0.7";f.appendChild(L);L=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.style.display=480>H?"none":"";B.style.display=750>H?"none":"inline-flex"});mxEvent.addListener(window,"resize",L);L()}mxUtils.bind(this,function(H){mxEvent.addListener(H,"click",mxUtils.bind(this,function(da){mxEvent.isAltDown(da)?(this.hideCurrentMenu(),
mxUtils.bind(this,function(da,ca){ja(da,ca,ca.getProperty("factor"))}))})(B);"simple"!=d&&f.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var O=this.createMenuItem("fullscreen",Editor.fullscreenImage);f.appendChild(O);L=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",
mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",L);f.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==d?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText=
"simple"==d?"inline-block":"block";F.style.flexShrink="0";F.style.width="30px";F.style.height="30px";F.style.padding="simple"==d?"0px":"4px 4px 0px 4px";F.style.opacity="0.7";var L=this.createMenu("table",Editor.thinTableImage);L.style.backgroundSize="24px";L.style.padding="simple"==d?"0px":"4px 4px 0px 4px";L.style.display="inline-block";L.style.width="30px";L.style.height="30px";L.style.opacity="0.7";var O=F.cloneNode(!0);O.style.backgroundImage="url("+("simple"==d?Editor.thinShapesImage:Editor.shapesImage)+
this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=d,null,28,28,"simple"==d?Editor.thinRectangleImage:null);"simple"==d?(600<=ma&&(la.className="geToolbarButton",la.style.opacity="0.7",ia(la,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=ma&&this.sketchPickerMenuElt.appendChild(O),440<=ma&&ia(B,mxResources.get("freehand")+" (X)",null,"X"),500<=ma&&this.sketchPickerMenuElt.appendChild(L)):
f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),
"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,u=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+
" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var A=this.diagramContainer.getAttribute("data-bounds");if(null!=A){this.diagramContainer.removeAttribute("data-bounds");u.getGraphBounds();var B=A.split(" ");u=mxUtils.getDocumentSize();this.diagramContainer.style.top=B[0];
this.diagramContainer.style.left=B[1];A=parseInt(B[2]);B=parseInt(B[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,u.width-80);B=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,B):B,u.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=B+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),
"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=f.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/
2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=
this.bottomResizer.style.visibility;f.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;
if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle=
"none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=
Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):
this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l=d.indexOf(",");0<l&&(f=this.getPageById(d.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};
EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),
this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();
this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),
this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,
function(u,A){try{this.spinner.stop();var B=this.createImageDataUri(u,f,"png"),F=parseInt(A.getAttribute("width")),L=parseInt(A.getAttribute("height"));this.writeImageToClipboard(B,F,L,mxUtils.bind(this,function(O){this.handleError(O)}))}catch(O){this.handleError(O)}}),null,null,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?
d:null)}catch(u){this.handleError(u)}};EditorUi.prototype.writeImageToClipboard=function(d,f,l,u){var A=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](u)};EditorUi.prototype.copyCells=function(d,f){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText="";else{var u=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),
A=mxUtils.getXml(l.encodeCells(u));mxUtils.setTextContent(d,encodeURIComponent(A));f?(l.removeCells(u,!1),l.lastPasteXml=null):(l.lastPasteXml=A,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};
EditorUi.prototype.pasteXml=function(d,f,l,u,A){A=null!=A?A:!0;var B=this.editor.graph,F=null;B.lastPasteXml==d?B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var L=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d))F=this.importXml(d,L,L),B.setSelectionCells(F);else if(f&&1==B.getSelectionCount()){A=B.getStartEditingCell(B.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,
d,[A]);else{B.model.beginUpdate();try{B.labelChanged(A,d),Graph.isLink(d)&&B.setLinkForCell(A,d)}finally{B.model.endUpdate()}}B.setSelectionCell(A)}else F=B.getInsertPoint(),B.isMouseInsertPoint()&&(L=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),F=this.insertTextAt(d,F.x+L,F.y+L,A),B.setSelectionCells(F);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return F};EditorUi.prototype.pasteCells=
function(d,f,l,u){if(!mxEvent.isConsumed(d)){var A=f,B=!1;if(l&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),L=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var O=decodeURIComponent(F);this.isCompatibleString(O)&&(L=!0,F=O)}catch(ma){}L=L?null:d.clipboardData.getData("text/html");null!=L&&0<L.length?(A=this.parseHtmlData(L),B="text/plain"!=A.getAttribute("data-type")):null!=F&&0<F.length&&(A=document.createElement("div"),mxUtils.setTextContent(A,
L))}F=A.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(ma){var aa=this.editor.graph;aa.lastPasteXml==ma?aa.pasteCounter++:(aa.lastPasteXml=ma,aa.pasteCounter=0);var la=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ma,la,la));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,
f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var B=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,L,f))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,f,u)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(l,mxUtils.bind(this,function(L){this.spinner.stop();B(L)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(L){this.spinner.stop();B(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),
200<=L.status&&299>=L.status?B(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,u)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,d,l.name))}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(L){this.spinner.stop();B(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,u)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
this.handleError(B);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?A.readAsText(u):A.readAsDataURL(u)})(d[l])};EditorUi.prototype.openLocalFile=function(d,f,l,u,A){var B=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(d);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
function(d,f){function l(F){if(null!=F){var L=F.lastIndexOf(".");0<L&&(F=F.substring(L+1,F.length));null==f[F]&&(f[F]=!0)}}var u=this.editor.graph,A=u.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(A[mxConstants.STYLE_SHAPE]));u.model.isEdge(d)&&(l(mxMarker.getPackageForType(A[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(A[mxConstants.STYLE_ENDARROW])));A=u.model.getChildCount(d);for(var B=0;B<A;B++)this.addBasenamesForCell(u.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
if(A)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var F=B.model.cells,L;for(L in F){var O=F[L];null!=O&&null!=O.style&&(O.style+=";sketch=1;"+(-1==O.style.indexOf("fontFamily=")||-1<O.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=da(H),Pa(H,O)):this.loadDescriptor(H,mxUtils.bind(this,function(ta){Pa(Qa(),O)}),mxUtils.bind(this,function(ta){this.handleError(ta,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(B,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(O,H,ja){L.apply(this,
l,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",l,null,null,null,u))}),onerror)};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var l=d.split("\n"),u=[],A=[],B=[],F={};if(0<l.length){var L={},O=this.editor.graph,H=null,ja=null,da=null,ca=null,ia=null,ma=null,aa=null,la="whiteSpace=wrap;html=1;",X=null,
"levelspacing"==Aa?ha=parseFloat(ya):"layout"==Aa&&(za=ya)}}}if(null==l[ta])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[ta].replace(/\r$/,""));Da=d=null;Aa=[];for(ya=0;ya<Ra.length;ya++)X==Ra[ya]&&(d=ya),P==Ra[ya]&&(Da=ya),Aa.push(mxUtils.trim(Ra[ya]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Aa[0]+"%");if(null!=Ma)for(var Wa=0;Wa<Ma.length;Wa++)null==L[Ma[Wa].to]&&(L[Ma[Wa].to]={});X=[];for(ya=ta+1;ya<l.length;ya++){var La=
[v])):(O.model.setStyle(Ea,v.style),0>mxUtils.indexOf(B,Ea)&&B.push(Ea),O.fireEvent(new mxEventObject("cellsInserted","cells",[Ea])));l=null!=Ea;Ea=v;if(!l)for(Wa=0;Wa<Ma.length;Wa++)L[Ma[Wa].to][Ea.getAttribute(Ma[Wa].to)]=Ea;null!=Qa&&"link"!=Qa&&(O.setLinkForCell(Ea,Ea.getAttribute(Qa)),O.setAttributeForCell(Ea,Qa,null));var ea=this.editor.graph.getPreferredSizeForCell(Ea);P=null!=Da?O.model.getCell(U+La[Da]):null;if(Ea.vertex){ab=null!=P?0:xa;ta=null!=P?0:Ca;null!=W&&null!=Ea.getAttribute(W)&&
function(jb,ib,mb){var wb=ib.getAttribute(mb.from);if(null!=wb&&""!=wb){wb=wb.split(",");for(var xb=0;xb<wb.length;xb++){var rb=L[mb.to][wb[xb]];if(null==rb&&null!=ma){rb=new mxCell(wb[xb],new mxGeometry(xa,Ca,0,0),ma);rb.style=O.replacePlaceholders(ib,rb.style,H);var nb=this.editor.graph.getPreferredSizeForCell(rb);rb.geometry.width=nb.width+qa;rb.geometry.height=nb.height+qa;L[mb.to][wb[xb]]=rb;rb.vertex=!0;rb.id=wb[xb];B.push(O.addCell(rb))}if(null!=rb){nb=mb.label;null!=mb.fromlabel&&(nb=(ib.getAttribute(mb.fromlabel)||
this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var M=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
function(d){var f=M.apply(this,arguments),l=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});Editor.enableCssDarkMode||this.addListener("darkModeChanged",l);this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return f};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var f=0;f<d.length;f++)this.libraryLoaded(d[f].file,d[f].images,d[f].title,null!=d[f].div?"none"!=d[f].div.style.display:
this.exportDialog=null);V.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,l,u,A,B,F,L){var O=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(O.getSvg(u,A,B)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),ja=O.getGraphBounds(),da=Math.floor(ja.width*
A/O.view.scale),ca=Math.floor(ja.height*A/O.view.scale);if(H.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.isExportToCanvas()){var ia={globalVars:O.getExportVariables()};L&&(ia.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});d.saveRequest(f,l,function(ma,aa){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(aa||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(ia))+(0<F?
"&dpi="+F:"")+"&bg="+(null!=u?u:"none")+"&w="+da+"&h="+ca+"&border="+B+"&xml="+encodeURIComponent(H))})}else"png"==l?d.exportImage(A,null==u||"none"==u,!0,!1,!1,B,!0,!1,null,L,F):d.exportImage(A,!1,!0,!1,!1,B,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var u=d;this.currentPage!=this.pages[l]&&(u=this.createTemporaryGraph(d.getStylesheet()),
document.createElement("div");A.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";A.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var L=F[d];if("R"==L.substring(0,1)){var O=JSON.parse(decodeURIComponent(L.substring(1)));B[O[0]]={id:O[0],title:O[1],downloadUrl:O[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){A.innerText="";
function(d){var f=d.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,l,u,A){var B=!0,F=window.setTimeout(mxUtils.bind(this,function(){B=!1;A({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(F);
B&&u.apply(this,arguments)}),O=mxUtils.bind(this,function(){window.clearTimeout(F);B&&A.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:O});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var l=mxUtils.bind(this,function(H,ja){var da={event:"remoteInvokeResponse",
msgMarkers:d.msgMarkers};null!=ja?da.error={errResp:ja}:null!=H&&(da.resp=H);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var u=d.funtionName,A=this.remoteInvokableFns[u];if(null!=A&&"function"===typeof this[u]){if(A.allowedDomains){for(var B=!1,F=0;F<A.allowedDomains.length;F++)if(f=="https://"+A.allowedDomains[F]){B=!0;break}if(!B){l(null,"Invalid Call: "+u+" is not allowed.");return}}var L=d.functionArgs;Array.isArray(L)||(L=[]);if(A.isAsync)L.push(function(){l(Array.prototype.slice.apply(arguments))}),
L.push(function(H){l(null,H||"Unkown Error")}),this[u].apply(this,L);else{var O=this[u].apply(this,L);l([O])}}else l(null,"Invalid Call: "+u+" is not found.")}catch(H){l(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var u=l.open("database",2);u.onupgradeneeded=function(A){try{var B=u.result;1>A.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});
function(F){if(!F||"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display="none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var O=!0,H=!1,ja,da=0,ca=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ia=mxUtils.bind(this,function(){da++;ma()}),ma=mxUtils.bind(this,
function(){try{if(da>=ja.length)ca();else{var la=ja[da];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(X){null==X||".scratchpad"==la&&X==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):ia()}),ia)}}catch(X){console.log(X)}}),aa=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,
data:la.data}],ia,ia,["filesInfo","files"])}catch(X){console.log(X)}});F=mxUtils.bind(this,function(la){try{if(la.source==L.contentWindow){var X={};try{X=JSON.parse(la.data)}catch(P){}"init"==X.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=X.event||H||(O?null!=X.resp&&0<X.resp.length&&null!=X.resp[0]?(ja=X.resp[0],O=!1,ma()):
function(B){try{A=A||"objects";Array.isArray(A)||(A=[A],d=[d],f=[f]);var F=B.transaction(A,"readwrite");F.oncomplete=l;F.onerror=u;for(B=0;B<A.length;B++)F.objectStore(A[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(L){null!=u&&u(L)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,f,l,u){this.openDatabase(mxUtils.bind(this,function(A){u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);A=A.transaction(u,"readwrite");A.oncomplete=f;A.onerror=l;for(var B=0;B<u.length;B++)A.objectStore(u[B]).delete(d[B])}),
function(d,f,l,u,A,B,F,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,l,u,A,B,F,L)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca,ia,ma,aa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,l,u,A,B,F,L,O,H,ja,da,ca,ia,ma,aa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
mxUtils.write(ia,mxResources.get("timeAgo",[ma],"{1} ago"));ia.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function G(ca){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ia);ca.busyImg=ia}function M(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function V(ca,ia,ma,aa,la){function X(Z,ba,ha){var qa=document.createElement("li");
ca.addReply(Ba,function(Ma){Ba.id=Ma;ca.replies.push(Ba);R(za);ha&&ha()},function(Ma){xa();M(za);b.handleError(Ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function xa(){K(Ba,za,function(Ma){pa()},!0)}var Ca=P().pdiv,Ba=b.newComment(Z,b.getCurrentUser());Ba.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var za=V(Ba,ca.replies,Ca,aa+1);ba?xa():pa()}if(la||!ca.isResolved){F.style.display="none";var k=document.createElement("div");k.className="geCommentContainer";
!f||X(mxResources.get("reply"),function(){U("",!0)},ca.isResolved);J=b.getCurrentUser();null==J||J.id!=ca.user.id||d||ca.isLocked||(X(mxResources.get("edit"),function(){function Z(){K(ca,k,function(){G(k);ca.editComment(ca.content,function(){R(k)},function(ba){M(k);Z();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Z()},ca.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(k);ca.deleteComment(function(Z){if(!0===
Z){Z=k.querySelector(".geCommentTxt");Z.innerText="";mxUtils.write(Z,mxResources.get("msgDeleted"));var ba=k.querySelectorAll(".geCommentAction");for(Z=0;Z<ba.length;Z++)ba[Z].parentNode.removeChild(ba[Z]);R(k);k.style.opacity="0.5"}else{ba=P(ca).replies;for(Z=0;Z<ba.length;Z++)B.removeChild(ba[Z]);for(Z=0;Z<ia.length;Z++)if(ia[Z]==ca){ia.splice(Z,1);break}F.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(Z){M(k);b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
Editor.darkColor:"whiteSmoke";B.style.bottom=parseInt(A)+7+"px";u.appendChild(B);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var L=document.createElement("div");L.className="geToolbarContainer geCommentsToolbar";L.style.height=A;L.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A=document.createElement("a");A.className="geButton";if(!d){var O=A.cloneNode();O.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
O.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(O,"click",function(ca){function ia(){K(ma,aa,function(la){G(aa);b.addComment(la,function(X){la.id=X;ja.push(la);R(aa)},function(X){M(aa);ia();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),aa=V(ma,ja,null,0);ia();ca.preventDefault();mxEvent.consume(ca)});L.appendChild(O)}O=A.cloneNode();O.innerHTML='<img class="geAdaptiveAsset" src="'+
IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';O.setAttribute("title",mxResources.get("showResolved"));O.className="geButton";var H=!1;mxEvent.addListener(O,"click",function(ca){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";da();ca.preventDefault();mxEvent.consume(ca)});L.appendChild(O);b.commentsRefreshNeeded()&&(O=A.cloneNode(),O.innerHTML='<img class="geAdaptiveAsset" src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',O.setAttribute("title",mxResources.get("refresh")),
O.className="geButton",mxEvent.addListener(O,"click",function(ca){da();ca.preventDefault();mxEvent.consume(ca)}),L.appendChild(O));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,"click",function(ca){q();ca.preventDefault();mxEvent.consume(ca)}),L.appendChild(A));u.appendChild(L);var ja=[],da=mxUtils.bind(this,function(){this.hasError=
mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});da();this.refreshComments=da;L=mxUtils.bind(this,function(){function ca(X){var P=ma[X.id];if(null!=P)for(S(X,P),P=0;null!=X.replies&&P<X.replies.length;P++)ca(X.replies[P])}if(this.window.isVisible()){for(var ia=B.querySelectorAll(".geCommentDate"),ma={},aa=0;aa<ia.length;aa++){var la=ia[aa];ma[la.getAttribute("data-commentId")]=la}for(aa=
0;aa<ja.length;aa++)ca(ja[aa])}});setInterval(L,6E4);this.refreshCommentsTime=L;this.window=new mxWindow(mxResources.get("comments"),u,e,g,n,y,!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,n,y,
q,E,K,S,G,M){var R=document.createElement("div");R.style.textAlign="center";M=null!=M?M:44;var V=document.createElement("div");V.style.padding="6px";V.style.overflow="auto";V.style.maxHeight=M+"px";V.style.lineHeight="1.2em";mxUtils.write(V,e);R.appendChild(V);null!=G&&(V=document.createElement("div"),V.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),V.appendChild(e),R.appendChild(V));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";E!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){E=K.getProperty("edit").changes;for(K=0;K<E.length;K++)if(E[K]instanceof RenamePage||E[K]instanceof ChangePage||E[K]instanceof mxRootChange){this.updateTabContainer();
function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var M=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(M,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(n,E,null,K);mxEvent.addGestureListeners(e,E,null,K)};
return null==Z||ba});var J=aa.geometry.width+40,W=aa.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?J=0:la==mxConstants.DIRECTION_NORTH?(J=0,W=-W):la==mxConstants.DIRECTION_WEST?(J=-J,W=0):la==mxConstants.DIRECTION_EAST&&(W=0);f.moveCells(z,J,W);return f.addCells(P,U)}finally{f.model.endUpdate()}}function M(aa,la){f.model.beginUpdate();try{var X=f.model.getParent(aa),P=f.getIncomingTreeEdges(aa),U=K(aa);0==P.length&&(P=[f.createEdge(X,null,"",null,null,f.createCurrentEdgeStyle())],U=la);var k=
f.model.getTerminal(ba[0],!0);P=this.cloneCell(ba[0]);this.addEdge(P,f.getDefaultParent(),T,J[Z])}}finally{this.model.endUpdate()}return J};if(null!=d.sidebar){var L=d.sidebar.dropAndConnect;d.sidebar.dropAndConnect=function(aa,la,X,P){var U=f.model,k=null;U.beginUpdate();try{if(k=L.apply(this,arguments),n(aa))for(var z=0;z<k.length;z++)if(U.isEdge(k[z])&&null==U.getTerminal(k[z],!0)){U.setTerminal(k[z],aa,!0);var J=f.getCellGeometry(k[z]);J.points=null;null!=J.getTerminalPoint(!0)&&J.setTerminalPoint(null,
G(la):M(la):13==aa.which&&(X=S(la,!mxEvent.isShiftDown(aa)))),null!=X&&0<X.length?(1==X.length&&f.model.isEdge(X[0])?f.setSelectionCell(f.model.getTerminal(X[0],!1)):f.setSelectionCell(X[X.length-1]),null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(la)),f.startEditingAtCell(la),mxEvent.consume(aa)):37==aa.keyCode?(V(la,mxConstants.DIRECTION_WEST),mxEvent.consume(aa)):38==aa.keyCode?(V(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(aa)):39==aa.keyCode?(V(la,mxConstants.DIRECTION_EAST),mxEvent.consume(aa)):
40==aa.keyCode&&(V(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(aa)))}}catch(P){d.handleError(P)}mxEvent.isConsumed(aa)||H.apply(this,arguments)};var ja=f.connectVertex;f.connectVertex=function(aa,la,X,P,U,k,z){var J=f.getIncomingTreeEdges(aa);if(n(aa)){var W=K(aa),T=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST,Z=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;return W==la||0==J.length?M(aa,la):T==Z?G(aa):S(aa,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ja.apply(this,
G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),S.style);M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);var R=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 f=new mxCell("",new mxGeometry(0,0,0,0),S.style);f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);q.insert(S);q.insert(M);q.insert(V);q.insert(f);q.insert(E);q.insert(K);q.insert(G);q.insert(R);q.insert(d);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var q=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;');
S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);K.insertEdge(S,!1);var G=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");M.geometry.relative=
!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);q.insert(S);q.insert(M);q.insert(E);q.insert(K);q.insert(G);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree root",function(){var q=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"};');y.setAttributeForCell(q,"treeRoot","1");q.vertex=!0;return sb.createVertexTemplateFromCells([q],
f.parentNode&&f.parentNode.removeChild(f)}))};var M=!1;EditorUi.prototype.initFormatWindow=function(){if(!M&&null!=this.formatWindow){M=!0;var V=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){V.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+d-140+"px"):(this.div.style.width=d+"px",this.table.style.width=this.div.style.width,
L.insertBefore(Ba,B.statusContainer):L.appendChild(Ba);null!=Ca?(Ba.style.backgroundImage="url("+Ca+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,ha);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(za){za.preventDefault()}));mxEvent.addListener(Ba,"click",function(za){"disabled"!=Ba.getAttribute("disabled")&&qa(za);mxEvent.consume(za)});
"0 4px 0 4px";ra.style.height="30px";ra.style.position="relative";ra.style.top="0px";for(var pa=0;pa<ha.length;pa++)null!=ha[pa]&&(ha[pa].style.margin="0px",ha[pa].style.boxShadow="none",ra.appendChild(ha[pa]));null!=qa&&mxUtils.setOpacity(ra,qa);null!=B.statusContainer?L.insertBefore(ra,B.statusContainer):L.appendChild(ra);return ra}function l(){for(var ha=L.firstChild;null!=ha;){var qa=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=qa}O=L.firstChild;
this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var B=this,F=B.editor.graph;B.toolbar=this.createToolbar(B.createDiv("geToolbar"));B.defaultLibraryName=mxResources.get("untitledLibrary");var L=document.createElement("div");L.className="geMenubarContainer";var O=null,H=new Menubar(B,L);B.statusContainer=B.createStatusContainer();B.statusContainer.style.position="relative";B.statusContainer.style.maxWidth="";B.statusContainer.style.color=
"gray";B.statusContainer.style.cursor="default";var ja=B.hideCurrentMenu;B.hideCurrentMenu=function(){ja.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var da=B.descriptorChanged;B.descriptorChanged=function(){da.apply(this,arguments);var ha=B.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var qa=ha.getMode();"google"==qa?qa="googleDrive":"github"==qa?qa="gitHub":"gitlab"==qa?qa="gitLab":"onedrive"==qa&&(qa="oneDrive");qa=mxResources.get(qa);L.setAttribute("title",ha.getTitle()+
(null!=qa?" ("+qa+")":""))}else L.removeAttribute("title")};B.setStatusText(B.editor.getStatus());L.appendChild(B.statusContainer);B.buttonContainer=document.createElement("div");B.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;";L.appendChild(B.buttonContainer);B.menubarContainer=B.buttonContainer;B.tabContainer=document.createElement("div");B.tabContainer.className=
B.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=B.actions.get("zoomIn"),P=B.actions.get("zoomOut"),U=B.actions.get("resetView"),k=B.actions.get("undo"),z=B.actions.get("redo"),J=d("",k.funct,null,mxResources.get("undo")+" ("+k.shortcut+")",k,Editor.undoImage),W=d("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),T=d("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage);L.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
B.editor.addListener("resetGraphView",qa);B.editor.addListener("pageSelected",qa);B.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(ra,pa){qa(ra,pa,pa.getProperty("factor"))}))})(Z);var ba=B.setGraphEnabled;B.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(Z.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(L);
function(l){return K.getImageUrl(l)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<S.length){if(null!=this.pageId)for(var G=0;G<S.length;G++)if(this.pageId==S[G].getAttribute("id")){this.currentPage=G;break}var M=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(l){var u=S[K.currentPage];return"page"==l?u.getAttribute("name")||"Page-"+(K.currentPage+
1):"pagenumber"==l?K.currentPage+1:"pagecount"==l?S.length:M.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(l){this.handlingResize||(this.currentPage=mxUtils.mod(l,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(l){l=this.getIndexById(l);var u=0<=l;u&&this.selectPage(l);return u};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=
E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(da,ca){},mouseUp:function(da,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-ca.getGraphX())<K&&Math.abs(this.startY-ca.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?y():q(30))}})}for(var S=this.toolbarItems,G=0,M=mxUtils.bind(this,function(da,ca,ia,ma){da=this.createToolbarButton(da,ca,ia,ma);e.appendChild(da);
G++;return da}),R=null,V=null,d=null,f=null,l=0;l<S.length;l++){var u=S[l];if("pages"==u){f=b.ownerDocument.createElement("div");f.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;color:#000;";mxUtils.setOpacity(f,70);var A=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";
A.style.paddingLeft="0px";A.style.paddingRight="0px";e.appendChild(f);var B=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";u=mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,this.currentPage+1+" / "+this.diagrams.length);f.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=f.style.display;B.style.display=f.style.display});this.addListener("graphChanged",
u);u()}else if("zoom"==u)this.zoomEnabled&&(M(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),M(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),M(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"==u){if(this.layersEnabled){var F=this.graph.getModel(),L=M(mxUtils.bind(this,function(da){if(null!=R)R.parentNode.removeChild(R),R=null;else{R=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ia=this.graph.getGraphBounds(),ma=this.graph.view;0>ia.x||0>ia.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale}):null!=this.graph.originalViewState&&
0<ia.x/ma.scale+this.graph.originalViewState.translate.x-ma.translate.x&&0<ia.y/ma.scale+this.graph.originalViewState.translate.y-ma.translate.y&&(ma.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale})}}));mxEvent.addListener(R,"mouseleave",function(){R.parentNode.removeChild(R);R=null});da=L.getBoundingClientRect();R.style.width="140px";R.style.padding=
document.body.appendChild(R)}}),Editor.layersImage,mxResources.get("layers")||"Layers");F.addListener(mxEvent.CHANGE,function(){L.style.display=1<F.getChildCount(F.root)?"inline-block":"none"});L.style.display=1<F.getChildCount(F.root)?"inline-block":"none"}}else if("tags"==u){if(this.tagsEnabled){var O=M(mxUtils.bind(this,function(da){null==V&&(V=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),V.div.getElementsByTagName("div")[0].style.position="",V.div.style.maxHeight="160px",
"inline-block":"none"}}else"lightbox"==u?this.lightboxEnabled&&M(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(u=this.graphConfig["toolbar-buttons"][u],null!=u&&(u.elem=M(null==u.enabled||u.enabled?u.handler:function(){},u.image,u.title,u.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),
document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=E,GraphViewer.resizeSensorEnabled=!0,K.apply(this,arguments))};var S=y.editor.graph,G=S.container;G.style.overflow="hidden";this.lightboxChrome&&null==b?(G.style.border="1px solid #c0c0c0",G.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",q)):(e.style.display="none",g.style.display="none");var M=this;S.getImageFromBundles=function(V){return M.getImageUrl(V)};var R=y.createTemporaryGraph;
y.createTemporaryGraph=function(){var V=R.apply(this,arguments);V.getImageFromBundles=function(d){return M.getImageUrl(d)};return V};this.graphConfig.move&&(S.isMoveCellsEvent=function(V){return!0});mxUtils.setPrefixedStyle(G.style,"border-radius","4px");G.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(S,y);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){y.destroy()}),G.style.outline=
d.appendChild(d.resizeSensor);"static"==q(d,"position")&&(d.style.position="relative");var l=d.resizeSensor.childNodes[0],u=l.childNodes[0],A=d.resizeSensor.childNodes[1],B=function(){u.style.width="100000px";u.style.height="100000px";l.scrollLeft=1E5;l.scrollTop=1E5;A.scrollLeft=1E5;A.scrollTop=1E5};B();var F=!1,L=function(){d.resizedAttached&&(F&&(d.resizedAttached.call(),F=!1),b(L))};b(L);var O,H,ja,da;f=function(){if((ja=d.offsetWidth)!=O||(da=d.offsetHeight)!=H)F=!0,O=ja,H=da;B()};var ca=function(ia,
ma,aa){ia.attachEvent?ia.attachEvent("on"+ma,aa):ia.addEventListener(ma,aa)};ca(l,"scroll",f);ca(A,"scroll",f)}var K=function(){GraphViewer.resizeSensorEnabled&&n()};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;K();S=null;G=!1},200))})).observe(g)}else{var M=Object.prototype.toString.call(g),R="[object Array]"===M||"[object NodeList]"===M||"[object HTMLCollection]"===
M||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){M=0;for(var V=g.length;M<V;M++)E(g[M],K)}else E(g,K);this.detach=function(){if(R)for(var d=0,f=g.length;d<f;d++)e.detach(g[d]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/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;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=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(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;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,r){var i;r=null!==(i=r)&&void 0!==i?i:p,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,r]of e(t))n[o]=r;return n}function R(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(e){return console.warn("fallback value for",e),null}}const w=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"]),D=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"]),L=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"]),v=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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),O=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","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","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=Object.seal(Object.create(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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=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 ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=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&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("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)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"21.6.3",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b,c){b=null!=b?b:!1;var d=null;if(null!=a)for(var e=0;e<a.length;e++)if(b||this.model.isVertex(a[e])){var f=this.getCellGeometry(a[e]);if(null!=f){var g=null;if(this.model.isEdge(a[e])){g=function(m){null!=m&&(null==k?k=new mxRectangle(m.x,m.y,0,0):k.add(new mxRectangle(m.x,m.y,0,0)))};null==this.model.getTerminal(a[e],!0)&&g(f.getTerminalPoint(!0));null==this.model.getTerminal(a[e],!1)&&g(f.getTerminalPoint(!1));f=f.points;if(null!=f&&0<f.length)for(var k=
new mxRectangle(f[0].x,f[0].y,0,0),l=1;l<f.length;l++)g(f[l]);g=k}else l=this.model.getParent(a[e]),f.relative?this.model.isVertex(l)&&l!=this.view.currentRoot&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g=new mxRectangle(f.x*k.width,f.y*k.height,f.width,f.height),0<=mxUtils.indexOf(null!=c?c:a,l)&&(g.x+=k.x,g.y+=k.y))):(g=mxRectangle.fromRectangle(f),this.model.isVertex(l)&&0<=mxUtils.indexOf(null!=c?c:a,l)&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g.x+=
k.x,g.y+=k.y))),null!=g&&null!=f.offset&&(g.x+=f.offset.x,g.y+=f.offset.y),f=this.getCurrentCellStyle(a[e]),null!=g&&(f=mxUtils.getValue(f,mxConstants.STYLE_ROTATION,0),0!=f&&(g=mxUtils.getBoundingBox(g,f)));null!=g&&(null==d?d=mxRectangle.fromRectangle(g):d.add(g))}}return d};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};
mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();a=b.getEvent();var c=mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)&&!this.graph.isSelectionEmpty();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null!=b.getState()||c)&&!mxEvent.isMultiTouchEvent(a)){var d=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(d,b);this.cell=null;null==d&&c&&(d=this.graph.getSelectionCell());this.isSelectEnabled()&&!this.delayedSelection&&
this.graph.selectCellForEvent(d,a);this.isMoveEnabled()&&(this.delayedSelection?this.cell=d:this.start(d,b.getX(),b.getY()),this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b))}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
function Dialog(b,e,g,n,y,q,E,K,S,G,M){this.editorUi=b;var R=S?57:0,V=g,d=n,f=S?0:64,l=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(l.height=window.innerHeight);var u=l.height;l=Math.max(1,Math.round((l.width-g-f)/2));var A=Math.max(1,Math.round((u-n-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-f):g;n=Math.min(n,u-f);0<b.dialogs.length&&
q.className="geDialogClose",q.style.top=A+14+"px",q.style.left=l+g+38-R+"px",q.style.zIndex=this.zIndex,mxEvent.addListener(q,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(q),this.dialogImg=q,!M)){var L=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(O){L=!0}),null,mxUtils.bind(this,function(O){L&&(b.hideDialog(!0),L=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var O=G();null!=O&&(V=g=O.w,d=n=O.h)}O=Editor.inlineFullscreen||
var ErrorDialog=function(b,e,g,n,y,q,E,K,S,G,M){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var V=document.createElement("div");V.style.padding="0px";V.style.margin="0px";V.style.fontSize="18px";V.style.paddingBottom="16px";V.style.marginBottom="10px";V.style.borderBottom="1px solid #c0c0c0";V.style.color="gray";V.style.whiteSpace="nowrap";V.style.textOverflow="ellipsis";V.style.overflow="hidden";mxUtils.write(V,e);V.setAttribute("title",e);R.appendChild(V)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=g;R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=M&&M()}),G.className="geBtn",g.appendChild(G));var d=mxUtils.button(n,
PrintDialog.prototype.create=function(b){function e(d){var f=E.checked||G.checked,l=parseInt(R.value)/100;isNaN(l)&&(l=1,R.value="100%");mxClient.IS_SF&&(l*=.75);var u=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,A=1/g.pageScale;if(f){var B=E.checked?1:parseInt(M.value);isNaN(B)||(A=mxUtils.getScaleForPageCount(B,g,u))}var F=B=0;u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*l);u.height=Math.ceil(u.height*l);A*=l;!f&&g.pageVisible?(l=g.getPageLayout(),B-=l.x*u.width,F-=l.y*u.height):
"click",function(d){G.checked=!G.checked;E.checked=!G.checked;mxEvent.consume(d)});q.appendChild(K);var M=document.createElement("input");M.setAttribute("value","1");M.setAttribute("type","number");M.setAttribute("min","1");M.setAttribute("size","4");M.setAttribute("disabled","disabled");M.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(M);mxUtils.write(K," "+mxResources.get("pages")+" (max)");q.appendChild(K);y.appendChild(q);mxEvent.addListener(G,"change",
function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");E.checked=!G.checked});q=q.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");q.appendChild(K);K=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";K.appendChild(R);q.appendChild(K);y.appendChild(q);q=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
var PageSetupDialog=function(b){function e(){var l=R;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(M.style.backgroundImage="url("+l.src+")",M.style.display="inline-block"):(M.style.backgroundImage="",M.style.display="none");M.style.backgroundColor="";null!=V&&V!=mxConstants.NONE&&(M.style.backgroundColor=V,M.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var y=document.createElement("tbody");
q.appendChild(E);E=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var M=document.createElement("div");M.style.display="inline-block";M.style.verticalAlign="middle";M.style.backgroundPosition="center center";M.style.backgroundRepeat="no-repeat";M.style.backgroundSize="contain";M.style.border="1px solid lightGray";M.style.borderRadius="4px";M.style.marginRight="14px";M.style.height="32px";
M.style.width="64px";M.style.cursor="pointer";M.style.padding="4px";var R=g.backgroundImage,V=g.background,d=g.shadowVisible,f=function(l){b.showBackgroundImageDialog(function(u,A,B,F){A||(null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src}),R=u,d=F);V=B;e()},R,V,!0);mxEvent.consume(l)};mxEvent.addListener(G,"click",f);mxEvent.addListener(M,"click",f);e();E.appendChild(M);E.appendChild(G);q.appendChild(E);y.appendChild(q);q=document.createElement("tr");E=document.createElement("td");
ja.format.width&&g.height==ja.format.height?(K.value=ja.key,q.setAttribute("checked","checked"),q.defaultChecked=!0,q.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,O=!0):g.width==ja.format.height&&g.height==ja.format.width&&(K.value=ja.key,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,O=E.checked=!0));O?(S.style.display="",M.style.display="none"):(R.value=g.width/100,V.value=g.height/100,q.setAttribute("checked",
"checked"),K.value="custom",S.style.display="none",M.style.display="")}}e="format-"+e;var q=document.createElement("input");q.setAttribute("name",e);q.setAttribute("type","radio");q.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.width=
"206px";var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";q.style.marginRight="6px";S.appendChild(q);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var G=document.createElement("span");G.style.width="100px";mxUtils.write(G,mxResources.get("landscape"));S.appendChild(G);var M=document.createElement("div");
M.style.marginLeft="4px";M.style.width="210px";M.style.height="24px";var R=document.createElement("input");R.setAttribute("size","7");R.style.textAlign="right";M.appendChild(R);mxUtils.write(M," in x ");var V=document.createElement("input");V.setAttribute("size","7");V.style.textAlign="right";M.appendChild(V);mxUtils.write(M," in");S.style.display="none";M.style.display="none";for(var d={},f=PageSetupDialog.getFormats(),l=0;l<f.length;l++){var u=f[l];d[u.key]=u;var A=document.createElement("option");
A.setAttribute("value",u.key);mxUtils.write(A,u.title);K.appendChild(A)}var B=!1;y();b.appendChild(K);mxUtils.br(b);b.appendChild(S);b.appendChild(M);var F=g,L=function(O,H){O=d[K.value];null!=O.format?(R.value=O.format.width/100,V.value=O.format.height/100,M.style.display="none",S.style.display=""):(S.style.display="none",M.style.display="");O=parseFloat(R.value);if(isNaN(O)||0>=O)R.value=g.width/100;O=parseFloat(V.value);if(isNaN(O)||0>=O)V.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100*
parseFloat(R.value)),Math.floor(100*parseFloat(V.value)));"custom"!=K.value&&E.checked&&(O=new mxRectangle(0,0,O.height,O.width));H&&B||O.width==F.width&&O.height==F.height||(F=O,null!=n&&n(F))};mxEvent.addListener(e,"click",function(O){q.checked=!0;L(O);mxEvent.consume(O)});mxEvent.addListener(G,"click",function(O){E.checked=!0;L(O);mxEvent.consume(O)});mxEvent.addListener(R,"blur",L);mxEvent.addListener(R,"click",L);mxEvent.addListener(V,"blur",L);mxEvent.addListener(V,"click",L);mxEvent.addListener(E,
"change",L);mxEvent.addListener(q,"change",L);mxEvent.addListener(K,"change",function(O){B="custom"==K.value;L(O,!0)});L();return{set:function(O){g=O;y(null,null,!0)},get:function(){return F},widthInput:R,heightInput:V}};
var FilenameDialog=function(b,e,g,n,y,q,E,K,S,G,M,R,V){S=null!=S?S:!0;var d=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),u=document.createElement("td");d.style.margin="0 auto";u.style.textOverflow="ellipsis";u.style.whiteSpace="nowrap";u.style.textAlign="right";u.style.maxWidth=(V?V+15:100)+"px";u.style.fontSize="10pt";u.style.width=(V?V:84)+"px";mxUtils.write(u,(y||mxResources.get("filename"))+":");l.appendChild(u);var A=document.createElement("input");
A.setAttribute("value",e||"");A.style.marginLeft="4px";A.style.width=null!=R?R+"px":"180px";var B=mxUtils.button(g,function(){if(null==q||q(A.value))S&&b.hideDialog(),n(A.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=y||null==E)if(null!=M?Editor.selectFilename(A):(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var F=d.parentNode;if(null!=F){var L=null;mxEvent.addListener(F,"dragleave",
function(O){null!=L&&(L.style.backgroundColor="",L=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=A,L.style.backgroundColor="#ebf2f9");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(O.dataTransfer.getData("text/uri-list")),
B.click());O.stopPropagation();O.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(A);l.appendChild(u);if(null!=y||null==E)f.appendChild(l),null!=M&&(u.appendChild(FilenameDialog.createTypeHint(b,A,M)),null!=b.editor.diagramFileTypes&&(l=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+
2;u.style.paddingTop=null!=M?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});R.className="geBtn";null!=K&&(e=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),e.className="geBtn",u.appendChild(e));b.editor.cancelFirst&&u.appendChild(R);mxEvent.addListener(A,"keypress",function(F){13==F.keyCode&&B.click()});u.appendChild(B);b.editor.cancelFirst||u.appendChild(R);
mxGraphView.prototype.validateBackgroundStyles=function(E,K,S){var G=this.graph;E=null!=E?E:1;var M=null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background,R=null!=M&&this.gridColor!=M.toLowerCase()?this.gridColor:"#ffffff",V="none",d="";if(G.isGridEnabled()||G.gridVisible){d=10;mxClient.IS_SVG?(V=unescape(encodeURIComponent(this.createSvgGrid(R,E))),V=window.btoa?btoa(V):Base64.encode(V,!0),V="url(data:image/svg+xml;base64,"+V+")",d=G.gridSize*this.scale*this.gridSteps*
null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=d,G.view.backgroundPageShape.node.style.backgroundImage=V,G.view.backgroundPageShape.node.style.backgroundColor=M,G.view.backgroundPageShape.node.style.borderColor=G.defaultPageBorderColor,G.container.classList.add("geDiagramBackdrop"),E.style.backgroundImage="none",E.style.backgroundColor="",G.container.style.backgroundColor=R?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),
E.style.backgroundPosition=d,E.style.backgroundImage=V,!R||null!=G.background&&G.background!=mxConstants.NONE?E.style.backgroundColor=M:(E.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E,K){for(K=this.graph.gridSize*this.scale*(null!=K?K:1);K<this.minGridSize;)K*=2;for(var S=this.gridSteps*K,G=[],M=1;M<this.gridSteps;M++){var R=M*K;G.push("M 0 "+R+" L "+S+" "+R+" M "+R+" 0 L "+R+" "+S)}return'<svg width="'+S+'" height="'+
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+E,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+K,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.view.scale,M=this.view.translate,R=this.pageFormat,V=G*this.pageScale,d=this.view.getBackgroundPageBounds();K=d.width;S=d.height;var f=new mxRectangle(G*
M.x,G*M.y,R.width*V,R.height*V),l=(E=E&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(S/f.height)-1:0,u=E?Math.ceil(K/f.width)-1:0,A=d.x+K,B=d.y+S;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(F){if(null!=F){for(var L=F==this.horizontalPageBreaks?l:u,O=0;O<=L;O++){var H=F==this.horizontalPageBreaks?[new mxPoint(Math.round(d.x),Math.round(d.y+(O+1)*f.height)),new mxPoint(Math.round(A),
Math.round(d.y+(O+1)*f.height))]:[new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(d.y)),new mxPoint(Math.round(d.x+(O+1)*f.width),Math.round(B))];null!=F[O]?(F[O].points=H,F[O].redraw()):(H=new mxPolyline(H,this.pageBreakColor),H.dialect=this.dialect,H.isDashed=this.pageBreakDashed,H.pointerEvents=!1,H.init(this.view.backgroundPane),H.redraw(),F[O]=H)}for(O=L;O<F.length;O++)null!=F[O]&&F[O].destroy();F.splice(L,F.length-L)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,S){for(var G=0;G<K.length;G++){if(this.graph.isTableCell(K[G])||this.graph.isTableRow(K[G]))return!1;if(this.graph.getModel().isVertex(K[G])){var M=this.graph.getCellGeometry(K[G]);if(null!=M&&M.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,S){return this.isConnecting()?
!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,M=this.graph.pageScale,R=G.width*M;G=G.height*M;M=Math.floor(Math.min(0,K)/R);var V=Math.floor(Math.min(0,
S)/G);return new mxRectangle(this.scale*(this.translate.x+M*R),this.scale*(this.translate.y+V*G),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/R)-M)*R,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/G)-V)*G)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
E+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var y=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,K,S,G,M,R){var V=y.apply(this,arguments);null==R||R||mxEvent.addListener(V,"mousedown",function(d){mxEvent.consume(d)});return V};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,K,S){var G=this.graph.model.getParent(E);if(K){var M=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);
M=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(E)&&(null!=M&&M.relative||!this.graph.isContainer(G)||this.graph.isPart(E))}else if(M=q.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))M=G,this.graph.isTable(M)||(M=this.graph.model.getParent(M)),M=!this.graph.selectionCellsHandler.isHandled(M)||this.graph.isCellSelected(M)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&
this.graph.isCellSelected(G);return M};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var K=this.graph.getModel(),S=K.getParent(E),G=this.graph.view.getState(S),M=this.graph.isCellSelected(E);null!=G&&(K.isVertex(S)||K.isEdge(S));){var R=this.graph.isCellSelected(S);M=M||R;if(R||!M&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=K.getParent(S)}return E}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this,y=this.editor.graph;y.lightbox=g;var q=y.getGraphBounds;y.getGraphBounds=function(){var P=q.apply(this,arguments),U=this.backgroundImage;if(null!=U&&null!=U.width&&null!=U.height){var k=this.view.translate,z=this.view.scale;P=mxRectangle.fromRectangle(P);P.add(new mxRectangle((k.x+U.x)*z,(k.y+U.y)*z,U.width*z,U.height*z))}return P};y.useCssTransforms&&(this.lazyZoomDelay=
S="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),G=!1,M=!1;this.setDefaultStyle=function(P){try{y.getModel().isEdge(P)?M=!1:G=!1;var U=y.getCellStyle(P,!1),k=[],z=[],J;for(J in U)k.push(U[J]),z.push(J);y.getModel().isEdge(P)?y.currentEdgeStyle={}:y.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",z,"values",k,"cells",[P],"force",!0));y.getModel().isEdge(P)?M=!0:G=!0}catch(W){this.handleError(W)}};
this.clearDefaultStyle=function(){y.currentEdgeStyle=mxUtils.clone(y.defaultEdgeStyle);y.currentVertexStyle=mxUtils.clone(y.defaultVertexStyle);G=M=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var R=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<R.length;e++)0>mxUtils.indexOf(E,R[e])&&E.push(R[e]);var V="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize",
var F=y.cellEditor.isStopEditingEvent;y.cellEditor.isStopEditingEvent=function(P){return F.apply(this,arguments)||13==P.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P)||mxClient.IS_SF&&mxEvent.isShiftDown(P))};var L=y.isZoomWheelEvent;y.isZoomWheelEvent=function(){return n.isSpaceDown()||L.apply(this,arguments)};var O=!1,H=null,ja=null,da=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&O!=y.cellEditor.isContentEditing()){for(var P=this.toolbar.container.firstChild,
window.setTimeout(function(){null!=n.hoverIcons&&n.hoverIcons.update(y.view.getState(k[k.length-1]))},0));f(k)});this.addListener("styleChanged",mxUtils.bind(this,function(P,U){P=U.getProperty("force");if(this.updateDefaultStyle||P){var k=U.getProperty("cells"),z=P=!1;if(0<k.length)for(var J=0;J<k.length&&(P=y.getModel().isVertex(k[J])||P,!(z=y.getModel().isEdge(k[J])||z)||!P);J++);else z=P=!0;P=P&&!G;z=z&&!M;k=U.getProperty("keys");U=U.getProperty("values");for(J=0;J<k.length;J++){var W=0<=mxUtils.indexOf(R,
EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,n=g.getParent(e[0]),y=g.getParent(n);if(null!=n&&null!=y){for(var q=n.getIndex(e[0]),E=y.getIndex(n),K=null,S=1,G=1,M=0,R=E<y.getChildCount()-1?g.getChildAt(g.getChildAt(y,E+1),q):null;M<e.length-1;){var V=e[++M];null==R||R!=V||null!=K&&S!=K||(K=S,S=0,G++,n=g.getParent(R),R=E+G<y.getChildCount()?g.getChildAt(g.getChildAt(y,E+G),q):null);var d=this.editor.graph.view.getState(V);
if(V==g.getChildAt(n,q+S)&&null!=d&&1==mxUtils.getValue(d.style,"colspan",1)&&1==mxUtils.getValue(d.style,"rowspan",1))S++;else break}M==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};
{willReadFrequently:!0});y.filter="invert(100%) hue-rotate(180deg) saturate(1.3)";g.model.beginUpdate();try{for(var q=0;q<b.length;q++)if(g.model.isEdge(b[q])||g.model.isVertex(b[q])){var E=g.getCurrentCellStyle(b[q]);if(null!=E)for(var K=0;K<e.length;K++)try{var S=E[e[K]];if(null!=S&&"#"==S.charAt(0)){var G=n[S];if(null==G){y.fillStyle=S;y.fillRect(0,0,1,1);var M=y.getImageData(0,0,1,1);G="#"+(16777216|M.data[2]|M.data[1]<<8|M.data[0]<<16).toString(16).substring(1);n[S]=G}g.setCellStyles(e[K],G,
function(){return n.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var y=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))y.apply(this,arguments);else{var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(M.x,M.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
g);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();q.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,M){var R=M.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?E.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(V,d,f){var l=b.getCompositeParent(S.cell);V=b.getCellGeometry(l);for(M.consume();null!=l&&b.model.isVertex(l)&&null!=V&&V.relative;)cell=
l,l=b.model.getParent(cell),V=b.getCellGeometry(l);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(M.getGraphX(),M.getGraphY(),l,mxUtils.bind(this,function(u){f(u);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(u))}),G)}),30)}),mxUtils.bind(this,function(V){this.graph.selectCellsForConnectVertex(V,R,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var M=
G.getProperty("arrow"),R=G.getProperty("direction"),V=G.getProperty("event");M=M.getBoundingClientRect();var d=mxUtils.getOffset(b.container),f=b.container.scrollLeft+M.x-d.x;d=b.container.scrollTop+M.y-d.y;var l=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),u=e.showShapePicker(f,d,l,mxUtils.bind(this,function(A){null!=A&&b.connectVertex(l,R,b.defaultEdgeLength,V,!0,!1,function(B,F,L){L(A);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(A))},
function(B){b.selectCellsForConnectVertex(B)},V,this.hoverIcons)}),R,!0);this.centerShapePicker(u,M,f,d,R);mxUtils.setOpacity(u,30);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=K&&window.clearTimeout(K)}))}};
EditorUi.prototype.createShapePicker=function(b,e,g,n,y,q,E,K,S,G,M){M=null!=M?M:!0;var R=this.editor.graph,V=null;S=null!=S?S:function(l){l=l[0];var u=0,A=0,B=l.geometry;null!=B&&(R.model.isEdge(l)&&(l=B.getTerminalPoint(!1),B=new mxRectangle(0,0,l.x,l.y)),u=B.width/2,A=B.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-u),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-A))};if(null!=E&&0<E.length){var d=this;R=this.editor.graph;V=document.createElement("div");
0,A.x,A.y));null!=A&&u.appendChild(this.sidebar.createVertexTemplateFromCells([l],A.width,A.height,"",!0,!1,null,!1,mxUtils.bind(this,function(B){if(!mxEvent.isShiftDown(B)||null==g&&R.isSelectionEmpty()){var F=R.cloneCell(l);if(null!=n)n(F);else{var L=S([F]);R.model.isEdge(F)?F.geometry.translate(L.x,L.y):(F.geometry.x=L.x,F.geometry.y=L.y);R.model.beginUpdate();try{R.addCell(F),R.model.isVertex(F)&&R.isAutoSizeCell(F)&&R.updateCellSize(F)}finally{R.model.endUpdate()}R.setSelectionCell(F);R.scrollCellToVisible(F);
M&&R.startEditing(F);null!=d.hoverIcons&&d.hoverIcons.update(R.view.getState(F))}}else F=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(l,F);null!=q&&q(B);mxEvent.consume(B)}),25,25,null,null,g))});for(G=0;G<(K?Math.min(E.length,4):E.length);G++)y(E[G]);E=V.offsetTop+V.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<E&&(V.style.top=Math.max(R.container.scrollTop+22,e-E)+"px");E=V.offsetLeft+V.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<E&&(V.style.left=
EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(q){q.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(q){var E=null;if(q.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||q.getSelectionCells();E=q.getExportableCells(q.model.getTopmostCells(E));for(var K={},S=q.createCellLookup(E),G=q.cloneCells(E,null,K),M=new mxGraphModel,R=M.getChildAt(M.getRoot(),
0),V=0;V<G.length;V++){M.add(R,G[V]);var d=q.view.getState(E[V]);if(null!=d){var f=q.getCellGeometry(G[V]);null!=f&&f.relative&&!M.isEdge(E[V])&&null==S[mxObjectIdentity.get(M.getParent(E[V]))]&&(f.offset=null,f.relative=!1,f.x=d.x/d.view.scale-d.view.translate.x,f.y=d.y/d.view.scale-d.view.translate.y)}}q.updateCustomLinks(q.createCellMapping(K,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return E};var g=mxClipboard.paste;mxClipboard.paste=function(q){var E=
"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var M=q(mxUtils.bind(this,function(z){this.actions.get("nextPage").funct();mxEvent.consume(z)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(G.innerText="",mxUtils.write(G,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";M.style.paddingLeft="4px";M.style.paddingRight=
"0px";var V=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(M.style.display="",S.style.display="",G.style.display="inline-block"):(M.style.display="none",S.style.display="none",G.style.display="none");R()});this.editor.addListener("resetGraphView",V);this.editor.addListener("pageSelected",R)}q(mxUtils.bind(this,function(z){this.actions.get("zoomOut").funct();mxEvent.consume(z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");q(mxUtils.bind(this,
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(V=0;V<this.lightboxToolbarActions.length;V++){var F=this.lightboxToolbarActions[V];F.elem=q(F.fn,F.icon,F.tooltip)}if(null!=y.refreshBtn){var L=null==y.refreshBtn.url?null:Graph.sanitizeLink(y.refreshBtn.url);
q(mxUtils.bind(this,function(z){null!=L?window.location.href=L:window.location.reload();mxEvent.consume(z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=y.fullscreenBtn&&window.self!==window.top&&q(mxUtils.bind(this,function(z){y.fullscreenBtn.url?b.openLink(y.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!y.noCloseBtn&&(y.closeBtn&&window.self===window.top||b.lightbox&&
e.cells.length);this.actions.get("group").setEnabled(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0]));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&
(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("copyData").setEnabled(1==e.cells.length);this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("editStyle").setEnabled(1==e.cells.length);this.actions.get("editTooltip").setEnabled(1==
EditorUi.prototype.addSplitHandler=function(b,e,g,n){function y(R){if(null!=E){var V=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));n(Math.max(0,K+(e?V.x-E.x:E.y-V.y)-g));mxEvent.consume(R);K!=M()&&(S=!0,G=null)}}function q(R){y(R);E=K=null}var E=null,K=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var M=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){E=new mxPoint(mxEvent.getClientX(R),
mxEvent.getClientY(R));K=M();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var V=null!=G?G-g:0;G=M();n(V);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})};
EditorUi.prototype.showError=function(b,e,g,n,y,q,E,K,S,G,M,R,V){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),n,y,q,E,R,K,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,M||100+20*e,!0,!1,V);b.init()};EditorUi.prototype.showDialog=function(b,e,g,n,y,q,E,K,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,n,y,q,E,K,S,G);this.dialogs.push(this.dialog)};
0<=K&&K<E.length-3&&(E=E.substring(0,K+3))}catch(M){}try{var S=q.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(G)&&(E=G)}catch(M){}}catch(M){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(y){b(null)})}))["catch"](function(n){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(n){n.text().then(function(y){b(y)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
f=0,37==R?f=-V:38==R?l=-V:39==R?f=V:40==R&&(l=V),B.currentDx+=f*A,B.currentDy+=l*A,B.checkPreview(),B.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=B.first){var F=B.roundLength(B.currentDx/A),L=B.roundLength(B.currentDy/A);B.moveCells(B.cells,F,L);B.reset()}},400))}}}}var g=this,n=this.editor.graph,y=new mxKeyHandler(n),q=y.isEventIgnored;y.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||
mxEvent.isShiftDown(R)?n.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?n.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(R,V,d,f){var l=this.actions.get(d);null!=l&&(d=function(){l.isEnabled()&&l.funct.apply(this,arguments)},V?f?y.bindControlShiftKey(R,d):y.bindControlKey(R,d):f?y.bindShiftKey(R,d):y.bindKey(R,d))});var G=this,M=y.escape;y.escape=function(R){M.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){n.exitGroup()});
!0,"selectNone",!0),y.bindAction(73,!0,"selectVertices",!0),y.bindAction(69,!0,"selectEdges",!0),y.bindAction(69,!0,"editStyle"),y.bindAction(66,!0,"bold"),y.bindAction(66,!0,"toBack",!0),y.bindAction(70,!0,"toFront",!0),y.bindAction(68,!0,"duplicate"),y.bindAction(68,!0,"setAsDefaultStyle",!0),y.bindAction(90,!0,"undo"),y.bindAction(90,!0,"redo",!0),y.bindAction(89,!0,"redo"),y.bindAction(89,!0,"autosize",!0),y.bindAction(88,!0,"cut"),y.bindAction(67,!0,"copy"),y.bindAction(86,!0,"paste"),y.bindAction(71,
!0,"group"),y.bindAction(77,!0,"editData"),y.bindAction(71,!0,"grid",!0),y.bindAction(73,!0,"italic"),y.bindAction(76,!0,"lockUnlock"),y.bindAction(76,!0,"layers",!0),y.bindAction(80,!0,"format",!0),y.bindAction(85,!0,"underline"),y.bindAction(85,!0,"ungroup",!0),y.bindAction(109,!0,"decreaseFontSize",!0),y.bindAction(107,!0,"increaseFontSize",!0),y.bindAction(219,!0,"decreaseFontSize",!0),y.bindAction(221,!0,"increaseFontSize",!0),y.bindAction(190,!0,"superscript"),y.bindAction(188,!0,"subscript"),
y.bindAction(13,!1,"keyPressEnter"),y.bindKey(113,function(){n.isEnabled()&&n.startEditingAtCell()});return y};
arguments[2])}var K=Number(y.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),g);for(var S=e(this)?Object(new this(K)):Array(K),G=0,M;G<K;)M=y[G],S[G]=q?"undefined"===typeof E?q(M,G):q.call(E,M,G):M,G+=1;S.length=K;return S}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
return null!=X?"1"==X.html||"wrap"==X[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var E=null,K=null,S=null,G=null,M=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(X,P){if("mouseDown"==P.getProperty("eventName")&&this.isEnabled()){X=P.getProperty("event");var U=X.getState();P=this.view.scale;if(!mxEvent.isAltDown(X.getEvent())&&null!=U&&(R=this.isCellSelected(U.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(X.getEvent()))){var k=this.selectionCellsHandler.getHandler(U.cell);
this.isEnabled()){X=P.getProperty("event");var U=X.getState();mxEvent.isAltDown(X.getEvent())||mxEvent.isControlDown(P)||mxEvent.isShiftDown(P)||R||null==U||!this.model.isEdge(U.cell)||(E=new mxPoint(X.getGraphX(),X.getGraphY()),M=this.isCellSelected(U.cell),S=U,K=X,null!=U.text&&null!=U.text.boundingBox&&mxUtils.contains(U.text.boundingBox,X.getGraphX(),X.getGraphY())?G=mxEvent.LABEL_HANDLE:(P=this.selectionCellsHandler.getHandler(U.cell),null!=P&&null!=P.bends&&0<P.bends.length&&(G=P.getHandleForEvent(X))))}}));
if(null!=z&&null!=z.bends&&0<z.bends.length){z.redrawHandles();var J=null!=G?G:z.getHandleForEvent(K),W=this.view.getEdgeStyle(U),T=W==mxEdgeStyle.EntityRelation;k=U.absolutePoints;M||(J=G);J!=mxEvent.LABEL_HANDLE&&null!=k&&(J=G,null==J&&(X=new mxRectangle(E.x,E.y),X.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(X,k[0].x,k[0].y)?J=0:mxUtils.contains(X,k[k.length-1].x,k[k.length-1].y)?J=z.bends.length-1:null!=k&&(null==W&&null==J||W==mxEdgeStyle.SegmentConnector||W==mxEdgeStyle.OrthConnector)&&
this.isCellSelected(U.cell)||(this.selectionCellsHandler.handlers.put(U.cell,z),this.selectCellForEvent(U.cell,P.getEvent())):this.isCellSelected(U.cell)||z.destroy());M=!1;E=K=S=G=null}}else if(U=P.getState(),null!=U&&this.isCellEditable(U.cell)){z=null;if(this.model.isEdge(U.cell)&&!this.isCellSelected(U.cell)&&!mxEvent.isAltDown(P.getEvent())&&!mxEvent.isControlDown(P.getEvent())&&!mxEvent.isShiftDown(P.getEvent())){if(X=new mxRectangle(P.getGraphX(),P.getGraphY()),X.grow(mxEdgeHandler.prototype.handleImage.width/
this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(X){return mxEvent.isShiftDown(X.getEvent())&&mxEvent.isAltDown(X.getEvent())?!1:null!=this.currentState&&X.getState()==this.currentState&&2E3<A||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&F.apply(this,arguments)};var L=this.isToggleEvent;this.isToggleEvent=function(X){return L.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(X)};var O=
1;var E=q[0].getAttribute("width"),K=q[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var S=q[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(K)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/E,n=parseFloat(G[3])/K)}var M=q[0].getBBox();0<M.width&&0<M.height&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",M.x+" "+M.y+" "+M.width+" "+M.height),g.getElementsByTagName("svg")[0].setAttribute("width",
M.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",M.height/n))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(q[0]))}}}catch(R){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=g.view.graph.tolerance,q=!0,E=null,K=mxUtils.bind(this,function(M){q=!0;E=new mxPoint(mxEvent.getClientX(M),mxEvent.getClientY(M))}),S=mxUtils.bind(this,function(M){q=q&&null!=E&&Math.abs(E.x-mxEvent.getClientX(M))<y&&Math.abs(E.y-mxEvent.getClientY(M))<y}),G=mxUtils.bind(this,function(M){if(q)for(var R=mxEvent.getSource(M);null!=
R&&R!=n.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,M);break}R=R.parentNode}});mxEvent.addGestureListeners(n.node,K,S,G);mxEvent.addListener(n.node,"click",function(M){mxEvent.consume(M)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var n=mxEvent.getSource(g);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
E?E:!0;K=null!=K?K:!0;var S=this.model;return S.filterDescendants(function(G){return E&&S.isVertex(G)||K&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(E,K,S){E=this.getCellStyle(E).newEdgeStyle;if(null!=E){this.model.beginUpdate();try{var G=JSON.parse(E),M;for(M in G)this.setCellStyles(M,G[M],K),"edgeStyle"==M&&"elbowEdgeStyle"==G[M]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",K)}finally{this.model.endUpdate()}}};
Graph.prototype.getCommonStyle=function(E){for(var K={},S=0;S<E.length;S++){var G=this.view.getState(E[S]);null!=G&&this.mergeStyle(G.style,K,0==S)}return K};Graph.prototype.mergeStyle=function(E,K,S){if(null!=E){var G={},M;for(M in E){var R=E[M];null!=R&&(G[M]=!0,null==K[M]&&S?K[M]=R:K[M]!=R&&delete K[M])}for(M in K)G[M]||delete K[M]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||
function(E,K,S,G){null!=E&&(G||(S=null!=S?S:Graph.pasteStyles,Graph.removeKeys(E,function(M){return 0>mxUtils.indexOf(S,M)})),this.updateCellStyles(E,K))};Graph.prototype.updateCellStyles=function(E,K){this.model.beginUpdate();try{for(var S=0;S<K.length;S++)if(this.model.isVertex(K[S])||this.model.isEdge(K[S])){var G=this.getCellStyle(K[S],!1),M=G[mxConstants.STYLE_PERIMETER],R=!1;for(d in E){var V=E[d];if(G[d]!=V){if(d==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[d]&&"umlLifeline"!=V){R=!0;var d="participant"}this.setCellStyles(d,
V,[K[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,M,[K[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(E,K,S,G,M,R){this.useCssTransforms&&
(E=E/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,K,S,G,M,R){G=null!=G?G:!0;M=null!=M?M:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var V=this.model.getChildCount(S)-1;0<=V;V--){var d=this.model.getChildAt(S,V),f=this.getScaledCellAt(E,K,d,G,M,R);if(null!=f)return f;if(this.isCellVisible(d)&&(M&&this.model.isEdge(d)||
K=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var K=new mxDictionary,S=[],G=0;G<E.length;G++){var M=this.getCompositeParent(E[G]);this.isTableCell(M)&&(M=this.graph.model.getParent(M));this.isTableRow(M)&&(M=this.graph.model.getParent(M));null==M||K.get(M)||(K.put(M,!0),S.push(M))}return S};Graph.prototype.getReferenceTerminal=
this.graph.currentTranslate);y.apply(this,arguments);E&&(this.scale=K,this.translate=S)};var q=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,K,S){var G=this.useCssTransforms,M=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);q.apply(this,arguments);G&&(this.view.scale=M,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),n=b.segments,y=b.length,q=g.length;return{execute:mxUtils.bind(this,function(E,K){if(null!=b.shape){var S=[g[0]];K=E/K;e||(K=1-K);for(var G=y*K,M=1;M<q;M++)if(G<=n[M-1]){S.push(new mxPoint(g[M-1].x+(g[M].x-g[M-1].x)*G/n[M-1],g[M-1].y+(g[M].y-g[M-1].y)*G/n[M-1]));break}else G-=n[M-1],S.push(g[M]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var K=g?"getUTC":"get",S=b[K+"Date"](),G=b[K+"Day"](),M=b[K+"Month"](),R=b[K+"FullYear"](),V=b[K+"Hours"](),d=b[K+"Minutes"](),f=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var l=g?0:b.getTimezoneOffset(),u={d:S,dd:E(S),ddd:n.i18n.dayNames[G],dddd:n.i18n.dayNames[G+7],m:M+1,mm:E(M+1),mmm:n.i18n.monthNames[M],mmmm:n.i18n.monthNames[M+
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var n=this.getModel(),y=n.getChildCount(n.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function K(){n.isVisible(E)?(M.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(M.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[S]));var M=document.createElement("img");M.setAttribute("draggable","false");M.setAttribute("align","absmiddle");M.setAttribute("border","0");M.style.position="relative";M.style.width="16px";M.style.padding="0px 6px 0 4px";e&&(M.style.filter="invert(100%)",M.style.top="-2px");G.appendChild(M);mxUtils.write(G,S);g.appendChild(G);
Graph.prototype.connectVertex=function(b,e,g,n,y,q,E,K){q=q?q:!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),M=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(M.x+=G.geometry.width/2,M.y-=g):e==
mxConstants.DIRECTION_SOUTH?(M.x+=G.geometry.width/2,M.y+=G.geometry.height+g):(M.x=e==mxConstants.DIRECTION_WEST?M.x-g:M.x+(G.geometry.width+g),M.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var V=this.view.translate;G=V.x*g;V=V.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,V=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(M.x+=b.parent.geometry.x,M.y+=b.parent.geometry.y);q=q?null:(new mxRectangle(G+M.x*g,V+M.y*g)).grow(40*g);q=null!=q?
!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||y;A&&("1"!=urlParams.sketch||y)&&(e==mxConstants.DIRECTION_NORTH?M.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?M.y+=b.geometry.height/2:M.x=e==mxConstants.DIRECTION_WEST?M.x-b.geometry.width/2:M.x+b.geometry.width/2);var B=[],F=f;f=d;y=mxUtils.bind(this,function(L){if(null==E||null!=L||null==f&&S){this.model.beginUpdate();try{if(null==F&&A){var O=this.getAbsoluteParent(null!=L?L:b);O=S?b:this.getCompositeParent(O);F=null!=L?L:this.duplicateCells([O],
!1)[0];null!=L&&this.addCells([F],this.model.getParent(b),null,null,null,!0);var H=this.getCellGeometry(F);null!=H&&(null!=L&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?M.y-=H.height/2:e==mxConstants.DIRECTION_SOUTH?M.y+=H.height/2:M.x=e==mxConstants.DIRECTION_WEST?M.x-H.width/2:M.x+H.width/2),H.x=M.x-H.width/2,H.y=M.y-H.height/2);null!=d?(this.addCells([F],d,null,null,null,!0),f=null):A&&!S&&this.addCells([F],this.getDefaultParent(),null,null,null,!0)}var ja=mxEvent.isControlDown(n)&&
mxEvent.isShiftDown(n)&&A||null==f&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,F,this.createCurrentEdgeStyle());null!=ja&&(B.push(ja),this.applyNewEdgeStyle(b,[ja],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ja,b));if(null==f&&null!=F&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var da=b.parent.getIndex(b);this.model.add(b.parent,F,da)}null==f&&null!=F&&B.push(F);null==F&&null!=ja&&ja.geometry.setTerminalPoint(M,!1);null!=ja&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[ja]))}finally{this.model.endUpdate()}}if(null!=K)K(B);else return B});if(null==E||null!=F||!A||null==f&&S)return y(F);E(G+M.x*g,V+M.y*g,y)};
Graph.prototype.foldCells=function(b,e,g,n,y){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var q=0;q<g.length;q++){var E=this.view.getState(g[q]),K=this.getCellGeometry(g[q]);if(null!=E&&null!=K){var S=0,G=0;if(K.alternateBounds)S=K.width-K.alternateBounds.width,G=K.height-K.alternateBounds.height;else{var M=this.useCssTransforms?1:this.view.scale;
S=Math.round(K.width-E.width/M);G=Math.round(K.height-E.height/M)}if(0!=G||0!=S){var R=this.model.getParent(g[q]),V=this.layoutManager.getLayout(R);null==V?null!=y&&this.isMoveCellsEvent(y,E)&&this.moveSiblings(E,R,S,G):null!=y&&mxEvent.isAltDown(y)||V.constructor!=mxStackLayout||V.resizeLast||this.resizeParentStacks(R,V,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,S,G){if(null!=g){var M=new mxRectangle(S,G,K.clientWidth,K.clientHeight);mxUtils.intersects(M,g)&&(K==this.arrowUp?G-=M.y+M.height-g.y:K==this.arrowRight?S+=g.x+g.width-M.x:K==this.arrowDown?G+=g.y+g.height-M.y:K==this.arrowLeft&&(S-=M.x+M.width-g.x))}K.style.left=S+"px";K.style.top=G+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
Graph.prototype.visitTableCells=function(b,e){var g=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<n.length;y++){for(var q=this.getActualStartSize(n[y],!0),E=this.model.getChildCells(n[y],!0),K=this.getCellStyle(n[y],!0),S=null,G=[],M=0;M<E.length;M++){var R=this.getCellGeometry(E[M]),V={cell:E[M],rospan:1,colspan:1,row:y,col:M,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;V.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+q.x),R.height+(null!=g&&null!=
g[0]?g[0].point.y:b.y+q.y));V.actual=V;null!=g&&null!=g[M]&&1<g[M].rowspan?(V.rowspan=g[M].rowspan-1,V.colspan=g[M].colspan,V.actual=g[M].actual):null!=S&&1<S.colspan?(V.rowspan=S.rowspan,V.colspan=S.colspan-1,V.actual=S.actual):(S=this.getCurrentCellStyle(E[M],!0),null!=S&&(V.rowspan=parseInt(S.rowspan||1),V.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(V,E.length,
Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var n=this.getModel();n.beginUpdate();try{var y=this.getCellGeometry(b);if(null!=y){y=y.clone();y.height+=e;n.setGeometry(b,y);var q=n.getParent(b),E=n.getChildCells(q,!0);if(!g){var K=mxUtils.indexOf(E,b);if(K<E.length-1){var S=E[K+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,n.setGeometry(S,G))}}var M=this.getCellGeometry(q);null!=M&&(g||(g=b==E[E.length-1]),g&&(M=M.clone(),M.height+=e,n.setGeometry(q,M)))}}finally{n.endUpdate()}};
Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var n=this.getModel(),y=n.getParent(b),q=n.getParent(y),E=n.getChildCells(y,!0);b=mxUtils.indexOf(E,b);var K=b==E.length-1;n.beginUpdate();try{for(var S=n.getChildCells(q,!0),G=0;G<S.length;G++){y=S[G];E=n.getChildCells(y,!0);var M=E[b],R=this.getCellGeometry(M);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),n.setGeometry(M,R));b<E.length-1&&(M=E[b+1],R=this.getCellGeometry(M),null!=R&&(R=R.clone(),
R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),n.setGeometry(M,R)))}if(K||g){var V=this.getCellGeometry(q);null!=V&&(V=V.clone(),V.width+=e,n.setGeometry(q,V))}null!=this.layoutManager&&this.layoutManager.executeLayout(q)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),y="1"==mxUtils.getValue(n,"resizeLastRow","0"),q="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),K=0;E.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,M=E.getChildCells(b,!0),R=0;R<M.length;R++)E.setVisible(M[R],!0);var V=this.getSize(M,!1);if(0<S&&0<G&&0<
M.length&&0<V){if(y){var d=this.graph.getCellGeometry(M[M.length-1]);null!=d&&(d=d.clone(),d.height=S-V+d.height,E.setGeometry(M[M.length-1],d))}var f=q?null:this.getRowLayout(M[0],G),l=[],u=e.y;for(R=0;R<M.length;R++)d=this.graph.getCellGeometry(M[R]),null!=d&&(d=d.clone(),d.x=e.x,d.width=G,d.y=Math.round(u),u=y||n?u+d.height:u+d.height/V*S,d.height=Math.round(u)-d.y,E.setGeometry(M[R],d)),K=Math.max(K,this.layoutRow(M[R],f,d.height,G,l));n&&S<V&&(g=g.clone(),g.height=u+e.height,E.setGeometry(b,
g));q&&G<K+Graph.minTableColumnWidth&&(g=g.clone(),g.width=K+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(A){E.setVisible(A.cell,A.actual.cell==A.cell);if(A.actual.cell!=A.cell){if(A.actual.row==A.row){var B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo;A.actual.geo.width+=B.width}A.actual.col==A.col&&(B=null!=A.geo.alternateBounds?A.geo.alternateBounds:A.geo,A.actual.geo.height+=B.height)}}))}else for(R=0;R<M.length;R++)E.setVisible(M[R],
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(M,R){R=null!=R?R:!0;var V=this.getState(M);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&!V.invalid&&this.updateLineJumps(V)&&this.graph.cellRenderer.redraw(V,!1,this.isRendering());V=e.apply(this,
arguments);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(V);return V};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var M=this.node.getElementsByTagName("path");if(1<M.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&M[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var R=this.state.view.graph.getFlowAnimationStyle();null!=R&&M[1].setAttribute("class",R.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(M,R){return n.apply(this,arguments)||null!=M.routedPoints&&null!=R.routedPoints&&!mxUtils.equalPoints(R.routedPoints,M.routedPoints)};var y=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(M){y.apply(this,arguments);this.graph.model.isEdge(M.cell)&&1!=M.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(M)};mxGraphView.prototype.updateLineJumps=function(M){var R=M.absolutePoints;if(Graph.lineJumpsEnabled){var V=null!=M.routedPoints,d=null;if(null!=R&&null!=this.validEdges&&"none"!==mxUtils.getValue(M.style,"jumpStyle","none")){var f=function(ia,ma,aa){var la=new mxPoint(ma,aa);la.type=ia;d.push(la);la=null!=M.routedPoints?M.routedPoints[d.length-1]:null;return null==la||
la.type!=ia||la.x!=ma||la.y!=aa},l=.5*this.scale;V=!1;d=[];for(var u=0;u<R.length-1;u++){for(var A=R[u+1],B=R[u],F=[],L=R[u+2];u<R.length-2&&mxUtils.ptSegDistSq(B.x,B.y,L.x,L.y,A.x,A.y)<1*this.scale*this.scale;)A=L,u++,L=R[u+2];V=f(0,B.x,B.y)||V;for(var O=0;O<this.validEdges.length;O++){var H=this.validEdges[O],ja=H.absolutePoints;if(null!=ja&&mxUtils.intersects(M,H)&&"1"!=H.style.noJump)for(H=0;H<ja.length-1;H++){var da=ja[H+1],ca=ja[H];for(L=ja[H+2];H<ja.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,
L.x,L.y,da.x,da.y)<1*this.scale*this.scale;)da=L,H++,L=ja[H+2];L=mxUtils.intersection(B.x,B.y,A.x,A.y,ca.x,ca.y,da.x,da.y);if(null!=L&&(Math.abs(L.x-B.x)>l||Math.abs(L.y-B.y)>l)&&(Math.abs(L.x-A.x)>l||Math.abs(L.y-A.y)>l)){da=L.x-B.x;ca=L.y-B.y;L={distSq:da*da+ca*ca,x:L.x,y:L.y};for(da=0;da<F.length;da++)if(F[da].distSq>L.distSq){F.splice(da,0,L);L=null;break}null==L||0!=F.length&&F[F.length-1].x===L.x&&F[F.length-1].y===L.y||F.push(L)}}}for(H=0;H<F.length;H++)V=f(1,F[H].x,F[H].y)||V}L=R[R.length-
1];V=f(0,L.x,L.y)||V}M.routedPoints=d;return V}return!1};var q=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(M,R,V){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)q.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-
2)/2+this.strokewidth,l=mxUtils.getValue(this.style,"jumpStyle","none"),u=!0,A=null,B=null,F=[],L=null;M.begin();for(var O=0;O<this.state.routedPoints.length;O++){var H=this.state.routedPoints[O],ja=new mxPoint(H.x/this.scale,H.y/this.scale);0==O?ja=R[0]:O==this.state.routedPoints.length-1&&(ja=R[R.length-1]);var da=!1;if(null!=A&&1==H.type){var ca=this.state.routedPoints[O+1];H=ca.x/this.scale-ja.x;ca=ca.y/this.scale-ja.y;H=H*H+ca*ca;null==L&&(L=new mxPoint(ja.x-A.x,ja.y-A.y),B=Math.sqrt(L.x*L.x+
L.y*L.y),0<B?(L.x=L.x*f/B,L.y=L.y*f/B):L=null);H>f*f&&0<B&&(H=A.x-ja.x,ca=A.y-ja.y,H=H*H+ca*ca,H>f*f&&(da=new mxPoint(ja.x-L.x,ja.y-L.y),H=new mxPoint(ja.x+L.x,ja.y+L.y),F.push(da),this.addPoints(M,F,V,d,!1,null,u),F=0>Math.round(L.x)||0==Math.round(L.x)&&0>=Math.round(L.y)?1:-1,u=!1,"sharp"==l?(M.lineTo(da.x-L.y*F,da.y+L.x*F),M.lineTo(H.x-L.y*F,H.y+L.x*F),M.lineTo(H.x,H.y)):"line"==l?(M.moveTo(da.x+L.y*F,da.y-L.x*F),M.lineTo(da.x-L.y*F,da.y+L.x*F),M.moveTo(H.x-L.y*F,H.y+L.x*F),M.lineTo(H.x+L.y*F,
H.y-L.x*F),M.moveTo(H.x,H.y)):"arc"==l?(F*=1.3,M.curveTo(da.x-L.y*F,da.y+L.x*F,H.x-L.y*F,H.y+L.x*F,H.x,H.y)):(M.moveTo(H.x,H.y),u=!0),F=[H],da=!0))}else L=null;da||(F.push(ja),A=ja)}this.addPoints(M,F,V,d,!1,null,u);M.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(M,R,V,d){return null!=R&&"centerPerimeter"==R.style[mxConstants.STYLE_PERIMETER]?new mxPoint(R.getCenterX(),R.getCenterY()):E.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(M,R,V,d){if(null==R||null==M||"1"!=R.style.snapToPoint&&"1"!=M.style.snapToPoint)K.apply(this,arguments);else{R=this.getTerminalPort(M,R,d);var f=this.getNextPoint(M,V,d),l=this.graph.isOrthogonal(M),u=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),A=new mxPoint(R.getCenterX(),R.getCenterY());if(0!=u){var B=Math.cos(-u),F=Math.sin(-u);f=mxUtils.getRotatedPoint(f,B,F,A)}B=parseFloat(M.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);B+=parseFloat(M.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==u&&l,B);0!=u&&(B=Math.cos(u),F=Math.sin(u),f=mxUtils.getRotatedPoint(f,B,F,A));M.setAbsoluteTerminalPoint(this.snapToAnchorPoint(M,R,V,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(M,R,V,d,f){if(null!=R&&null!=M){M=this.graph.getAllConnectionConstraints(R);d=V=null;if(null!=M)for(var l=0;l<M.length;l++){var u=this.graph.getConnectionPoint(R,
M[l]);if(null!=u){var A=(u.x-f.x)*(u.x-f.x)+(u.y-f.y)*(u.y-f.y);if(null==d||A<d)V=u,d=A}}null!=V&&(f=V)}return f};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(M,R,V){var d=S.apply(this,arguments);"1"==M.getAttribute("placeholders")&&null!=V.state&&(d=V.state.view.graph.replacePlaceholders(V.state.cell,d));return d};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(M){if(null!=M.style&&"undefined"!==typeof pako){var R=
mxUtils.getValue(M.style,mxConstants.STYLE_SHAPE,null);if(null!=R&&"string"===typeof R&&"stencil("==R.substring(0,8))try{var V=R.substring(8,R.length-1),d=mxUtils.parseXml(Graph.decompress(V));return new mxShape(new mxStencil(d.documentElement))}catch(f){null!=window.console&&console.log("Error in shape: "+f)}}return G.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(v){return null!=v&&S.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellMovable(this.model.getParent(v)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(v){var N=this.model.getParent(v);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==N||!this.isTable(N))};var M=Graph.prototype.splitEdge;
Graph.prototype.splitEdge=function(v,N,Q,Y,ea,ka,oa,wa){null==wa&&(wa=this.model.getParent(v),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=M.apply(this,[v,N,Q,Y,ea,ka,oa,wa]);this.model.setValue(Q,"");var sa=this.getChildCells(Q,!0);for(N=0;N<sa.length;N++){var ua=this.getCellGeometry(sa[N]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(sa[N])}var Fa=this.getChildCells(v,!0);for(N=0;N<Fa.length;N++)ua=this.getCellGeometry(Fa[N]),
wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(v,N){if(null!=this.textarea)if(v=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=v){var Q=v.view.scale;this.bounds=mxRectangle.fromRectangle(v);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=
Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(v,N){if("0"==mxUtils.getValue(v.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var Q=this.graph.getEditingValue(v.cell,N);"1"==mxUtils.getValue(v.style,"nl2Br",
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function R(){mxShape.call(this)}
function V(){mxShape.call(this)}function d(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function f(){mxActor.call(this)}function l(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");
c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.close(),c.fill()),c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.end(),c.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(M,G);mxCellRenderer.registerShape("note2",M);M.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=
this.scale,0,0,0):null};M.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(L,mxActor);L.prototype.size=.2;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,x,p,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,t)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",L);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,
new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",ma.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,m,x,p){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),C=t?L.prototype.fixedSize:L.prototype.size;null!=m&&(C=mxUtils.getValue(m.style,"size",C));t&&(C*=m.view.scale);var D=c.x,fa=c.y,I=c.width,va=c.height;m=null!=m?mxUtils.getValue(m.style,
"size",G.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[hb(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,
!0,aa.prototype.fixedSize),hexagon:gb(la.prototype.size,!0,.5,!0,la.prototype.fixedSize),curlyBracket:gb(H.prototype.size,!1),display:gb(Sa.prototype.size,!1),cube:ub(1,n.prototype.size,!1),card:ub(.5,A.prototype.size,!0),loopLimit:ub(.5,v.prototype.size,!0),trapezoid:tb(.5,O.prototype.size,O.prototype.fixedSize),parallelogram:tb(1,L.prototype.size,L.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=Ab;var Db=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
.25),!1)];L.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;F.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),
Actions.prototype.init=function(){function b(G){q.escape();G=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),G);null!=G&&q.setSelectionCells(G)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),M=0;M<G.length;M++)q.cellLabelChanged(G[M],"")}finally{q.getModel().endUpdate()}}}function g(G,M,R,V,d){d.getModel().beginUpdate();try{var f=d.getCellGeometry(G);null!=f&&R&&V&&(R/=V,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,d.getModel().setGeometry(G,
f));d.setCellStyles(mxConstants.STYLE_CLIP_PATH,M,[G]);d.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{d.getModel().endUpdate()}}var n=this.editorUi,y=n.editor,q=y.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&q.isEnabled()};this.addAction("new...",function(){q.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),
function(){q.popupMenuHandler.hideMenu();var G=q.view.scale,M=q.container.scrollLeft,R=q.container.scrollTop,V=q.view.translate.x,d=q.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(G-q.view.scale)&&5>Math.abs(M-q.container.scrollLeft)&&5>Math.abs(R-q.container.scrollTop)&&V==q.view.translate.x&&d==q.view.translate.y&&n.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){q.isEnabled()&&(q.isSelectionEmpty()?n.actions.get("smartFit").funct():
q.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,M){try{var R=mxUtils.parseXml(G);y.graph.setSelectionCells(y.graph.importGraphModel(R.documentElement))}catch(V){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+V.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null!=G&&q.removeCells(G,!1)}catch(M){}try{null==G&&mxClipboard.cut(q)}catch(M){n.handleError(M)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(G){}try{mxClipboard.copy(q)}catch(G){n.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(M){if(null!=M){q.getModel().beginUpdate();
try{n.pasteXml(M,!0)}finally{q.getModel().endUpdate()}}else mxClipboard.paste(q)}),G=!0)}catch(M){}G||mxClipboard.paste(q)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function M(V){if(null!=V){for(var d=!0,f=0;f<V.length&&d;f++)d=d&&q.model.isEdge(V[f]);var l=q.view.translate;f=q.view.scale;var u=l.x,A=l.y;l=null;if(1==V.length&&d){var B=q.getCellGeometry(V[0]);null!=B&&(l=B.getTerminalPoint(!0))}l=null!=l?l:q.getBoundingBoxFromGeometry(V,d);null!=l&&(d=Math.round(q.snap(q.popupMenuHandler.triggerX/
f-u)),f=Math.round(q.snap(q.popupMenuHandler.triggerY/f-A)),q.cellsMoved(V,d-l.x,f-l.y))}}function R(){q.getModel().beginUpdate();try{M(mxClipboard.paste(q))}finally{q.getModel().endUpdate()}}if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(V){if(null!=V){q.getModel().beginUpdate();try{M(n.pasteXml(V,!0))}finally{q.getModel().endUpdate()}}else R()}),G=!0)}catch(V){}G||R()}});this.addAction("swap",function(){var G=
q.getSelectionCells(),M=q.getModel();if(2==G.length&&M.isVertex(G[0])&&M.isVertex(G[1])&&2==q.getMovableCells(G).length){var R=q.getCellGeometry(G[0]),V=q.getCellGeometry(G[1]);if(null!=R&&null!=V){R=R.clone();V=V.clone();M.beginUpdate();try{M.setGeometry(G[0],V),M.setGeometry(G[1],R)}finally{M.endUpdate()}}}});this.addAction("copySize",function(){var G=q.getSelectionCell();q.isEnabled()&&null!=G&&q.getModel().isVertex(G)&&(G=q.getCellGeometry(G),null!=G&&(n.copiedSize=new mxRectangle(G.x,G.y,G.width,
G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedSize){q.getModel().beginUpdate();try{for(var G=q.getResizableCells(q.getSelectionCells()),M=0;M<G.length;M++)if(q.getModel().isVertex(G[M])){var R=q.getCellGeometry(G[M]);null!=R&&(R=R.clone(),R.width=n.copiedSize.width,R.height=n.copiedSize.height,q.getModel().setGeometry(G[M],R))}}finally{q.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",
function(){var G=q.getSelectionCell()||q.getModel().getRoot();q.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(n.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(G,M){function R(f,l){var u=V.getValue(f);l=f.cloneValue(l);l.removeAttribute("placeholders");null==u||isNaN(u.nodeType)||l.setAttribute("placeholders",u.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||l.setAttribute("label",q.convertValueToString(f));V.setValue(f,l)}G=null!=
M?M:G;var V=q.getModel();if(q.isEnabled()&&!q.isSelectionEmpty()&&null!=n.copiedValue){V.beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());if(0==d.length)R(V.getRoot(),n.copiedValue);else for(M=0;M<d.length;M++)R(d[M],n.copiedValue)}finally{V.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,M){G=null!=M?M:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",
G.colspan,[G.mergeCell])}finally{q.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=n.getSelectionState();if(0<G.cells.length){q.getModel().beginUpdate();try{q.setCellStyles("rowspan",null,G.cells),q.setCellStyles("colspan",null,G.cells)}finally{q.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,M){G=null!=M?M:G;q.turnShapes(q.getResizableCells(q.getSelectionCells()),
!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){q.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),M=q.getCurrentCellStyle(q.getSelectionCell()),R=1==mxUtils.getValue(M,mxConstants.STYLE_EDITABLE,1)?0:1;q.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);q.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);q.setCellStyles(mxConstants.STYLE_ROTATABLE,R,
mxUtils.sortCells(q.getSelectionCells(),!0);1!=G.length||q.isTable(G[0])||q.isTableRow(G[0])?(G=q.getCellsForGroup(G),1<G.length&&q.setSelectionCell(q.groupCells(null,0,G))):q.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(q.isEnabled()){var G=q.getEditableCells(q.getSelectionCells());q.model.beginUpdate();try{var M=q.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)q.model.contains(G[R])&&(0==q.model.getChildCount(G[R])&&q.model.isVertex(G[R])&&
q.setCellStyles("container","0",[G[R]]),M.push(G[R]))}finally{q.model.endUpdate()}0<M.length&&q.setSelectionCells(M)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(q.isEnabled()){var G=q.getSelectionCells();if(null!=G){for(var M=[],R=0;R<G.length;R++)q.isTableRow(G[R])||q.isTableCell(G[R])||M.push(G[R]);q.removeCellsFromParent(M)}}});this.addAction("edit",function(){q.isEnabled()&&q.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=
q.getSelectionCell()||q.getModel().getRoot();n.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var M="";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(M=R)}M=new TextareaDialog(n,
mxResources.get("editTooltip")+":",M,function(V){q.setTooltipForCell(G,V)});n.showDialog(M.container,320,200,!0,!0);M.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=q.getLinkForCell(q.getSelectionCell());null!=G&&q.openLink(G)});this.addAction("editLink...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&null!=G&&q.isCellEditable(G)){var M=q.getLinkForCell(G)||"";n.showLinkDialog(M,mxResources.get("apply"),function(R,V,d){R=mxUtils.trim(R);q.setLinkForCell(G,
n.showLinkDialog("",mxResources.get("insert"),function(G,M,R){G=mxUtils.trim(G);if(0<G.length){var V=null,d=q.getLinkTitle(G);null!=M&&0<M.length&&(V=M[0].iconUrl,d=M[0].name||M[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));M=new mxCell(d,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=V?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+V:"spacing=10;"));M.vertex=!0;V=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([M],
!0));M.geometry.x=V.x;M.geometry.y=V.y;q.setAttributeForCell(M,"linkTarget",R);q.setLinkForCell(M,G);q.cellSizeUpdated(M,!0);q.getModel().beginUpdate();try{M=q.addCell(M),q.fireEvent(new mxEventObject("cellsInserted","cells",[M]))}finally{q.getModel().endUpdate()}q.setSelectionCell(M);q.scrollCellToVisible(q.getSelectionCell())}},!0)},null,null,"L")).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var G=q.getSelectedElement(),
M=q.getParentByName(G,"A",q.cellEditor.textarea),R="";if(null==M&&null!=G&&null!=G.getElementsByTagName)for(var V=G.getElementsByTagName("a"),d=0;d<V.length&&null==M;d++)V[d].textContent==G.textContent&&(M=V[d]);null!=M&&"A"==M.nodeName&&(R=M.getAttribute("href")||"",q.selectNode(M));var f=q.cellEditor.saveSelection();n.showLinkDialog(R,mxResources.get("apply"),mxUtils.bind(this,function(l){q.cellEditor.restoreSelection(f);null!=l&&q.insertLink(l)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():
this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var G=q.getSelectionCells();if(null!=G){q.getModel().beginUpdate();try{for(var M=0;M<G.length;M++){var R=G[M];q.getModel().isVertex(R)&&(0<q.getModel().getChildCount(R)?q.updateGroupBounds([R],0,!0):q.updateCellSize(R))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();
var G=q.getCommonStyle(q.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var M=q.getEditableCells(q.getSelectionCells()),R=0;R<M.length;R++)if(state=q.getView().getState(M[R]),null!=state){var V=mxUtils.getValue(state.style,"html","0");if("1"==V&&null==G)q.removeTextStyleForCell(state.cell),q.setCellStyles("html",G,[M[R]]);else if("0"==V&&"1"==G){var d=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,
"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>"));q.cellLabelChanged(state.cell,Graph.sanitizeHtml(d));q.setCellStyles("html",G,[M[R]])}}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=G?G:"0"],"cells",M))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=q.getView().getState(q.getSelectionCell()),M="wrap";q.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(M=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,M)});this.addAction("rotation",
function(){var G="0",M=q.getView().getState(q.getSelectionCell());null!=M&&(G=M.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(n,G,mxResources.get("apply"),function(R){null!=R&&0<R.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){q.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){q.isFastZoomEnabled()?
mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&0<M&&q.zoomTo(M/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*q.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(M){M=parseInt(M);!isNaN(M)&&0<M&&(M=new ChangePageSetup(n,null,null,null,M/100),M.ignoreColor=!0,M.ignoreImage=!0,q.model.execute(M))}),
"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));K=mxUtils.bind(this,function(G,M,R,V){return this.addAction(G,function(){if(null!=R&&q.cellEditor.isContentEditing())R();else{q.stopEditing(!1);q.getModel().beginUpdate();try{var d=q.getEditableCells(q.getSelectionCells());q.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,M,d);(M&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?q.updateLabelElements(d,function(l){l.style.fontWeight=null;"B"==l.nodeName&&q.replaceElement(l)}):(M&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?q.updateLabelElements(d,function(l){l.style.fontStyle=null;"I"==l.nodeName&&q.replaceElement(l)}):(M&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.updateLabelElements(d,function(l){l.style.textDecoration=null;"U"==l.nodeName&&q.replaceElement(l)});for(var f=0;f<d.length;f++)0==q.model.getChildCount(d[f])&&q.autoSizeCell(d[f],
!q.isSelectionEmpty()&&!q.isEditing()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),M=0;M<G.length;M++)q.removeTextStyleForCell(G[M],!0)}finally{q.getModel().endUpdate()}}});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){q.getModel().beginUpdate();try{q.setCellStyles(mxConstants.STYLE_DASHED,null),q.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
"values",["1","0"],"cells",q.getSelectionCells()))}finally{q.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!q.isSelectionEmpty()&&q.isEnabled()){q.getModel().beginUpdate();try{var G=q.getSelectionCells(),M=q.getCurrentCellStyle(G[0]),R="1"==mxUtils.getValue(M,mxConstants.STYLE_ROUNDED,"0")?"0":"1";q.setCellStyles(mxConstants.STYLE_ROUNDED,R);q.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
M="1";null!=G&&null!=q.getFoldingImage(G)&&(M="0");q.setCellStyles("collapsible",M);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[M],"cells",q.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var G=q.getEditableCells(q.getSelectionCells());if(null!=G&&0<G.length){var M=q.getModel();M=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",M.getStyle(G[0])||"",function(R){null!=R&&q.setCellStyle(mxUtils.trim(R),G)},null,null,
400,220);this.editorUi.showDialog(M.container,420,300,!0,!0);M.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&n.setDefaultStyle(q.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){q.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=q.getSelectionCell();if(null!=G&&q.getModel().isEdge(G)){var M=y.graph.selectionCellsHandler.getHandler(G);
if(M instanceof mxEdgeHandler){var R=q.view.translate,V=q.view.scale,d=R.x;R=R.y;G=q.getModel().getParent(G);for(var f=q.getCellGeometry(G);q.getModel().isVertex(G)&&null!=f;)d+=f.x,R+=f.y,G=q.getModel().getParent(G),f=q.getCellGeometry(G);d=Math.round(q.snap(q.popupMenuHandler.triggerX/V-d));V=Math.round(q.snap(q.popupMenuHandler.triggerY/V-R));M.addPointAt(M.state,d,V)}}});this.addAction("removeWaypoint",function(){var G=n.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,
G.index)});this.addAction("clearWaypoints",function(G,M){G=null!=M?M:G;var R=q.getSelectionCells();if(null!=R){R=q.getEditableCells(q.addAllEdges(R));q.getModel().beginUpdate();try{for(var V=0;V<R.length;V++){var d=R[V];if(q.getModel().isEdge(d)){var f=q.getCellGeometry(d);null!=M&&mxEvent.isShiftDown(G)?(q.setCellStyles(mxConstants.STYLE_EXIT_X,null,[d]),q.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[d]),q.setCellStyles(mxConstants.STYLE_ENTRY_Y,
mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);q.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),q.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",M=q.getView().getState(q.getSelectionCell()),R="",V=null;null!=M&&(R=M.style[mxConstants.STYLE_IMAGE]||R,V=M.style[mxConstants.STYLE_CLIP_PATH]||V);var d=
q.cellEditor.saveSelection();n.showImageDialog(G,R,function(f,l,u,A,B,F){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(d),q.insertImage(f,l,u);else{var L=q.getSelectionCells();if(null!=f&&(0<f.length||0<L.length)){var O=null;q.getModel().beginUpdate();try{if(0==L.length){L=[q.insertVertex(q.getDefaultParent(),null,"",0,0,l,u,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(L,!0));
L[0].geometry.x=H.x;L[0].geometry.y=H.y;null!=A&&g(L[0],A,B,F,q);O=L;q.fireEvent(new mxEventObject("cellsInserted","cells",O))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<f.length?f:null,L);var ja=q.getCurrentCellStyle(L[0]);"image"!=ja[mxConstants.STYLE_SHAPE]&&"label"!=ja[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",L):0==f.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,L);null==A&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,L);if(null!=l&&null!=u)for(f=0;f<
L.length;f++){var da=L[f];if("0"!=q.getCurrentCellStyle(da).expand){var ca=q.getModel().getGeometry(da);null!=ca&&(ca=ca.clone(),ca.width=l,ca.height=u,q.getModel().setGeometry(da,ca))}null!=A&&g(da,A,B,F,q)}}finally{q.getModel().endUpdate()}null!=O&&(q.setSelectionCells(O),q.scrollCellToVisible(O[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,V)}}).isEnabled=E;this.addAction("crop...",function(){var G=q.getSelectionCell();if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
null!=G){var M=q.getCurrentCellStyle(G),R=M[mxConstants.STYLE_IMAGE],V=M[mxConstants.STYLE_SHAPE];R&&"image"==V&&(M=new CropImageDialog(n,R,M[mxConstants.STYLE_CLIP_PATH],function(d,f,l){g(G,d,f,l,q)}),n.showDialog(M.container,300,390,!0,!0))}}).isEnabled=E;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
null!=G){var M=new ConnectionPointsDialog(n,G);n.showDialog(M.container,350,450,!0,!1,function(){M.destroy()});M.init()}},null,null,"Alt+Shift+Q").isEnabled=E};Actions.prototype.addAction=function(b,e,g,n,y){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var q=mxResources.get(b)+"..."}else q=mxResources.get(b);return this.put(b,new Action(q,e,g,n,y))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
K[0]),M=this.ui.getHashValueForPages(G,n),R=this.ui.getHashValueForPages(q,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",E,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",M,"current",R,"valid",M==R,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",y);if(null!=M&&M!=R){var V=this.compressReportData(this.getAnonymizedXmlForPages(q)),d=this.compressReportData(this.getAnonymizedXmlForPages(G)),f=this.ui.hashValue(b.getCurrentEtag()),
l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(g,K,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+M+"\nCurrent: "+R+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+f+"\nTo: "+l+"\n\nFile Data:\n"+V+"\nPatched Shadow:\n"+d,null,"mergeFile",M,R,b.getCurrentRevisionId())}else{if(null!=this.sync){var u=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null,null,y);null==u||mxUtils.isEmptyObject(u)||K.push(u)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:
null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(F);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var A=this.getCurrentUser(),B=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,F)}}catch(L){}}}else throw Error(mxResources.get("notADiagramFile"));
25E3);this.sendErrorReport("Checksum Error in "+y+" "+this.getHash(),(null!=g?g:"")+"\n\nPatches:\n"+u+(null!=l?"\n\nRemote:\n"+l:""),null,7E4)});null==n?G(null):this.getLatestVersion(mxUtils.bind(this,function(l){null!=l&&l.getCurrentEtag()==n?G(l):G(null)}),function(){})}else{var M=this.getCurrentUser(),R=null!=M?M.id:"unknown",V=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(e).length,f=null;if(null!=e&&this.constructor==DriveFile&&400>d){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
DrawioFile.prototype.sendErrorReport=function(b,e,g,n){try{var y=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),q=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),K=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),M=G.lastIndexOf(".");E="xml";0<M&&(E=G.substring(M));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
DrawioFile.prototype.patch=function(b,e,g,n){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),E=y.indexOfNextAdd,K=this.ui.editor.graph;K.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=K.foldingEnabled,M=K.mathEnabled,R=K.cellRenderer.redraw;K.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());R.apply(this,arguments)};K.model.beginUpdate();
this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{K.container.style.visibility="";K.model.endUpdate();K.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(y.history=q,y.indexOfNextAdd=E,y.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)M!=K.mathEnabled?(this.ui.editor.updateGraphComponents(),K.refresh()):(G!=K.foldingEnabled?K.view.revalidate():
this.inConflictState=!0;this.descriptorChanged();null!=n&&n(G);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,G);else{var K=this.getCurrentUser(),S=null!=K?K.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}}catch(M){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=n&&n(G)}};
LocalFile.prototype.saveFile=function(b,e,g,n,y){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;y||this.updateFileData();var q=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),S=mxUtils.bind(this,function(G){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var M=mxUtils.bind(this,
function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){try{var l=this.desc;this.savingFile=!1;this.desc=f;this.fileSaved(E,l,K,M);this.removeDraft()}catch(u){M(u)}}),M)}),M)}),M):(this.inConflictState=!0,M())}),mxUtils.bind(this,function(d){this.invalidFileHandle=!0;M(d)}))}),M)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(G,b,q?"image/png":"text/xml",q);else if(G.length<MAX_REQUEST_SIZE){var R=b.lastIndexOf(".");R=0<R?b.substring(R+1):"xml";
mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,z){var J=null;null!=k.editor.graph.getModel().getParent(z)?J=z.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 M=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
"1"==urlParams.embed||this.editorUi.editor.chromeless?M.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.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 z=this.editorUi,J=z.editor.graph;if(J.isEnabled()){var W=z.getCurrentFile();null!=W&&W.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
k&&null!=k.src){var J=Graph.getSvgFromDataUri(k.src);if(null!=J)try{var W=(new DOMParser).parseFromString(J,"text/xml"),T=W.getElementsByTagName("style");for(J=0;J<T.length;J++)if(T[J].innerHTML==Graph.svgDarkModeCss){T[J].parentNode.removeChild(T[J]);break}if("dark"==z||"auto"==z){var Z=Graph.createSvgDarkModeStyle(W,z);W.getElementsByTagName("defs")[0].appendChild(Z)}k=new mxImage(Editor.createSvgDataUri(mxUtils.getXml(W.documentElement)),k.width,k.height,k.x,k.y)}catch(ba){}}return k};var L=Graph.prototype.getSvg;
this.refresh());var Pa=null;Editor.enableCssDarkMode&&null!=this.backgroundImage&&(Pa=this.backgroundImage,this.backgroundImage=this.adaptBackgroundPage(Pa,xa));var ta=L.apply(this,arguments);if(Editor.enableCssDarkMode&&("dark"==xa||"auto"==xa)){var Da=Graph.createSvgDarkModeStyle(ta.ownerDocument,xa);ta.getElementsByTagName("defs")[0].appendChild(Da)}var Aa=this.getCustomFonts();if(pa&&0<Aa.length){var ya=ta.ownerDocument;Da=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,n){n.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="21.6.3";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
"")+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=A.stack?"&stack="+encodeURIComponent(A.stack):""))}catch(L){}try{F||null==window.console||console.error(B,d,f,l,u,A)}catch(L){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?
!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,f,l){var u=null==d||null==f;l=null!=l?l:24;var A=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=A.spin;A.spin=function(L,O){var H=
!1;this.active||(B.call(this,L),this.active=!0,null!=O&&(u&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,
d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),H.innerHTML=O,L.appendChild(H),A.status=H),this.pause=mxUtils.bind(this,function(){var ja=function(){};this.active&&(ja=mxUtils.bind(this,function(){this.spin(L,O)}));
[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=l)for(A=0;A<l.length;A++)f.model.execute(new ChangePage(this,l[A],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,l,u,A,B,F,L,O,H,ja){f=null!=f?f:this.editor.graph;A=null!=A?A:!1;O=null!=O?O:!0;ja=
f,u,null,L,O,da,null,null,l.scale,l.border);return ja};EditorUi.prototype.getXmlFileData=function(d,f,l,u){d=null!=d?d:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var A=this.editor.getGraphXml(d,u);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(O){var H=O.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&l?(H=mxUtils.trim(mxUtils.getTextContent(O)),O=O.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&O.appendChild(mxUtils.parseXml(H).documentElement))):
null==H||l?O=O.cloneNode(!0):(O=O.cloneNode(!1),mxUtils.setTextContent(O,Graph.compressNode(H)));A.appendChild(O)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(A)),A=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],F=B.node;if(B!=this.currentPage)if(B.needsUpdate){var L=new mxCodec(mxUtils.createXmlDocument());L=L.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
L,null,u);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(L));delete B.needsUpdate}else u&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
null!=B.viewState.backgroundImage.originalSrc&&(L=new mxCodec(mxUtils.createXmlDocument()),L=L.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,L,null,u),F=F.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(L))));d(F)}return A};EditorUi.prototype.anonymizeString=function(d,f){for(var l=[],u=0;u<d.length;u++){var A=d.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(A)?l.push(A):isNaN(parseInt(A))?A.toLowerCase()!=A?l.push(String.fromCharCode(65+Math.round(25*
d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var u in d[EditorUi.DIFF_UPDATE]){var A=d[EditorUi.DIFF_UPDATE][u];null!=A.name&&(A.name=this.anonymizeString(A.name));null!=A.cells&&(f=mxUtils.bind(this,function(B){var F=A.cells[B];if(null!=F){for(var L in F)null!=F[L].value&&(F[L].value="["+F[L].value.length+"]"),null!=F[L].xmlValue&&(F[L].xmlValue="["+F[L].xmlValue.length+"]"),null!=F[L].style&&(F[L].style=
"["+F[L].style.length+"]"),mxUtils.isEmptyObject(F[L])&&delete F[L];mxUtils.isEmptyObject(F)&&delete A.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(A.cells)&&delete A.cells);mxUtils.isEmptyObject(A)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&
L,O,H,ja){A=null!=A?A:!0;B=null!=B?B:!1;H=null!=H?H:!Editor.defaultCompressed;var da=this.editor.graph;if(f||!d&&null!=O&&/(\.svg)$/i.test(O.getTitle())){var ca=null!=da.themes&&"darkTheme"==da.defaultThemeName;if(ca||null!=this.pages&&this.currentPage!=this.pages[0]){var ia=da.getGlobalVariable;da=this.createTemporaryGraph(ca?da.getDefaultStylesheet():da.getStylesheet());da.setBackgroundImage=this.editor.graph.setBackgroundImage;da.background=this.editor.graph.background;var ma=null!=this.pages?
d,f,l,u,A,L,H);da!=this.editor.graph&&da.container.parentNode.removeChild(da.container);return d};EditorUi.prototype.getHtml=function(d,f,l,u,A,B){B=null!=B?B:!0;var F=null,L=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var O=f.view.scale;B=Math.floor(F.x/O-f.view.translate.x);O=Math.floor(F.y/O-f.view.translate.y);F=f.background;null==A&&(f=this.getBasenames().join(";"),0<f.length&&(L=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",
(null==A?'<script type="text/javascript" src="'+L+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+A+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,l,u,A){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=A&&(A=A.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
L=F.getChildren(F.root);for(A=0;A<L.length;A++){var O=L[A];F.setVisible(O,f[O.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,l,u,A,B,F,L,O,H,ja,da){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename("remoteSvg"==d?!1:!A),ia=ca+("xml"==d||"pdf"==d&&ja?".drawio":"")+"."+d;if("xml"==d){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,A,null,null,null,f);this.saveData(ia,d,ma,"text/xml")}else if("html"==d)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,
ca),this.saveData(ia,d,ma,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)ia=ca+".png";else if("jpeg"==d)ia=ca+".jpg";else if("remoteSvg"==d){ia=ca+".svg";d="svg";var aa=parseInt(O);"string"===typeof L&&0<L.indexOf("%")&&(L=parseInt(L)/100);if(0<aa){var la=this.editor.graph,X=la.getGraphBounds();var P=Math.ceil(X.width*L/la.view.scale+2*aa);var U=Math.ceil(X.height*L/la.view.scale+2*aa)}}this.saveRequest(ia,d,mxUtils.bind(this,
function(T,Z){try{var ba=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ha=this.createDownloadRequest(T,d,u,Z,F,A,L,O,H,ja,da,P,U);this.editor.graph.pageVisible=ba;return ha}catch(qa){this.handleError(qa)}}))}else{var k=null,z=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ia,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==
function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){d=this.downloadRequestBuilder(d,f,l,u,A,B,F,L,O,H,ja,da,ca);f="";for(var ia in d)l=d[ia],null!=l&&(f+=ia+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){var ia=this.editor.graph,ma=ia.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==B?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var aa=null,la=null,X=null;if(ma.width*ma.height>
steps:ia.view.gridSteps,color:ia.view.gridColor});Graph.translateDiagram&&(A.diagramLanguage=Graph.diagramLanguage);return{format:f,from:aa,to:la,allPages:X,bg:null!=B?B:mxConstants.NONE,base64:u,embedXml:H,xml:l,filename:null!=d?d:"",extras:JSON.stringify(A),scale:F,border:L,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null}};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=
this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){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==d||mxUtils.isEmptyObject(d)||(f=f+"#"+encodeURIComponent(JSON.stringify(d)))}catch(u){}window.location.hash=f}};EditorUi.prototype.loadDescriptor=function(d,f,l){var u=window.location.hash,A=mxUtils.bind(this,function(F){var L=null!=d.data?d.data:"";null!=F&&0<F.length&&
(0<L.length&&(L+="\n"),L+=F);F=new LocalFile(this,"csv"!=d.format&&0<L.length?L:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return u};this.fileLoaded(F);"csv"==d.format&&this.importCsv(L,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var O=null!=d.interval?parseInt(d.interval):6E4,H=null,ja=mxUtils.bind(this,function(){var ca=
d=null!=l?l.documentElement:null,null!=d&&"updates"==d.nodeName)){var A=this.editor.graph,B=A.getModel();B.beginUpdate();var F=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var L=B.getCell(d.getAttribute("id"));if(null!=L){try{var O=d.getAttribute("value");if(null!=O){var H=mxUtils.parseXml(O).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))B.setValue(L,H);else for(var ja=H.attributes,da=0;da<ja.length;da++)A.setAttributeForCell(L,ja[da].nodeName,0<ja[da].nodeValue.length?
ja[da].nodeValue:null)}}catch(U){null!=window.console&&console.log("Error in value for "+L.id+": "+U)}try{var ca=d.getAttribute("style");null!=ca&&A.model.setStyle(L,ca)}catch(U){null!=window.console&&console.log("Error in style for "+L.id+": "+U)}try{var ia=d.getAttribute("icon");if(null!=ia){var ma=0<ia.length?JSON.parse(ia):null;null!=ma&&ma.append||A.removeCellOverlays(L);null!=ma&&A.addCellOverlay(L,f(ma))}}catch(U){null!=window.console&&console.log("Error in icon for "+L.id+": "+U)}try{var aa=
d.getAttribute("geometry");if(null!=aa){aa=JSON.parse(aa);var la=A.getCellGeometry(L);if(null!=la){la=la.clone();for(key in aa){var X=parseFloat(aa[key]);"dx"==key?la.x+=X:"dy"==key?la.y+=X:"dw"==key?la.width+=X:"dh"==key?la.height+=X:la[key]=parseFloat(aa[key])}A.model.setGeometry(L,la)}}}catch(U){null!=window.console&&console.log("Error in icon for "+L.id+": "+U)}}}else if("model"==d.nodeName){for(var P=d.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(new mxCodec(d.firstChild)).decode(P,
f){var l=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var u=l.lastIndexOf(".");0<=u&&(d=l.substring(u),l=l.substring(0,u));if(f){f=l;var A=new Date;l=A.getFullYear();u=A.getMonth()+1;var B=A.getDate(),F=A.getHours(),L=A.getMinutes();A=A.getSeconds();l=f+(" "+(l+"-"+u+"-"+B+"-"+F+"-"+L+"-"+A))}return l=mxResources.get("copyOf",[l])+d};EditorUi.prototype.fileLoaded=function(d,f,l){var u=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);
d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+F})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(L){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(L){}}catch(L){this.fileLoadedError=L;if(null!=
d)try{d.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+L.message,label:"stack_"+L.stack})}catch(O){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=u?this.fileLoaded(u)||B():B()});f?d():this.handleError(L,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else B();
return A};EditorUi.prototype.getHashValueForPages=function(d,f){var l=0,u=new mxGraphModel,A=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var F=d[B].node.cloneNode(!1);F.removeAttribute("name");u.root=d[B].root;var L=A.encode(u);this.editor.graph.saveViewState(d[B].viewState,L,!0);L.removeAttribute("pageWidth");L.removeAttribute("pageHeight");F.appendChild(L);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,
d;B=this.sidebar.palettes[d.getHash()];B=null!=B?B[B.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var F=null,L=mxUtils.bind(this,function(P,U){0==P.length&&d.isEditable()?(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),U.appendChild(F)):this.addLibraryEntries(P,U)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=d.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));
var O=this.sidebar.addPalette(d.getHash(),l,null!=u?u:!0,mxUtils.bind(this,function(P){L(f,P)}));null!=A&&(A.div=O);this.repositionLibrary(B);var H=O.parentNode.previousSibling;u=H.getAttribute("title");null!=u&&0<u.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+u);var ja=document.createElement("div");ja.style.position="absolute";ja.style.right="0px";ja.style.top="0px";ja.style.padding="8px";ja.style.backgroundColor="inherit";H.style.position="relative";
JSON.parse(mxUtils.getTextContent(pa.documentElement));L(Ca,O);f=f.concat(Ca);aa(P);this.spinner.stop();qa=!0}catch(Qa){}else if("mxfile"==pa.documentElement.nodeName)try{var Ba=pa.documentElement.getElementsByTagName("diagram");for(Ca=0;Ca<Ba.length;Ca++){var za=this.stringToCells(Editor.getDiagramNodeXml(Ba[Ca])),Ma=this.editor.graph.getBoundingBoxFromGeometry(za);la(za,new mxRectangle(0,0,Ma.width,Ma.height),P)}qa=!0}catch(Qa){null!=window.console&&console.log("error in drop handler:",Qa)}qa||
".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,l,u,A,B,F){d=new ImageDialog(this,d,f,l,u,A,B,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,f,l,u,A,B){var F=localStorage.getItem(f);d=new TextareaDialog(this,d,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(L){if(null!=L)try{if(null!=B&&
B(L),L==F)this.hideDialog();else{if(0<L.length){var O=JSON.parse(L);localStorage.setItem(f,JSON.stringify(O))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(H){this.handleError(H)}}),null,mxResources.get("close"),null,null,null,!0,null,null,A,l,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f,l,u){d=null!=d?d:mxUtils.bind(this,function(A,B,F,L){B||(A=new ChangePageSetup(this,
u?F:null,A),A.ignoreColor=!u,null!=L&&u&&(A.shadowVisible=L),this.editor.graph.model.execute(A))});d=new BackgroundImageDialog(this,d,f,l,u);this.showDialog(d.container,400,u?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,l,u,A){d=new LibraryDialog(this,d,f,l,u,A);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
function(d){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(d,f,l,u,A,B,F){var L=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},O=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+
(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(ia){}if(null!=O||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var H=mxResources.get("ok"),ja=null;f=null!=f?f:mxResources.get("error");if(null!=O){null!=O.retry&&(H=mxResources.get("cancel"),ja=function(){L();O.retry()});if(404==O.code||404==O.status||403==O.code){F=403==O.code?null!=O.message?mxUtils.htmlEntities(O.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
l&&l()};EditorUi.prototype.alert=function(d,f,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,l,u,A,B){d=null!=d?d:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=l&&l()},u,A,null,null,null,null,L);this.showDialog(d.container,
340,46+L,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,l,u,A,B,F,L,O){var H=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){B=null!=B?B:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";L=null!=L?L:"translate(-50%,0%)";var ja=A?500:1E3;H=A?"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");
aa()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,function(){aa()}),ja)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(X){var P=mxEvent.getSource(X);P!=ia&&P!=ma?(null!=l&&l(),aa(),mxEvent.consume(X)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",L)}),ja/2);window.setTimeout(la,A?4E3:3E4);H=!0}return H};EditorUi.prototype.setCurrentFile=function(d){null!=
typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var L=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(L?parseInt(L[2],10):!1)?!1:B}if(B||this.isOffline()){F.href=URL.createObjectURL(u?this.base64ToBlob(d,l):new Blob([d],{type:l}));B?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(O){}}else this.createEchoRequest(d,f,l,u,A).simulate(document,
"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,l,u,A,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=l?"&mime="+l:"")+(null!=A?"&format="+A:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(u?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var l=d.length,u=Math.ceil(l/1024),A=Array(u),B=0;B<u;++B){for(var F=1024*B,L=Math.min(F+1024,l),O=Array(L-F),H=0;F<L;++H,++F)O[H]=d[F].charCodeAt(0);A[B]=
new Uint8Array(O)}return new Blob(A,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,l,u,A,B,F,L){B=null!=B?B:!1;F=null!=F?F:"vsdx"!=A&&(!mxClient.IS_IOS||!navigator.standalone);var O=mxUtils.bind(this,function(ja,da,ca,ia){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(d,l,u);else if(null!=l&&"text/html"==l.substring(0,9)){var ma=new EmbedDialog(this,d);this.showDialog(ma.container,450,240,!0,!0);ma.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,
!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(d,ja,l,u,null,L);else if(null!=ja&&0<ja.length){var la=mxUtils.bind(this,function(X){try{this.exportFile(d,ja,l,u,da,X)}catch(P){this.handleError(P)}});null!=ia?la(ia):this.pickFolder(da,la)}}catch(X){this.handleError(X)}});if("1"==urlParams["save-dialog"])A=[],B||A.push(App.MODE_BROWSER),F||A.push("_blank"),f=new SaveDialog(this,f,mxUtils.bind(this,
mxEvent.addListener(this.editor.graph.container,"click",A);this.editor.exportToCanvas(mxUtils.bind(this,function(L){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var O=this.createImageDataUri(L,null,"png");L=document.createElement("img");L.style.maxWidth="140px";L.style.maxHeight="140px";L.style.cursor="pointer";L.style.backgroundColor="white";L.setAttribute("title",mxResources.get("openInNewWindow"));L.setAttribute("border",
"0");L.setAttribute("src",O);this.exportDialog.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.openInNewWindow(O.substring(O.indexOf(",")+1),"image/png",!0);A.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(L){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(L)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(u)}),
Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,l,u,A){this.isLocalFileSave()?this.saveLocalFile(l,d,u,A,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,F){return this.createEchoRequest(l,B,u,A,f,F)}),l,A,u)};EditorUi.prototype.saveRequest=function(d,f,l,u,A,B,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var L=mxUtils.bind(this,function(ja,da,ca,ia){if("_blank"==da||null!=ja&&0<ja.length){var ma=l("_blank"==da?null:ja,da==App.MODE_DEVICE||"download"==
aa)}catch(la){this.handleError(la)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}))}),null!=ia?ca(ia):this.pickFolder(da,ca)))}});if("1"==urlParams["save-dialog"]){var O=[App.MODE_BROWSER];F||O.push("_blank");d=new SaveDialog(this,d,mxUtils.bind(this,function(ja,da,ca){L(ja.value,da,ja,ca);this.hideDialog()}),O,null,"application/pdf");this.showDialog(d.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}))}else{O=
this.getServiceCount(!1);isLocalStorage&&O++;var H=4>=O?2:6<O?4:3;d=new CreateDialog(this,d,L,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<O,H,u,B,A);F=this.isServices(O)?4<O?390:280:160;this.showDialog(d.container,420,F,!0,!0)}d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,l,u,A,B){};EditorUi.prototype.getServiceForName=
function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,f,l){f(null)};EditorUi.prototype.exportSvg=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca,ia){if(this.spinner.spin(document.body,mxResources.get("export")))try{var ma=this.editor.graph.isSelectionEmpty();l=null!=l?l:ma;var aa=f?null:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);null==aa&&0==f&&(aa="dark"!=ja||Editor.enableSvgDarkMode?"#ffffff":Editor.darkColor);
var la=this.editor.graph.getSvg(aa,d,F,L,null,l,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!ca,ja,da);u&&this.editor.graph.addSvgShadow(la);var X=this.getBaseFilename()+(A?".drawio":"")+".svg";ia=null!=ia?ia:mxUtils.bind(this,function(k){this.isLocalFileSave()||k.length<=MAX_REQUEST_SIZE?this.saveData(X,"svg",k,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});var P=mxUtils.bind(this,
EditorUi.prototype.addRadiobox=function(d,f,l,u,A,B,F){return this.addCheckbox(d,l,u,A,B,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,l,u,A,B,F,L){B=null!=B?B:!0;var O=document.createElement("input");O.style.marginRight="8px";O.style.marginTop="16px";O.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();O.id=F;null!=L&&O.setAttribute("name",L);l&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);u&&O.setAttribute("disabled","disabled");B&&(d.appendChild(O),l=document.createElement("label"),
"geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));B.appendChild(u);u=document.createElement("option");u.setAttribute("value","custom");mxUtils.write(u,mxResources.get("custom")+"...");B.appendChild(u);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var F=new FilenameDialog(this,A,mxResources.get("ok"),function(L){null!=L?A=L:B.value="blank"},mxResources.get("url"),null,null,null,
null,function(){B.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===B.value?"_blank":A:null},getEditInput:function(){return l},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=function(d,f){function l(){var L=document.createElement("div");
L.style.width="100%";L.style.height="100%";L.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(L.style.border="1px solid black",L.style.backgroundColor=B):(L.style.backgroundPosition="center center",L.style.backgroundRepeat="no-repeat",L.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(L)}mxUtils.write(d,mxResources.get("links")+":");var u=document.createElement("select");u.style.width="100px";u.style.padding="0px";u.style.marginLeft="8px";u.style.marginRight=
mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),u.appendChild(f));d.appendChild(u);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(L){this.pickColor(B||"none",function(O){B=O;l()});mxEvent.consume(L)}));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||
F.push("edit="+encodeURIComponent(A)),B&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));l&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,l,u,A,B,F,L,O,H){O=this.createUrlParameters(d,f,l,u,A,B,O);d=this.getCurrentFile();f=!0;null!=F?l="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),L||null==d||d.constructor!=window.DriveFile?l="#R"+encodeURIComponent(l?
"/"+(0<O.length?"?"+O.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,f,l,u,A,B,F,L,O,H,ja,da){this.getBasenames();var ca={};""!=A&&A!=mxConstants.NONE&&(ca.highlight=A);"auto"!==u&&(ca.target=u);H||(ca.lightbox=!1);ca.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ca.zoom=l/100);l=[];F&&(l.push("pages"),ca.resize=!0,null!=this.pages&&null!=this.currentPage&&(ca.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ca.resize=!0);L&&l.push("layers");
var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","type-embedhtmldialog");B=L.cloneNode(!0);B.setAttribute("value","copy");F.appendChild(B);var O=document.createElement("span");mxUtils.write(O,mxResources.get("includeCopyOfMyDiagram"));
F.appendChild(O);mxUtils.br(F);F.appendChild(L);O=document.createElement("span");mxUtils.write(O,mxResources.get("publicDiagramUrl"));F.appendChild(O);var H=this.getCurrentFile();null==l&&null!=H&&H.constructor==window.DriveFile&&(O=document.createElement("a"),O.style.paddingLeft="12px",O.style.color="gray",O.style.cursor="pointer",mxUtils.write(O,mxResources.get("share")),F.appendChild(O),mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));
B.setAttribute("checked","checked");null==l&&L.setAttribute("disabled","disabled");A.appendChild(F);var ja=this.addLinkSection(A),da=this.addCheckbox(A,mxResources.get("zoom"),!0,null,!0);mxUtils.write(A,":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value="100%";A.appendChild(ca);var ia=this.addCheckbox(A,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;
P.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,A,mxUtils.bind(this,function(){u(L.checked?l:null,da.checked,ca.value,ja.getTarget(),ja.getColor(),ia.checked,ma.checked,aa.checked,la.checked,X.checked,null!=P?P.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,l,u,A,B,F,L){var O=document.createElement("div");O.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,
U.checked,null!=ca?ca.value:null,null!=ia?ia.value:null,k.checked)}),null,mxResources.get("create"),F,L);this.showDialog(f.container,340,300+d,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,l,u,A){var B=document.createElement("div");B.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:"+(A?"10":"4")+"px";B.appendChild(F);if(A){mxUtils.write(B,mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||"100%";B.appendChild(L);mxUtils.write(B,mxResources.get("borderWidth")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight=
d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ca=parseInt(L.value)/100||1,ia=parseInt(O.value)||0;l(!H.checked,null!=ja?ja.checked:!1,null!=da?da.checked:!1,ca,ia)}),null,d,f);this.showDialog(d.container,300,(A?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,l,u,A,B,F,L,O){F=null!=F?F:Editor.defaultIncludeDiagram;var H=document.createElement("div");H.style.whiteSpace="nowrap";var ja=this.editor.graph,da="jpeg"==L?220:300,ca=document.createElement("h3");mxUtils.write(ca,
L),z=null;if(Editor.isDarkMode()||Editor.enableCssDarkMode)z=document.createElement("select"),z.style.maxWidth="260px",z.style.marginLeft="8px",z.style.marginTop="16px",B=document.createElement("option"),B.setAttribute("value","light"),mxUtils.write(B,mxResources.get("light")),z.appendChild(B),O=document.createElement("option"),O.setAttribute("value","dark"),mxUtils.write(O,mxResources.get("dark")),z.appendChild(O),Editor.enableCssDarkMode&&"svg"==L&&(d=document.createElement("option"),d.setAttribute("value",
"auto"),mxUtils.write(d,mxResources.get("automatic")),z.appendChild(d)),mxUtils.write(H,mxResources.get("appearance")+":"),H.appendChild(z),mxUtils.br(H),Editor.isDarkMode()||Editor.cssDarkMode?O.setAttribute("selected","selected"):B.setAttribute("selected","selected"),da+=26;var J=this.addCheckbox(H,mxResources.get("shadow"),ja.shadowVisible),W=null;if("png"==L||"jpeg"==L)W=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(H,
mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=L);T.style.marginBottom="16px";var Z=document.createElement("input");Z.style.marginBottom="16px";Z.style.marginRight="8px";Z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Z.setAttribute("disabled","disabled");var ba=document.createElement("select");ba.style.maxWidth="200px";ba.style.marginLeft="8px";ba.style.marginBottom="16px";F=document.createElement("option");F.setAttribute("value","none");mxUtils.write(F,
ha.appendChild(f);var qa=document.createElement("div");mxUtils.write(qa,mxResources.get("LinksLost"));qa.style.margin="7px";qa.style.display="none";"svg"==L&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(ha),H.appendChild(qa),mxUtils.br(H),mxUtils.br(H),da+=50);l=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=ma.value;this.lastExportZoom=ia.value;A(ia.value,k.checked,!aa.checked,J.checked,T.checked,Z.checked,ma.value,la.checked,!1,ha.value,null!=W?W.checked:
null,null!=z?z.value:null,X.value,"embedFonts"==ba.value,"lblToSvg"==ba.value)}),null,l,u);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,l,u,A){var B=document.createElement("div");B.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var L=document.createElement("h3");mxUtils.write(L,f);L.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(L)}var O=this.addCheckbox(B,mxResources.get("fit"),!0),H=this.addCheckbox(B,mxResources.get("shadow"),F.shadowVisible&&u,!u),ja=this.addCheckbox(B,l),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ca=this.addEditButton(B,da),ia=ca.getEditInput(),ma=1<F.model.getChildCount(F.model.getRoot()),aa=this.addCheckbox(B,mxResources.get("layers"),ma,!ma);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="12px";
A);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,l,u,A,B,F,L){function O(ia){var ma=" ",aa="";u&&(ma=" 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"+
ma,"png");O(ia)}),null,null,null,mxUtils.bind(this,function(ia){L({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=
ca.getStatus()?O("data:image/png;base64,"+ca.getText()):L({message:mxResources.get("unknownError")})}))}else L({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,l,u,A,B,F){var L=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l),O=L.getElementsByTagName("a");if(null!=O)for(var H=0;H<O.length;H++){var ja=O[H].getAttribute("href");null!=ja&&"#"==ja.charAt(0)&&"_blank"==O[H].getAttribute("target")&&O[H].removeAttribute("target")}u&&
L.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(L);if(l){var da=" ",ca="";u&&(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"+(A?"&edit=_blank":"")+(B?"&layers=1":
"")+"');}})(this);\"",ca+="cursor:pointer;");d&&(ca+="max-width:100%;");this.editor.convertImages(L,mxUtils.bind(this,function(ia){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ia))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",u&&(f=this.getSelectedPageIndex(),L.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:"")+(A?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),d&&(d=parseInt(L.getAttribute("width")),A=parseInt(L.getAttribute("height")),L.setAttribute("viewBox","-0.5 -0.5 "+d+" "+A),ca+="max-width:100%;max-height:"+A+"px;",L.removeAttribute("height")),""!=ca&&L.setAttribute("style",ca),this.editor.addFontCss(L),this.editor.graph.mathEnabled&&this.editor.addMathCss(L),F(mxUtils.getXml(L))};EditorUi.prototype.timeSince=
EditorUi.prototype.getPngFileProperties=function(d){var f=1,l=0;if(null!=d){if(d.hasAttribute("scale")){var u=parseFloat(d.getAttribute("scale"));!isNaN(u)&&0<u&&(f=u)}d.hasAttribute("border")&&(u=parseInt(d.getAttribute("border")),!isNaN(u)&&0<u&&(l=u))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(d,f,l,u,A){try{var B=this.editor.graph,F=null!=B.themes&&"darkTheme"==B.defaultThemeName,L=null;if(null!=l&&0<l.length)B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet()),
document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0),B),L=l;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(F?B.getDefaultStylesheet():B.getStylesheet());var O=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&B.setBackgroundImage(H.viewState.backgroundImage);
B.getGlobalVariable=function(ja){return"page"==ja?H.getName():"pagenumber"==ja?1:O.apply(this,arguments)};document.body.appendChild(B.container);B.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ja){try{null==L&&(L=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ja.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(L));d(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ca){null!=
f&&f(ca)}}),null,null,null,mxUtils.bind(this,function(ja){null!=f&&f(ja)}),null,null,u,null,B.shadowVisible,null,B,A,null,null,null,"diagram",null)}catch(ja){null!=f&&f(ja)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){L=null!=L?L:!0;ja=null!=ja?ja:0;F=null!=O?O:f.background;F==mxConstants.NONE&&(F=null);B=f.getSvg(F,H,ja,null,null,B,null,null,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ja);null!=d&&B.setAttribute("content",
d);null!=l&&B.setAttribute("resource",l);var ia=mxUtils.bind(this,function(ma){ma=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=A&&A(ma);return ma});f.mathEnabled&&this.editor.addMathCss(B);if(null!=A)this.embedFonts(B,mxUtils.bind(this,function(ma){L?this.editor.convertImages(ma,mxUtils.bind(this,function(aa){ia(aa)})):ia(ma)}));else return ia(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(d,l),f(d)}catch(u){f(d)}}))}catch(l){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){O=null!=O?O:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ia=this.editor.graph.isSelectionEmpty();l=null!=l?l:ia;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
function(ma){this.spinner.stop();try{this.saveCanvas(ma,A?this.getFileData(!0,null,null,null,l,L):null,O,null==this.pages||0==this.pages.length,ja)}catch(aa){this.handleError(aa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ma){this.spinner.stop();this.handleError(ma)}),null,l,d||1,f,u,null,null,B,F,H,da,ca)}catch(ma){this.spinner.stop(),this.handleError(ma)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=
function(d,f,l,u,A,B,F){f=null!=f?f:0;l=null!=l?l:0;var L=[];try{var O=this.editor.graph;if(null!=d&&0<d.length){O.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var ja=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=ja&&"mxfile"==ja.nodeName&&null!=this.pages){var da=ja.getElementsByTagName("diagram");if(1==da.length&&!B){if(ja=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(d[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=
null==aa.getName()&&aa.setName(mxResources.get("pageWithNumber",[la+1]));O.model.execute(new ChangePage(this,aa,aa,la,!0));B.push(aa)}this.updatePageLinks(d,B)}}if(null!=ja&&"mxGraphModel"===ja.nodeName){L=O.importGraphModel(ja,f,l,u);if(null!=L)for(ia=0;ia<L.length;ia++)this.updatePageLinksForCell(d,L[ia]);var X=O.parseBackgroundImage(ja.getAttribute("backgroundImage"));if(null!=X&&null!=X.originalSrc){this.updateBackgroundPageLink(d,X);var P=new ChangePageSetup(this,null,X);P.ignoreColor=!0;O.model.execute(P)}}F&&
this.insertHandler(L,null,null,O.defaultVertexStyle,O.defaultEdgeStyle,!1,!0)}finally{O.model.endUpdate()}}}catch(U){if(A)throw U;this.handleError(U)}return L};EditorUi.prototype.updatePageLinks=function(d,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(d,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(d,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+
1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var l=document.createElement("div"),u=this.editor.graph,A=u.getLinkForCell(f);null!=A&&u.setLinkForCell(f,this.updatePageLink(d,A));if(u.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(u.getLabel(f));for(var B=l.getElementsByTagName("a"),F=!1,L=0;L<B.length;L++)A=B[L].getAttribute("href"),null!=A&&(B[L].setAttribute("href",this.updatePageLink(d,A)),F=!0);F&&u.labelChanged(f,l.innerHTML)}for(L=
0;L<u.model.getChildCount(f);L++)this.updatePageLinksForCell(d,u.model.getChildAt(f,L))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var l=d[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var A=0;A<u.actions.length;A++){var B=u.actions[A];if(null!=B.open&&Graph.isPageLink(B.open)){var F=B.open.substring(B.open.indexOf(",")+1);l=d[F];null!=l?B.open=
"data:page/id,"+l:null==this.getPageById(F)&&delete B.open}}f="data:action/json,"+JSON.stringify(u)}}catch(L){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,l,u,A){var B=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){u=null!=u?u:d.name;var L=mxUtils.bind(this,function(H){F.clear()&&
B(H)}),O=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(u);try{var ja="UNKNOWN-VISIO",da=u.lastIndexOf(".");if(0<=da&&da<u.length)ja=u.substring(da+1).toUpperCase();else{var ca=u.lastIndexOf("/");0<=ca&&ca<u.length&&(u=u.substring(ca+1))}EditorUi.logEvent({category:ja+"-MS-IMPORT-FILE",action:"filename_"+u,label:H?"remote":"local"})}catch(ma){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())L({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):
function(la){try{f(la.target.result)}catch(X){L({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ma)}else this.doImportVisio(ma,f,L,u)}catch(la){L(la)}else try{""==ia.responseType||"text"==ia.responseType?L({message:ia.responseText}):(aa=new FileReader,aa.onload=function(){try{L({message:JSON.parse(aa.result).Message})}catch(la){L(la)}},aa.readAsText(ia.response))}catch(la){L({})}});ia.send(H)}else if(F.clear())try{this.doImportVisio(d,f,L,u)}catch(ma){L(ma)}}else L({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?O():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",O,null,null,null,L))}),B)};EditorUi.prototype.importGraphML=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(L){A.clear()&&u(L)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,
f,u)}catch(L){B(L)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",F,null,null,null,B))}),u)};EditorUi.prototype.exportVisio=function(d){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 u=mxUtils.bind(this,
null,u))}),f)}};EditorUi.prototype.convertLucidChart=function(d,f,l){var u=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=l?l(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){var B=mxUtils.bind(this,function(L){A.clear()&&u(L)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(A.clear())if("undefined"!==typeof window.LucidImporter)try{var L=JSON.parse(d);f(LucidImporter.importState(L));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var O=[(new Date).toISOString(),"convertLucidChart",L];null!=L.state&&O.push(JSON.parse(L.state));if(null!=L.svgThumbs)for(var H=0;H<L.svgThumbs.length;H++)O.push(Editor.createSvgDataUri(L.svgThumbs[H]));null!=L.thumb&&O.push(L.thumb);console.log.apply(console,O)}}catch(ja){}}catch(ja){null!=window.console&&console.error(ja),B(ja)}else B({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||
mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(B){EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"generateOpenAiMermaidDiagram",label:d});var F=new mxXmlRequest("https://www.draw.io/generate/v1",d,"POST"),L=mxUtils.bind(this,function(O){B.clear()&&(this.spinner.stop(),l(O))});F.send(mxUtils.bind(this,function(O){if(B.isAlive())if(200<=O.getStatus()&&299>=O.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ja=mxUtils.trim(O.getText()),da=this.extractMermaidDeclaration(ja);
this.generateMermaidImage(da,null,mxUtils.bind(this,function(ca,ia,ma){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresponse:",ja,"\nresult:",da),this.spinner.stop(),f(da,ca,ia,ma))}),L)}),L,mxUtils.bind(this,function(ca){3>u++?B.clear()&&(this.spinner.stop(),A()):L(ca)}))}),L);else{var H={message:mxResources.get("error")+" "+O.getStatus()};try{H=JSON.parse(O.getText()),H=H.error}catch(ja){}L(H)}}),L)}),l)});A()};
0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,u)&&(f="classDiagram\n"+f);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",l,"\ntype:",u,"\nvalue:",d,"\ntext:",f);return f};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var f=[],l=0;l<d.length;l++)"%%"!=d[l].substring(0,2)&&f.push(d[l]);return f.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,f,l,u,A){d=this.removeMermaidComments(d);var B=mxUtils.bind(this,function(L){this.loadingMermaid=!1;null!=
u?u(L):this.handleError(L)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;Editor.isDarkMode()&&(f.theme="dark");var L=mxUtils.bind(this,function(O){try{if(mxClient.IS_IE||mxClient.IS_IE11)O=O.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var H=mxUtils.parseXml(O).getElementsByTagName("svg");if(0<H.length&&
(new Date).getTime(),d).then(function(O){L(O.svg)}).catch(function(O){null!=A?A(O):u(O)})}catch(O){u(O)}});"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(L){this.importXml(L,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,B)):mxscript("js/extensions.min.js",F,null,null,null,B))};
EditorUi.prototype.generatePlantUmlImage=function(d,f,l,u){function A(L,O,H){c1=L>>2;c2=(L&3)<<4|O>>4;c3=(O&15)<<2|H>>6;c4=H&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(L){if(10>L)return String.fromCharCode(48+L);L-=10;if(26>L)return String.fromCharCode(65+L);L-=26;if(26>L)return String.fromCharCode(97+L);L-=26;return 0==L?"-":1==L?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(L){r="";
for(i=0;i<L.length;i+=3)r=i+2==L.length?r+A(L.charCodeAt(i),L.charCodeAt(i+1),0):i+1==L.length?r+A(L.charCodeAt(i),0,0):r+A(L.charCodeAt(i),L.charCodeAt(i+1),L.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(L){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var O=new FileReader;O.readAsDataURL(this.response);O.onloadend=function(H){var ja=new Image;ja.onload=function(){try{var da=ja.width,ca=
ja.height;if(0==da&&0==ca){var ia=O.result,ma=ia.indexOf(","),aa=decodeURIComponent(escape(atob(ia.substring(ma+1)))),la=mxUtils.parseXml(aa).getElementsByTagName("svg");0<la.length&&(da=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(O.result,da,ca)}catch(X){u(X)}};ja.src=O.result};O.onerror=function(H){u(H)}}else u(L)};F.onerror=function(L){u(L)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,l){var u=this.editor.graph,A=null;u.getModel().beginUpdate();
try{A=u.insertVertex(null,null,"<pre>"+d+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(A,!0)}finally{u.getModel().endUpdate()}return A};EditorUi.prototype.insertTextAt=function(d,f,l,u,A,B,F,L){B=null!=B?B:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==
ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(A||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var O=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,l,B,!0,L)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),null!=H&&0<H.length))return this.importXml(H,
f,l,B,!0,L);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var ja=this.importXml(H,f,l,B,!0,L);if(0<ja.length)return ja}catch(ca){}this.loadImage(d,mxUtils.bind(this,function(ca){if("data:"==d.substring(0,5))this.resizeImage(ca,d,mxUtils.bind(this,function(aa,la,X){O.setSelectionCell(O.insertVertex(null,
d+";"))}}),mxUtils.bind(this,function(){var ca=null;O.getModel().beginUpdate();try{ca=O.insertVertex(O.getDefaultParent(),null,d,O.snap(f),O.snap(l),1,1,"text;"+(u?"html=1;":"")),O.updateCellSize(ca),O.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{O.getModel().endUpdate()}O.setSelectionCell(ca)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,l,B,null,L);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,B,null,L))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{O=this.editor.graph;A=null;O.getModel().beginUpdate();try{A=O.insertVertex(O.getDefaultParent(),null,"",O.snap(f),O.snap(l),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));O.fireEvent(new mxEventObject("textInserted","cells",[A]));u&&(d=O.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");A.value=d;O.updateCellSize(A);if(0<
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,L){StorageFile.listFiles(this,"F",F,L)});window.openBrowserFile=
mxUtils.bind(this,function(F,L,O){StorageFile.getFileContent(this,F,L,O)});window.deleteBrowserFile=mxUtils.bind(this,function(F,L,O){StorageFile.deleteFile(this,F,L,O)});if(!f){var u=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,L){null!=L&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(L)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,
mxUtils.bind(this,function(O){this.importXml(O,0,0,!0)}),null,L)):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 A=this.dialog,B=A.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=u;B.apply(A,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
function(d,f,l){var u=this,A=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))l();else{var F=0,L,O=!1;B.forEach(function(H,ja){H=ja.name.toLowerCase();"diagram/diagram.xml"==H?(O=!0,ja.async("string").then(function(da){0==da.indexOf("<mxfile ")?f(da):l()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>F&&(F=H,L=ja))});0<F?L.async("string").then(function(H){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(H,
d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):u.parseFileData(H,mxUtils.bind(this,function(ja){4==ja.readyState&&(200<=ja.status&&299>=ja.status?f(ja.responseText):l())}),d.name):l()}):O||l()}},function(B){l(B)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A,null,null,null,l))};EditorUi.prototype.importFile=function(d,f,l,u,A,B,F,L,O,H,ja,da){H=null!=
H?H:!0;var ca=!1,ia=null,ma=mxUtils.bind(this,function(aa){var la=null;null!=aa&&"<mxlibrary"==aa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,aa,F)):la=this.importXml(aa,l,u,H,null,null!=da?mxEvent.isControlDown(da):null);null!=L&&L(la)});"image"==f.substring(0,5)?(O=!1,"image/png"==f.substring(0,9)&&(f=ja?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ia=this.importXml(f,l,u,H,null,null!=da?mxEvent.isControlDown(da):null),O=!0)),O||(f=this.editor.graph,O=d.indexOf(";"),0<
F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,A=mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?ma(aa.responseText):null!=L&&(L(null),this.showError(mxResources.get("error"),413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,A,F):this.parseFile(O,A,F)):0==d.indexOf("PK")&&null!=O?(ca=!0,this.importZipFile(O,ma,mxUtils.bind(this,function(){ia=this.insertTextAt(this.validateFileData(d),
l,u,!0,null,H);L(ia)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(ia=this.insertTextAt(this.validateFileData(d),l,u,!0,null,H,null,null!=da?mxEvent.isControlDown(da):null));ca||null==L||L(ia);return ia};EditorUi.prototype.importFiles=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca){u=null!=u?u:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var ia=null!=f&&null!=l,ma=!0;f=null!=f?f:0;l=null!=l?l:0;var aa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var la=ja||this.resampleThreshold,X=0;X<
!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,ba,Ca,!0)),null):this.importFile(ba,ha,qa,ra,pa,xa,Ca,Ba,za,ia,da,ca)}catch(Ma){return this.handleError(Ma),null}});B=null!=B?B:mxUtils.bind(this,function(ba){U.setSelectionCells(ba)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,J=z,W=[],T=mxUtils.bind(this,function(ba,ha){W[ba]=ha;if(0==--J){this.spinner.stop();if(null!=L)L(W);else{var qa=[];U.getModel().beginUpdate();try{for(ba=0;ba<W.length;ba++){var ra=
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var L=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H=
Math.max(L/A,O/A);if(1<H){var ja=Math.round(L/H),da=Math.round(O/H),ca=document.createElement("canvas");ca.width=ja;ca.height=da;ca.getContext("2d").drawImage(d,0,0,ja,da);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");ma.width=ja;ma.height=da;var aa=ma.toDataURL();ia!==aa&&(f=ia,L=ja,O=da)}}}catch(la){}l(f,L,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,l){try{var u=
this.editor.getEditBlankUrl=function(P){P=null!=P?P:"";"1"==urlParams.dev&&(P+=(0<P.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var L=f.addClickHandler;f.addClickHandler=function(P,U,k){var z=U;U=function(J,W){if(null==W){var T=mxEvent.getSource(J);"a"==T.nodeName.toLowerCase()&&(W=T.getAttribute("href"))}null!=W&&f.isCustomLink(W)&&(mxEvent.isTouchEvent(J)||!mxEvent.isPopupTrigger(J))&&f.customLinkClicked(W)&&mxEvent.consume(J);null!=z&&z(J,W)};L.call(this,P,U,k)};q.apply(this,arguments);
"row-resize";this.diagramContainer.parentNode.appendChild(A);this.bottomResizer=A;var B=null,F=null,L=null,O=null;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){O=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));A=A.cloneNode(!1);A.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(A);this.rightResizer=A;mxEvent.addGestureListeners(A,mxUtils.bind(this,function(H){L=parseInt(this.diagramContainer.style.width);
B=mxEvent.getClientX(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(H){var ja=!1;null!=B&&(this.diagramContainer.style.width=Math.max(20,L+mxEvent.getClientX(H)-B)+"px",ja=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,O+mxEvent.getClientY(H)-F)+"px",ja=!0);ja&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
0,0,this.maxImageSize,function(O,H,ja,da,ca,ia){d.insertImage(O,ca,ia)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var H=0;H<O.length;H++)O[H]()});else{var L=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],L.x,L.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(O){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",
mxEvent.addListener(l,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=B.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!0,!0)),!mxEvent.isConsumed(B)){var F=f.container.scrollLeft,L=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=F,f.container.scrollTop=L,Graph.removePasteFormatting(l.firstChild),this.pasteCells(B,l,!1,!0)}catch(O){this.handleError(O)}}),
0)}}catch(O){this.handleError(O)}}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==l?!0:A.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,l){function u(L){return"simple"==
L||0==f&&"sketch"==L}f=null!=f?f:150;var A=Editor.currentTheme,B=u(A)&&this.isDefaultTheme(d)||this.isDefaultTheme(A)&&u(d),F=B&&"sketch"!=d&&"sketch"!=A;B&&!this.themeSwitching&&(Editor.currentTheme=d,this.themeSwitching=!0,mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms ease-in-out"),0==f&&(this.container.style.opacity="0"),window.setTimeout(mxUtils.bind(this,function(){var L=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
"flex");this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(L);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;isLocalStorage&&u(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:
!0);null!=l&&l()}),f)}),f)}),f)}),0));return F};EditorUi.prototype.saveScrollState=function(){var d=this.editor.graph.view.translate,f=this.diagramContainer.scrollLeft,l=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(f-=this.embedViewport.x,l-=this.embedViewport.y):(f+=this.embedViewport.x,l+=this.embedViewport.y));return{x:f,y:l,tx:d.x,ty:d.y}};EditorUi.prototype.restoreScrollState=function(d){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;
this.diagramContainer.scrollLeft=d.x+(l.x-d.tx)*f;this.diagramContainer.scrollTop=d.y+(l.y-d.ty)*f};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display=
"none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var A=this.getCurrentFile();A=null!=A?A.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(A)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(A))+
'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",l);
l()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
"right 0px top 8px",B.style.backgroundRepeat="no-repeat",B.style.backgroundSize="13px",B.style.paddingRight="16px",B.style.marginRight="-4px");f.appendChild(B);if("simple"==d){var F=this.createMenu("pages",Editor.thinNoteImage);F.style.backgroundSize="24px";F.style.display="inline-block";F.style.width="24px";F.style.height="30px";F.style.opacity="0.7";f.appendChild(F);var L=this.createMenuItem("undo",Editor.thinUndoImage);L.style.marginLeft="auto";L.style.flexShrink="0";L.style.opacity="0.7";f.appendChild(L);
L=this.createMenuItem("redo",Editor.thinRedoImage);L.style.marginLeft="0px";L.style.flexShrink="0";L.style.opacity="0.7";f.appendChild(L);L=mxUtils.bind(this,function(){var H=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;F.style.display=480>H?"none":"";B.style.display=750>H?"none":"inline-flex"});mxEvent.addListener(window,"resize",L);L()}mxUtils.bind(this,function(H){mxEvent.addListener(H,"click",mxUtils.bind(this,function(da){mxEvent.isAltDown(da)?(this.hideCurrentMenu(),
mxUtils.bind(this,function(da,ca){ja(da,ca,ca.getProperty("factor"))}))})(B);"simple"!=d&&f.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));if("1"==urlParams.embedInline){var O=this.createMenuItem("fullscreen",Editor.fullscreenImage);f.appendChild(O);L=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.inlineSizeChanged();this.editor.graph.refresh();this.fitWindows()});this.addListener("editInlineStart",
mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));this.addListener("inlineFullscreenChanged",L);f.appendChild(this.createMenuItem("exit",Editor.closeImage))}"simple"==d?(this.sketchFooterMenuElt.style.cssText="position:relative;white-space:nowrap;gap:6px;user-select:none;display:flex;flex-shrink:0;flex-grow:0.5;align-items:center;",this.sketchMainMenuElt.appendChild(this.sketchFooterMenuElt)):(this.sketchFooterMenuElt.style.cssText=
"simple"==d?"inline-block":"block";F.style.flexShrink="0";F.style.width="30px";F.style.height="30px";F.style.padding="simple"==d?"0px":"4px 4px 0px 4px";F.style.opacity="0.7";var L=this.createMenu("table",Editor.thinTableImage);L.style.backgroundSize="24px";L.style.padding="simple"==d?"0px":"4px 4px 0px 4px";L.style.display="inline-block";L.style.width="30px";L.style.height="30px";L.style.opacity="0.7";var O=F.cloneNode(!0);O.style.backgroundImage="url("+("simple"==d?Editor.thinShapesImage:Editor.shapesImage)+
this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,"simple"!=d,null,28,28,"simple"==d?Editor.thinRectangleImage:null);"simple"==d?(600<=ma&&(la.className="geToolbarButton",la.style.opacity="0.7",ia(la,mxResources.get("rectangle")+" (D)",null,"D").style.margin="0 -4px 0 0"),390<=ma&&this.sketchPickerMenuElt.appendChild(O),440<=ma&&ia(B,mxResources.get("freehand")+" (X)",null,"X"),500<=ma&&this.sketchPickerMenuElt.appendChild(L)):
f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState())),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),
"*"))};EditorUi.prototype.inlineSizeChanged=function(){var d=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,u=this.editor.graph;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+
" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var A=this.diagramContainer.getAttribute("data-bounds");if(null!=A){this.diagramContainer.removeAttribute("data-bounds");u.getGraphBounds();var B=A.split(" ");u=mxUtils.getDocumentSize();this.diagramContainer.style.top=B[0];
this.diagramContainer.style.left=B[1];A=parseInt(B[2]);B=parseInt(B[3]);A=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,A):A,u.width-80);B=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,B):B,u.height-80);this.diagramContainer.style.width=A+"px";this.diagramContainer.style.height=B+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),
"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=f.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/
2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=
this.bottomResizer.style.visibility;f.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;
if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme?(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.endSize="8",d.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle=
"none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=
Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):
this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l=d.indexOf(",");0<l&&(f=this.getPageById(d.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};
EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),
this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();
this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());
mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),
this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,
function(u,A){try{this.spinner.stop();var B=this.createImageDataUri(u,f,"png"),F=parseInt(A.getAttribute("width")),L=parseInt(A.getAttribute("height"));this.writeImageToClipboard(B,F,L,mxUtils.bind(this,function(O){this.handleError(O)}))}catch(O){this.handleError(O)}}),null,null,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?
d:null)}catch(u){this.handleError(u)}};EditorUi.prototype.writeImageToClipboard=function(d,f,l,u){var A=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+l+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](u)};EditorUi.prototype.copyCells=function(d,f){var l=this.editor.graph;if(l.isSelectionEmpty())d.innerText="";else{var u=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),
A=mxUtils.getXml(l.encodeCells(u));mxUtils.setTextContent(d,encodeURIComponent(A));f?(l.removeCells(u,!1),l.lastPasteXml=null):(l.lastPasteXml=A,l.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};
EditorUi.prototype.pasteXml=function(d,f,l,u,A){A=null!=A?A:!0;var B=this.editor.graph,F=null;B.lastPasteXml==d?B.pasteCounter++:(B.lastPasteXml=d,B.pasteCounter=0);var L=B.pasteCounter*B.gridSize;if(l||this.isCompatibleString(d))F=this.importXml(d,L,L),B.setSelectionCells(F);else if(f&&1==B.getSelectionCount()){A=B.getStartEditingCell(B.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,
d,[A]);else{B.model.beginUpdate();try{B.labelChanged(A,d),Graph.isLink(d)&&B.setLinkForCell(A,d)}finally{B.model.endUpdate()}}B.setSelectionCell(A)}else F=B.getInsertPoint(),B.isMouseInsertPoint()&&(L=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),F=this.insertTextAt(d,F.x+L,F.y+L,A),B.setSelectionCells(F);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return F};EditorUi.prototype.pasteCells=
function(d,f,l,u){if(!mxEvent.isConsumed(d)){var A=f,B=!1;if(l&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),L=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var O=decodeURIComponent(F);this.isCompatibleString(O)&&(L=!0,F=O)}catch(ma){}L=L?null:d.clipboardData.getData("text/html");null!=L&&0<L.length?(A=this.parseHtmlData(L),B="text/plain"!=A.getAttribute("data-type")):null!=F&&0<F.length&&(A=document.createElement("div"),mxUtils.setTextContent(A,
L))}F=A.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(ma){var aa=this.editor.graph;aa.lastPasteXml==ma?aa.pasteCounter++:(aa.lastPasteXml=ma,aa.pasteCounter=0);var la=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ma,la,la));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,
f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var B=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,L,f))}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,f,u)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(l,mxUtils.bind(this,function(L){this.spinner.stop();B(L)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(L){this.spinner.stop();B(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),
200<=L.status&&299>=L.status?B(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,u)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,d,l.name))}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(L){this.spinner.stop();B(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,u)}));else{if("image/png"==l.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
this.handleError(B);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?A.readAsText(u):A.readAsDataURL(u)})(d[l])};EditorUi.prototype.openLocalFile=function(d,f,l,u,A){var B=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(d);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
function(d,f){function l(F){if(null!=F){var L=F.lastIndexOf(".");0<L&&(F=F.substring(L+1,F.length));null==f[F]&&(f[F]=!0)}}var u=this.editor.graph,A=u.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(A[mxConstants.STYLE_SHAPE]));u.model.isEdge(d)&&(l(mxMarker.getPackageForType(A[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(A[mxConstants.STYLE_ENDARROW])));A=u.model.getChildCount(d);for(var B=0;B<A;B++)this.addBasenamesForCell(u.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
if(A)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var F=B.model.cells,L;for(L in F){var O=F[L];null!=O&&null!=O.style&&(O.style+=";sketch=1;"+(-1==O.style.indexOf("fontFamily=")||-1<O.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=da(H),Pa(H,O)):this.loadDescriptor(H,mxUtils.bind(this,function(ta){Pa(Qa(),O)}),mxUtils.bind(this,function(ta){this.handleError(ta,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(B,"*");if("json"==urlParams.proto){var L=this.editor.graph.openLink;this.editor.graph.openLink=function(O,H,ja){L.apply(this,
l,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",l,null,null,null,u))}),onerror)};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var l=d.split("\n"),u=[],A=[],B=[],F={};if(0<l.length){var L={},O=this.editor.graph,H=null,ja=null,da=null,ca=null,ia=null,ma=null,aa=null,la="whiteSpace=wrap;html=1;",X=null,
"levelspacing"==Aa?ha=parseFloat(ya):"layout"==Aa&&(za=ya)}}}if(null==l[ta])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[ta].replace(/\r$/,""));Da=d=null;Aa=[];for(ya=0;ya<Ra.length;ya++)X==Ra[ya]&&(d=ya),P==Ra[ya]&&(Da=ya),Aa.push(mxUtils.trim(Ra[ya]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Aa[0]+"%");if(null!=Ma)for(var Wa=0;Wa<Ma.length;Wa++)null==L[Ma[Wa].to]&&(L[Ma[Wa].to]={});X=[];for(ya=ta+1;ya<l.length;ya++){var La=
[v])):(O.model.setStyle(Ea,v.style),0>mxUtils.indexOf(B,Ea)&&B.push(Ea),O.fireEvent(new mxEventObject("cellsInserted","cells",[Ea])));l=null!=Ea;Ea=v;if(!l)for(Wa=0;Wa<Ma.length;Wa++)L[Ma[Wa].to][Ea.getAttribute(Ma[Wa].to)]=Ea;null!=Qa&&"link"!=Qa&&(O.setLinkForCell(Ea,Ea.getAttribute(Qa)),O.setAttributeForCell(Ea,Qa,null));var ea=this.editor.graph.getPreferredSizeForCell(Ea);P=null!=Da?O.model.getCell(U+La[Da]):null;if(Ea.vertex){ab=null!=P?0:xa;ta=null!=P?0:Ca;null!=W&&null!=Ea.getAttribute(W)&&
function(jb,ib,mb){var wb=ib.getAttribute(mb.from);if(null!=wb&&""!=wb){wb=wb.split(",");for(var xb=0;xb<wb.length;xb++){var rb=L[mb.to][wb[xb]];if(null==rb&&null!=ma){rb=new mxCell(wb[xb],new mxGeometry(xa,Ca,0,0),ma);rb.style=O.replacePlaceholders(ib,rb.style,H);var nb=this.editor.graph.getPreferredSizeForCell(rb);rb.geometry.width=nb.width+qa;rb.geometry.height=nb.height+qa;L[mb.to][wb[xb]]=rb;rb.vertex=!0;rb.id=wb[xb];B.push(O.addCell(rb))}if(null!=rb){nb=mb.label;null!=mb.fromlabel&&(nb=(ib.getAttribute(mb.fromlabel)||
this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var M=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
function(d){var f=M.apply(this,arguments),l=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});Editor.enableCssDarkMode||this.addListener("darkModeChanged",l);this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return f};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var f=0;f<d.length;f++)this.libraryLoaded(d[f].file,d[f].images,d[f].title,null!=d[f].div?"none"!=d[f].div.style.display:
this.exportDialog=null);V.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,l,u,A,B,F,L){var O=d.editor.graph;if("xml"==l)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==l)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(O.getSvg(u,A,B)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),ja=O.getGraphBounds(),da=Math.floor(ja.width*
A/O.view.scale),ca=Math.floor(ja.height*A/O.view.scale);if(H.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(d.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!d.isExportToCanvas()){var ia={globalVars:O.getExportVariables()};L&&(ia.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});d.saveRequest(f,l,function(ma,aa){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(aa||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(ia))+(0<F?
"&dpi="+F:"")+"&bg="+(null!=u?u:"none")+"&w="+da+"&h="+ca+"&border="+B+"&xml="+encodeURIComponent(H))})}else"png"==l?d.exportImage(A,null==u||"none"==u,!0,!1,!1,B,!0,!1,null,L,F):d.exportImage(A,!1,!0,!1,!1,B,!0,!1,"jpeg",L);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var u=d;this.currentPage!=this.pages[l]&&(u=this.createTemporaryGraph(d.getStylesheet()),
document.createElement("div");A.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";A.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var L=F[d];if("R"==L.substring(0,1)){var O=JSON.parse(decodeURIComponent(L.substring(1)));B[O[0]]={id:O[0],title:O[1],downloadUrl:O[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){A.innerText="";
function(d){var f=d.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,l,u,A){var B=!0,F=window.setTimeout(mxUtils.bind(this,function(){B=!1;A({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),L=mxUtils.bind(this,function(){window.clearTimeout(F);
B&&u.apply(this,arguments)}),O=mxUtils.bind(this,function(){window.clearTimeout(F);B&&A.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:L,error:O});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var l=mxUtils.bind(this,function(H,ja){var da={event:"remoteInvokeResponse",
msgMarkers:d.msgMarkers};null!=ja?da.error={errResp:ja}:null!=H&&(da.resp=H);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var u=d.funtionName,A=this.remoteInvokableFns[u];if(null!=A&&"function"===typeof this[u]){if(A.allowedDomains){for(var B=!1,F=0;F<A.allowedDomains.length;F++)if(f=="https://"+A.allowedDomains[F]){B=!0;break}if(!B){l(null,"Invalid Call: "+u+" is not allowed.");return}}var L=d.functionArgs;Array.isArray(L)||(L=[]);if(A.isAsync)L.push(function(){l(Array.prototype.slice.apply(arguments))}),
L.push(function(H){l(null,H||"Unkown Error")}),this[u].apply(this,L);else{var O=this[u].apply(this,L);l([O])}}else l(null,"Invalid Call: "+u+" is not found.")}catch(H){l(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var u=l.open("database",2);u.onupgradeneeded=function(A){try{var B=u.result;1>A.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});
function(F){if(!F||"1"==urlParams.forceMigration){var L=document.createElement("iframe");L.style.display="none";L.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(L);var O=!0,H=!1,ja,da=0,ca=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",!0);L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ia=mxUtils.bind(this,function(){da++;ma()}),ma=mxUtils.bind(this,
function(){try{if(da>=ja.length)ca();else{var la=ja[da];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(X){null==X||".scratchpad"==la&&X==this.emptyLibraryXml?L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):ia()}),ia)}}catch(X){console.log(X)}}),aa=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,
data:la.data}],ia,ia,["filesInfo","files"])}catch(X){console.log(X)}});F=mxUtils.bind(this,function(la){try{if(la.source==L.contentWindow){var X={};try{X=JSON.parse(la.data)}catch(P){}"init"==X.event?(L.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),L.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=X.event||H||(O?null!=X.resp&&0<X.resp.length&&null!=X.resp[0]?(ja=X.resp[0],O=!1,ma()):
function(B){try{A=A||"objects";Array.isArray(A)||(A=[A],d=[d],f=[f]);var F=B.transaction(A,"readwrite");F.oncomplete=l;F.onerror=u;for(B=0;B<A.length;B++)F.objectStore(A[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(L){null!=u&&u(L)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,f,l,u){this.openDatabase(mxUtils.bind(this,function(A){u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);A=A.transaction(u,"readwrite");A.oncomplete=f;A.onerror=l;for(var B=0;B<u.length;B++)A.objectStore(u[B]).delete(d[B])}),
function(d,f,l,u,A,B,F,L){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,l,u,A,B,F,L)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,l,u,A,B,F,L,O,H,ja,da,ca,ia,ma,aa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,l,u,A,B,F,L,O,H,ja,da,ca,ia,ma,aa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
mxUtils.write(ia,mxResources.get("timeAgo",[ma],"{1} ago"));ia.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function G(ca){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ia);ca.busyImg=ia}function M(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function V(ca,ia,ma,aa,la){function X(Z,ba,ha){var qa=document.createElement("li");
ca.addReply(Ba,function(Ma){Ba.id=Ma;ca.replies.push(Ba);R(za);ha&&ha()},function(Ma){xa();M(za);b.handleError(Ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function xa(){K(Ba,za,function(Ma){pa()},!0)}var Ca=P().pdiv,Ba=b.newComment(Z,b.getCurrentUser());Ba.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var za=V(Ba,ca.replies,Ca,aa+1);ba?xa():pa()}if(la||!ca.isResolved){F.style.display="none";var k=document.createElement("div");k.className="geCommentContainer";
!f||X(mxResources.get("reply"),function(){U("",!0)},ca.isResolved);J=b.getCurrentUser();null==J||J.id!=ca.user.id||d||ca.isLocked||(X(mxResources.get("edit"),function(){function Z(){K(ca,k,function(){G(k);ca.editComment(ca.content,function(){R(k)},function(ba){M(k);Z();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Z()},ca.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(k);ca.deleteComment(function(Z){if(!0===
Z){Z=k.querySelector(".geCommentTxt");Z.innerText="";mxUtils.write(Z,mxResources.get("msgDeleted"));var ba=k.querySelectorAll(".geCommentAction");for(Z=0;Z<ba.length;Z++)ba[Z].parentNode.removeChild(ba[Z]);R(k);k.style.opacity="0.5"}else{ba=P(ca).replies;for(Z=0;Z<ba.length;Z++)B.removeChild(ba[Z]);for(Z=0;Z<ia.length;Z++)if(ia[Z]==ca){ia.splice(Z,1);break}F.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(Z){M(k);b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
Editor.darkColor:"whiteSmoke";B.style.bottom=parseInt(A)+7+"px";u.appendChild(B);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var L=document.createElement("div");L.className="geToolbarContainer geCommentsToolbar";L.style.height=A;L.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A=document.createElement("a");A.className="geButton";if(!d){var O=A.cloneNode();O.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
O.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(O,"click",function(ca){function ia(){K(ma,aa,function(la){G(aa);b.addComment(la,function(X){la.id=X;ja.push(la);R(aa)},function(X){M(aa);ia();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),aa=V(ma,ja,null,0);ia();ca.preventDefault();mxEvent.consume(ca)});L.appendChild(O)}O=A.cloneNode();O.innerHTML='<img class="geAdaptiveAsset" src="'+
IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';O.setAttribute("title",mxResources.get("showResolved"));O.className="geButton";var H=!1;mxEvent.addListener(O,"click",function(ca){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";da();ca.preventDefault();mxEvent.consume(ca)});L.appendChild(O);b.commentsRefreshNeeded()&&(O=A.cloneNode(),O.innerHTML='<img class="geAdaptiveAsset" src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',O.setAttribute("title",mxResources.get("refresh")),
O.className="geButton",mxEvent.addListener(O,"click",function(ca){da();ca.preventDefault();mxEvent.consume(ca)}),L.appendChild(O));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,"click",function(ca){q();ca.preventDefault();mxEvent.consume(ca)}),L.appendChild(A));u.appendChild(L);var ja=[],da=mxUtils.bind(this,function(){this.hasError=
mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});da();this.refreshComments=da;L=mxUtils.bind(this,function(){function ca(X){var P=ma[X.id];if(null!=P)for(S(X,P),P=0;null!=X.replies&&P<X.replies.length;P++)ca(X.replies[P])}if(this.window.isVisible()){for(var ia=B.querySelectorAll(".geCommentDate"),ma={},aa=0;aa<ia.length;aa++){var la=ia[aa];ma[la.getAttribute("data-commentId")]=la}for(aa=
0;aa<ja.length;aa++)ca(ja[aa])}});setInterval(L,6E4);this.refreshCommentsTime=L;this.window=new mxWindow(mxResources.get("comments"),u,e,g,n,y,!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,n,y,
q,E,K,S,G,M){var R=document.createElement("div");R.style.textAlign="center";M=null!=M?M:44;var V=document.createElement("div");V.style.padding="6px";V.style.overflow="auto";V.style.maxHeight=M+"px";V.style.lineHeight="1.2em";mxUtils.write(V,e);R.appendChild(V);null!=G&&(V=document.createElement("div"),V.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),V.appendChild(e),R.appendChild(V));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";E!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){E=K.getProperty("edit").changes;for(K=0;K<E.length;K++)if(E[K]instanceof RenamePage||E[K]instanceof ChangePage||E[K]instanceof mxRootChange){this.updateTabContainer();
function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var M=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(M,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(n,E,null,K);mxEvent.addGestureListeners(e,E,null,K)};
return null==Z||ba});var J=aa.geometry.width+40,W=aa.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?J=0:la==mxConstants.DIRECTION_NORTH?(J=0,W=-W):la==mxConstants.DIRECTION_WEST?(J=-J,W=0):la==mxConstants.DIRECTION_EAST&&(W=0);f.moveCells(z,J,W);return f.addCells(P,U)}finally{f.model.endUpdate()}}function M(aa,la){f.model.beginUpdate();try{var X=f.model.getParent(aa),P=f.getIncomingTreeEdges(aa),U=K(aa);0==P.length&&(P=[f.createEdge(X,null,"",null,null,f.createCurrentEdgeStyle())],U=la);var k=
f.model.getTerminal(ba[0],!0);P=this.cloneCell(ba[0]);this.addEdge(P,f.getDefaultParent(),T,J[Z])}}finally{this.model.endUpdate()}return J};if(null!=d.sidebar){var L=d.sidebar.dropAndConnect;d.sidebar.dropAndConnect=function(aa,la,X,P){var U=f.model,k=null;U.beginUpdate();try{if(k=L.apply(this,arguments),n(aa))for(var z=0;z<k.length;z++)if(U.isEdge(k[z])&&null==U.getTerminal(k[z],!0)){U.setTerminal(k[z],aa,!0);var J=f.getCellGeometry(k[z]);J.points=null;null!=J.getTerminalPoint(!0)&&J.setTerminalPoint(null,
G(la):M(la):13==aa.which&&(X=S(la,!mxEvent.isShiftDown(aa)))),null!=X&&0<X.length?(1==X.length&&f.model.isEdge(X[0])?f.setSelectionCell(f.model.getTerminal(X[0],!1)):f.setSelectionCell(X[X.length-1]),null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(la)),f.startEditingAtCell(la),mxEvent.consume(aa)):37==aa.keyCode?(V(la,mxConstants.DIRECTION_WEST),mxEvent.consume(aa)):38==aa.keyCode?(V(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(aa)):39==aa.keyCode?(V(la,mxConstants.DIRECTION_EAST),mxEvent.consume(aa)):
40==aa.keyCode&&(V(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(aa)))}}catch(P){d.handleError(P)}mxEvent.isConsumed(aa)||H.apply(this,arguments)};var ja=f.connectVertex;f.connectVertex=function(aa,la,X,P,U,k,z){var J=f.getIncomingTreeEdges(aa);if(n(aa)){var W=K(aa),T=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST,Z=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;return W==la||0==J.length?M(aa,la):T==Z?G(aa):S(aa,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ja.apply(this,
G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),S.style);M.geometry.relative=!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);var R=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 f=new mxCell("",new mxGeometry(0,0,0,0),S.style);f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);q.insert(S);q.insert(M);q.insert(V);q.insert(f);q.insert(E);q.insert(K);q.insert(G);q.insert(R);q.insert(d);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var q=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;');
S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);K.insertEdge(S,!1);var G=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");M.geometry.relative=
!0;M.edge=!0;E.insertEdge(M,!0);G.insertEdge(M,!1);q.insert(S);q.insert(M);q.insert(E);q.insert(K);q.insert(G);return sb.createVertexTemplateFromCells([q],q.geometry.width,q.geometry.height,q.value)}),this.addEntry("tree root",function(){var q=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"};');y.setAttributeForCell(q,"treeRoot","1");q.vertex=!0;return sb.createVertexTemplateFromCells([q],
f.parentNode&&f.parentNode.removeChild(f)}))};var M=!1;EditorUi.prototype.initFormatWindow=function(){if(!M&&null!=this.formatWindow){M=!0;var V=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){V.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+d-140+"px"):(this.div.style.width=d+"px",this.table.style.width=this.div.style.width,
L.insertBefore(Ba,B.statusContainer):L.appendChild(Ba);null!=Ca?(Ba.style.backgroundImage="url("+Ca+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,ha);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(za){za.preventDefault()}));mxEvent.addListener(Ba,"click",function(za){"disabled"!=Ba.getAttribute("disabled")&&qa(za);mxEvent.consume(za)});
"0 4px 0 4px";ra.style.height="30px";ra.style.position="relative";ra.style.top="0px";for(var pa=0;pa<ha.length;pa++)null!=ha[pa]&&(ha[pa].style.margin="0px",ha[pa].style.boxShadow="none",ra.appendChild(ha[pa]));null!=qa&&mxUtils.setOpacity(ra,qa);null!=B.statusContainer?L.insertBefore(ra,B.statusContainer):L.appendChild(ra);return ra}function l(){for(var ha=L.firstChild;null!=ha;){var qa=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=qa}O=L.firstChild;
this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=n&&(b(this,!0),this.formatWindow.window.setVisible(!0));var B=this,F=B.editor.graph;B.toolbar=this.createToolbar(B.createDiv("geToolbar"));B.defaultLibraryName=mxResources.get("untitledLibrary");var L=document.createElement("div");L.className="geMenubarContainer";var O=null,H=new Menubar(B,L);B.statusContainer=B.createStatusContainer();B.statusContainer.style.position="relative";B.statusContainer.style.maxWidth="";B.statusContainer.style.color=
"gray";B.statusContainer.style.cursor="default";var ja=B.hideCurrentMenu;B.hideCurrentMenu=function(){ja.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var da=B.descriptorChanged;B.descriptorChanged=function(){da.apply(this,arguments);var ha=B.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var qa=ha.getMode();"google"==qa?qa="googleDrive":"github"==qa?qa="gitHub":"gitlab"==qa?qa="gitLab":"onedrive"==qa&&(qa="oneDrive");qa=mxResources.get(qa);L.setAttribute("title",ha.getTitle()+
(null!=qa?" ("+qa+")":""))}else L.removeAttribute("title")};B.setStatusText(B.editor.getStatus());L.appendChild(B.statusContainer);B.buttonContainer=document.createElement("div");B.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;";L.appendChild(B.buttonContainer);B.menubarContainer=B.buttonContainer;B.tabContainer=document.createElement("div");B.tabContainer.className=
B.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=B.actions.get("zoomIn"),P=B.actions.get("zoomOut"),U=B.actions.get("resetView"),k=B.actions.get("undo"),z=B.actions.get("redo"),J=d("",k.funct,null,mxResources.get("undo")+" ("+k.shortcut+")",k,Editor.undoImage),W=d("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),T=d("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage);L.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
B.editor.addListener("resetGraphView",qa);B.editor.addListener("pageSelected",qa);B.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(ra,pa){qa(ra,pa,pa.getProperty("factor"))}))})(Z);var ba=B.setGraphEnabled;B.setGraphEnabled=function(){ba.apply(this,arguments);null!=this.tabContainer&&(Z.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(L);
function(l){return K.getImageUrl(l)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<S.length){if(null!=this.pageId)for(var G=0;G<S.length;G++)if(this.pageId==S[G].getAttribute("id")){this.currentPage=G;break}var M=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(l){var u=S[K.currentPage];return"page"==l?u.getAttribute("name")||"Page-"+(K.currentPage+
1):"pagenumber"==l?K.currentPage+1:"pagecount"==l?S.length:M.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(l){this.handlingResize||(this.currentPage=mxUtils.mod(l,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(l){l=this.getIndexById(l);var u=0<=l;u&&this.selectPage(l);return u};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=
E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(da,ca){},mouseUp:function(da,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-ca.getGraphX())<K&&Math.abs(this.startY-ca.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?y():q(30))}})}for(var S=this.toolbarItems,G=0,M=mxUtils.bind(this,function(da,ca,ia,ma){da=this.createToolbarButton(da,ca,ia,ma);e.appendChild(da);
G++;return da}),R=null,V=null,d=null,f=null,l=0;l<S.length;l++){var u=S[l];if("pages"==u){f=b.ownerDocument.createElement("div");f.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;color:#000;";mxUtils.setOpacity(f,70);var A=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";
A.style.paddingLeft="0px";A.style.paddingRight="0px";e.appendChild(f);var B=M(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";u=mxUtils.bind(this,function(){f.innerText="";mxUtils.write(f,this.currentPage+1+" / "+this.diagrams.length);f.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=f.style.display;B.style.display=f.style.display});this.addListener("graphChanged",
u);u()}else if("zoom"==u)this.zoomEnabled&&(M(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),M(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),M(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"==u){if(this.layersEnabled){var F=this.graph.getModel(),L=M(mxUtils.bind(this,function(da){if(null!=R)R.parentNode.removeChild(R),R=null;else{R=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ia=this.graph.getGraphBounds(),ma=this.graph.view;0>ia.x||0>ia.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale}):null!=this.graph.originalViewState&&
0<ia.x/ma.scale+this.graph.originalViewState.translate.x-ma.translate.x&&0<ia.y/ma.scale+this.graph.originalViewState.translate.y-ma.translate.y&&(ma.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ma.translate.clone(),scale:ma.scale})}}));mxEvent.addListener(R,"mouseleave",function(){R.parentNode.removeChild(R);R=null});da=L.getBoundingClientRect();R.style.width="140px";R.style.padding=
document.body.appendChild(R)}}),Editor.layersImage,mxResources.get("layers")||"Layers");F.addListener(mxEvent.CHANGE,function(){L.style.display=1<F.getChildCount(F.root)?"inline-block":"none"});L.style.display=1<F.getChildCount(F.root)?"inline-block":"none"}}else if("tags"==u){if(this.tagsEnabled){var O=M(mxUtils.bind(this,function(da){null==V&&(V=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),V.div.getElementsByTagName("div")[0].style.position="",V.div.style.maxHeight="160px",
"inline-block":"none"}}else"lightbox"==u?this.lightboxEnabled&&M(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(u=this.graphConfig["toolbar-buttons"][u],null!=u&&(u.elem=M(null==u.enabled||u.enabled?u.handler:function(){},u.image,u.title,u.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),
document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=E,GraphViewer.resizeSensorEnabled=!0,K.apply(this,arguments))};var S=y.editor.graph,G=S.container;G.style.overflow="hidden";this.lightboxChrome&&null==b?(G.style.border="1px solid #c0c0c0",G.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",q)):(e.style.display="none",g.style.display="none");var M=this;S.getImageFromBundles=function(V){return M.getImageUrl(V)};var R=y.createTemporaryGraph;
y.createTemporaryGraph=function(){var V=R.apply(this,arguments);V.getImageFromBundles=function(d){return M.getImageUrl(d)};return V};this.graphConfig.move&&(S.isMoveCellsEvent=function(V){return!0});mxUtils.setPrefixedStyle(G.style,"border-radius","4px");G.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(S,y);window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){y.destroy()}),G.style.outline=
d.appendChild(d.resizeSensor);"static"==q(d,"position")&&(d.style.position="relative");var l=d.resizeSensor.childNodes[0],u=l.childNodes[0],A=d.resizeSensor.childNodes[1],B=function(){u.style.width="100000px";u.style.height="100000px";l.scrollLeft=1E5;l.scrollTop=1E5;A.scrollLeft=1E5;A.scrollTop=1E5};B();var F=!1,L=function(){d.resizedAttached&&(F&&(d.resizedAttached.call(),F=!1),b(L))};b(L);var O,H,ja,da;f=function(){if((ja=d.offsetWidth)!=O||(da=d.offsetHeight)!=H)F=!0,O=ja,H=da;B()};var ca=function(ia,
ma,aa){ia.attachEvent?ia.attachEvent("on"+ma,aa):ia.addEventListener(ma,aa)};ca(l,"scroll",f);ca(A,"scroll",f)}var K=function(){GraphViewer.resizeSensorEnabled&&n()};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;K();S=null;G=!1},200))})).observe(g)}else{var M=Object.prototype.toString.call(g),R="[object Array]"===M||"[object NodeList]"===M||"[object HTMLCollection]"===
M||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){M=0;for(var V=g.length;M<V;M++)E(g[M],K)}else E(g,K);this.detach=function(){if(R)for(var d=0,f=g.length;d<f;d++)e.detach(g[d]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
var mxClient={VERSION:"21.6.3",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/"),
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b,c){b=null!=b?b:!1;var d=null;if(null!=a)for(var e=0;e<a.length;e++)if(b||this.model.isVertex(a[e])){var f=this.getCellGeometry(a[e]);if(null!=f){var g=null;if(this.model.isEdge(a[e])){g=function(m){null!=m&&(null==k?k=new mxRectangle(m.x,m.y,0,0):k.add(new mxRectangle(m.x,m.y,0,0)))};null==this.model.getTerminal(a[e],!0)&&g(f.getTerminalPoint(!0));null==this.model.getTerminal(a[e],!1)&&g(f.getTerminalPoint(!1));f=f.points;if(null!=f&&0<f.length)for(var k=
new mxRectangle(f[0].x,f[0].y,0,0),l=1;l<f.length;l++)g(f[l]);g=k}else l=this.model.getParent(a[e]),f.relative?this.model.isVertex(l)&&l!=this.view.currentRoot&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g=new mxRectangle(f.x*k.width,f.y*k.height,f.width,f.height),0<=mxUtils.indexOf(null!=c?c:a,l)&&(g.x+=k.x,g.y+=k.y))):(g=mxRectangle.fromRectangle(f),this.model.isVertex(l)&&0<=mxUtils.indexOf(null!=c?c:a,l)&&(k=this.getBoundingBoxFromGeometry([l],!1,null!=c?c:a),null!=k&&(g.x+=
k.x,g.y+=k.y))),null!=g&&null!=f.offset&&(g.x+=f.offset.x,g.y+=f.offset.y),f=this.getCurrentCellStyle(a[e]),null!=g&&(f=mxUtils.getValue(f,mxConstants.STYLE_ROTATION,0),0!=f&&(g=mxUtils.getBoundingBox(g,f)));null!=g&&(null==d?d=mxRectangle.fromRectangle(g):d.add(g))}}return d};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};
mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();a=b.getEvent();var c=mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)&&!this.graph.isSelectionEmpty();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null!=b.getState()||c)&&!mxEvent.isMultiTouchEvent(a)){var d=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(d,b);this.cell=null;null==d&&c&&(d=this.graph.getSelectionCell());this.isSelectEnabled()&&!this.delayedSelection&&
this.graph.selectCellForEvent(d,a);this.isMoveEnabled()&&(this.delayedSelection?this.cell=d:this.start(d,b.getX(),b.getY()),this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b))}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
		div.innerHTML = Graph.sanitizeHtml(html);
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,s)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const c={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return c;default:return e(r)}}))).then((e=>{const r=s(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-99ba3a23"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"3d87e1ac794210afee0fd4c0f4b4282c"},{url:"js/extensions.min.js",revision:"f9315e4b6e30eabd31fe2056ebb3cebd"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"032c895c801a1442b9bd93e838b5d616"},{url:"js/shapes-14-6-5.min.js",revision:"95f54e7999c9fba2a1d65b4fe4f634f3"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"d29a8e0ad73c5cfd3dc1e35361bf558b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"9ef237732b381ca42443073a0a03730f"},{url:"styles/atlas.css",revision:"d627cfef208f13a9cff1670f143c6348"},{url:"styles/dark.css",revision:"e01f048ea775be6d6d4f0a49ca1e5ab2"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"5dc509c9a67485e0931abebe42a1fb7f"},{url:"connect/jira/editor-1-3-3.html",revision:"a583c5c1dac9945f6f4087c880e26854"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"801fc4ef821f5a3986902998da85b53a"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"b20590b5ba995880eb6778e092a3fd50"},{url:"connect/jira/viewerPanel.js",revision:"b70ea4d572fe9d07867d955c408f5c27"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"a109a49b6c8f23095fbc1a2a88912d3b"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"ee6764429bf47a8545aa1cedacee718e"},{url:"plugins/cConf-1-4-8.js",revision:"91c04e236ba9dbdb26d8565b3354e00a"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"ad2f6b12c4701840a46b8e24ecdeca37"},{url:"connect/new_common/cac.js",revision:"6d666b6789b51dabc5a1af53a9db5d3d"},{url:"connect/gdrive_common/gac.js",revision:"78f85e79f15f56b8b8d83c90f4a15679"},{url:"connect/onedrive_common/ac.js",revision:"d10d4603e86da7c9af277dac832e8e06"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"8f66d9ae8a8941fd230fbafbbc9eccd4"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4a9a11f6de154cbd7a2df9e45790daf1"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"b2908e71f755a069fe6487e1e705736c"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ed9daba2190b293a1c7ba13b649f5149"},{url:"connect/confluence/includeDiagram.html",revision:"4df629a5bfba840368ab8185ce27f439"},{url:"connect/confluence/macro-editor.js",revision:"0bd745f0c23bba15ad1ff8e7b8e14987"},{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:"070e99e620b678d6efebce77a4f78f22"},{url:"resources/dia_am.txt",revision:"24490041dc0894101a9b8591ff857f27"},{url:"resources/dia_ar.txt",revision:"3b3af114a9176b766911ba777ab9dfe5"},{url:"resources/dia_bg.txt",revision:"8d8e4f730161bb04f50a46ecafedd843"},{url:"resources/dia_bn.txt",revision:"d633c8ed9bc728d3dcf95c7794e7faa2"},{url:"resources/dia_bs.txt",revision:"37a27a661006878596314fe2941328bc"},{url:"resources/dia_ca.txt",revision:"2ad8d0e087f22b51ebd2e37172164b74"},{url:"resources/dia_cs.txt",revision:"4ce02dafa392719ff1de8c87cc52c671"},{url:"resources/dia_da.txt",revision:"5a5f4f660dd914feccacbb0cb1f477ba"},{url:"resources/dia_de.txt",revision:"6cbfac1e7e7389574136f0d6850325d9"},{url:"resources/dia_el.txt",revision:"4db0fad8e6b18cb4dad60675a9d9e6c1"},{url:"resources/dia_eo.txt",revision:"12d3e6e93626859d7f1fe0415b508ec2"},{url:"resources/dia_es.txt",revision:"f7186238aa7dd9ac210feb9ff9b884c8"},{url:"resources/dia_et.txt",revision:"1f41cee18f340ad3d058ad583e1968dc"},{url:"resources/dia_eu.txt",revision:"7077ebc436cf486b8dbb58a50c78a929"},{url:"resources/dia_fa.txt",revision:"c4e691b90109e399a4916dd858997ad1"},{url:"resources/dia_fi.txt",revision:"ec22566aa2aa48802c2e0d0e282089a0"},{url:"resources/dia_fil.txt",revision:"50c50d6fd55165344c5bac76d0a7b163"},{url:"resources/dia_fr.txt",revision:"bdde1f332647bcc1f7e442192149c2f6"},{url:"resources/dia_gl.txt",revision:"b2511dfa377ed0c4f4aef554b0cdd48a"},{url:"resources/dia_gu.txt",revision:"f2e237fae11c6d5d9c14c6a90526b7c4"},{url:"resources/dia_he.txt",revision:"316568ef9660c8faff3acbbff4bb1d5d"},{url:"resources/dia_hi.txt",revision:"90a9db5a1781eee9f09b9e01dff4672b"},{url:"resources/dia_hr.txt",revision:"1c36344956001e327a563b697bb777e8"},{url:"resources/dia_hu.txt",revision:"8f3f05139ddb0faf2dc9e65ff2739bee"},{url:"resources/dia_id.txt",revision:"15028adb2a38c12911c2cfb527a6673a"},{url:"resources/dia_it.txt",revision:"20fe98f5e74fdd93428139a2755dfeb2"},{url:"resources/dia_ja.txt",revision:"86c5ab25c3ed29509d50c09ef6daf8d4"},{url:"resources/dia_kn.txt",revision:"9f895e516c96aef05ad7bbf62e0a6d0f"},{url:"resources/dia_ko.txt",revision:"454b3f239e3ea2527c296f319b25aa15"},{url:"resources/dia_lt.txt",revision:"423e99457a2e3c19b8139df72b779e57"},{url:"resources/dia_lv.txt",revision:"66139e41b90a0e3f7841f6022ec8c4ac"},{url:"resources/dia_ml.txt",revision:"a04f0a3a9a44e7a47acd6c8dfee48cde"},{url:"resources/dia_mr.txt",revision:"5ecae95143f9ddd8ea47b89fc4a32779"},{url:"resources/dia_ms.txt",revision:"33edd41052e9978263ddef6edce046a0"},{url:"resources/dia_my.txt",revision:"070e99e620b678d6efebce77a4f78f22"},{url:"resources/dia_nl.txt",revision:"fbbeafc95e4713743b2c5d1c578815c5"},{url:"resources/dia_no.txt",revision:"8c27b73d22827c38d5a3f0abcddf38b9"},{url:"resources/dia_pl.txt",revision:"a61057ccce1c943ee529a80c3572414a"},{url:"resources/dia_pt-br.txt",revision:"c7ad6374f86e3a7a82e163df81fa4f46"},{url:"resources/dia_pt.txt",revision:"11f18646f93aea3a125cf86afa7ed0b9"},{url:"resources/dia_ro.txt",revision:"4ea38fe9313df43ae827a7b56ddf407a"},{url:"resources/dia_ru.txt",revision:"fd2f0eb15bffe3d931f1265f3f7b5e18"},{url:"resources/dia_si.txt",revision:"070e99e620b678d6efebce77a4f78f22"},{url:"resources/dia_sk.txt",revision:"34cc4e6486b2f60f040da88f93fe93e6"},{url:"resources/dia_sl.txt",revision:"06a69daf3b2dbc5ed5c0a37ebd337bb6"},{url:"resources/dia_sr.txt",revision:"8a143e1230a6681bd24f0c5f28e5aade"},{url:"resources/dia_sv.txt",revision:"562ddf8fb3b86def0cd652b3c8526560"},{url:"resources/dia_sw.txt",revision:"b09b88a0dcf41e07dbbad5a217f4b039"},{url:"resources/dia_ta.txt",revision:"951784d11df6d9379a0ac67b66093a41"},{url:"resources/dia_te.txt",revision:"8eaa7eeacd4dac3c144bbc77f9da6041"},{url:"resources/dia_th.txt",revision:"7882c1b3a63b81c1b7855fe914c820a3"},{url:"resources/dia_tr.txt",revision:"659bd72b2d3cfe48c7aa55fad1cffdd5"},{url:"resources/dia_uk.txt",revision:"dd7945dee90ea3eee794a2b19d40f656"},{url:"resources/dia_vi.txt",revision:"4f79d38f2c9089a5b3e9fd6e477ac2f3"},{url:"resources/dia_zh-tw.txt",revision:"51b5d3b75dfa4a8a4b8b66752a0e97aa"},{url:"resources/dia_zh.txt",revision:"3dcb691f4b2abf2b91da630dba0082af"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"389fa448cb99794bece27ffcb216abee"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{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:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{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/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"618b42f0bde0c7685e04811c25dc2b3e"},{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:[/.*/]})}));
{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/a4ffb1112d7cec30405ea284278eb769/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/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.addEventListener('message', (event) => {\n  if (event.data && event.data.type === 'SKIP_WAITING') {\n    self.skipWaiting();\n  }\n});\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\": \"3d87e1ac794210afee0fd4c0f4b4282c\"\n  },\n  {\n    \"url\": \"js/extensions.min.js\",\n    \"revision\": \"f9315e4b6e30eabd31fe2056ebb3cebd\"\n  },\n  {\n    \"url\": \"js/orgchart.min.js\",\n    \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n  },\n  {\n    \"url\": \"js/stencils.min.js\",\n    \"revision\": \"032c895c801a1442b9bd93e838b5d616\"\n  },\n  {\n    \"url\": \"js/shapes-14-6-5.min.js\",\n    \"revision\": \"95f54e7999c9fba2a1d65b4fe4f634f3\"\n  },\n  {\n    \"url\": \"js/math-print.js\",\n    \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n  },\n  {\n    \"url\": \"index.html\",\n    \"revision\": \"d29a8e0ad73c5cfd3dc1e35361bf558b\"\n  },\n  {\n    \"url\": \"open.html\",\n    \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n  },\n  {\n    \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n    \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n  },\n  {\n    \"url\": \"styles/grapheditor.css\",\n    \"revision\": \"9ef237732b381ca42443073a0a03730f\"\n  },\n  {\n    \"url\": \"styles/atlas.css\",\n    \"revision\": \"d627cfef208f13a9cff1670f143c6348\"\n  },\n  {\n    \"url\": \"styles/dark.css\",\n    \"revision\": \"e01f048ea775be6d6d4f0a49ca1e5ab2\"\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\": \"5dc509c9a67485e0931abebe42a1fb7f\"\n  },\n  {\n    \"url\": \"connect/jira/editor-1-3-3.html\",\n    \"revision\": \"a583c5c1dac9945f6f4087c880e26854\"\n  },\n  {\n    \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n    \"revision\": \"801fc4ef821f5a3986902998da85b53a\"\n  },\n  {\n    \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n    \"revision\": \"b20590b5ba995880eb6778e092a3fd50\"\n  },\n  {\n    \"url\": \"connect/jira/viewerPanel.js\",\n    \"revision\": \"b70ea4d572fe9d07867d955c408f5c27\"\n  },\n  {\n    \"url\": \"connect/jira/spinner.gif\",\n    \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n  },\n  {\n    \"url\": \"connect/jira/editor.js\",\n    \"revision\": \"a109a49b6c8f23095fbc1a2a88912d3b\"\n  },\n  {\n    \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n    \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n  },\n  {\n    \"url\": \"connect/jira/fullscreen-viewer.js\",\n    \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n  },\n  {\n    \"url\": \"plugins/connectJira.js\",\n    \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n  },\n  {\n    \"url\": \"plugins/cConf-comments.js\",\n    \"revision\": \"ee6764429bf47a8545aa1cedacee718e\"\n  },\n  {\n    \"url\": \"plugins/cConf-1-4-8.js\",\n    \"revision\": \"91c04e236ba9dbdb26d8565b3354e00a\"\n  },\n  {\n    \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n    \"revision\": \"ad2f6b12c4701840a46b8e24ecdeca37\"\n  },\n  {\n    \"url\": \"connect/new_common/cac.js\",\n    \"revision\": \"6d666b6789b51dabc5a1af53a9db5d3d\"\n  },\n  {\n    \"url\": \"connect/gdrive_common/gac.js\",\n    \"revision\": \"78f85e79f15f56b8b8d83c90f4a15679\"\n  },\n  {\n    \"url\": \"connect/onedrive_common/ac.js\",\n    \"revision\": \"d10d4603e86da7c9af277dac832e8e06\"\n  },\n  {\n    \"url\": \"connect/confluence/viewer-init.js\",\n    \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n  },\n  {\n    \"url\": \"connect/confluence/viewer.js\",\n    \"revision\": \"8f66d9ae8a8941fd230fbafbbc9eccd4\"\n  },\n  {\n    \"url\": \"connect/confluence/viewer-1-4-42.html\",\n    \"revision\": \"4a9a11f6de154cbd7a2df9e45790daf1\"\n  },\n  {\n    \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n    \"revision\": \"b2908e71f755a069fe6487e1e705736c\"\n  },\n  {\n    \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n    \"revision\": \"ed9daba2190b293a1c7ba13b649f5149\"\n  },\n  {\n    \"url\": \"connect/confluence/includeDiagram.html\",\n    \"revision\": \"4df629a5bfba840368ab8185ce27f439\"\n  },\n  {\n    \"url\": \"connect/confluence/macro-editor.js\",\n    \"revision\": \"0bd745f0c23bba15ad1ff8e7b8e14987\"\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\": \"070e99e620b678d6efebce77a4f78f22\"\n  },\n  {\n    \"url\": \"resources/dia_am.txt\",\n    \"revision\": \"24490041dc0894101a9b8591ff857f27\"\n  },\n  {\n    \"url\": \"resources/dia_ar.txt\",\n    \"revision\": \"3b3af114a9176b766911ba777ab9dfe5\"\n  },\n  {\n    \"url\": \"resources/dia_bg.txt\",\n    \"revision\": \"8d8e4f730161bb04f50a46ecafedd843\"\n  },\n  {\n    \"url\": \"resources/dia_bn.txt\",\n    \"revision\": \"d633c8ed9bc728d3dcf95c7794e7faa2\"\n  },\n  {\n    \"url\": \"resources/dia_bs.txt\",\n    \"revision\": \"37a27a661006878596314fe2941328bc\"\n  },\n  {\n    \"url\": \"resources/dia_ca.txt\",\n    \"revision\": \"2ad8d0e087f22b51ebd2e37172164b74\"\n  },\n  {\n    \"url\": \"resources/dia_cs.txt\",\n    \"revision\": \"4ce02dafa392719ff1de8c87cc52c671\"\n  },\n  {\n    \"url\": \"resources/dia_da.txt\",\n    \"revision\": \"5a5f4f660dd914feccacbb0cb1f477ba\"\n  },\n  {\n    \"url\": \"resources/dia_de.txt\",\n    \"revision\": \"6cbfac1e7e7389574136f0d6850325d9\"\n  },\n  {\n    \"url\": \"resources/dia_el.txt\",\n    \"revision\": \"4db0fad8e6b18cb4dad60675a9d9e6c1\"\n  },\n  {\n    \"url\": \"resources/dia_eo.txt\",\n    \"revision\": \"12d3e6e93626859d7f1fe0415b508ec2\"\n  },\n  {\n    \"url\": \"resources/dia_es.txt\",\n    \"revision\": \"f7186238aa7dd9ac210feb9ff9b884c8\"\n  },\n  {\n    \"url\": \"resources/dia_et.txt\",\n    \"revision\": \"1f41cee18f340ad3d058ad583e1968dc\"\n  },\n  {\n    \"url\": \"resources/dia_eu.txt\",\n    \"revision\": \"7077ebc436cf486b8dbb58a50c78a929\"\n  },\n  {\n    \"url\": \"resources/dia_fa.txt\",\n    \"revision\": \"c4e691b90109e399a4916dd858997ad1\"\n  },\n  {\n    \"url\": \"resources/dia_fi.txt\",\n    \"revision\": \"ec22566aa2aa48802c2e0d0e282089a0\"\n  },\n  {\n    \"url\": \"resources/dia_fil.txt\",\n    \"revision\": \"50c50d6fd55165344c5bac76d0a7b163\"\n  },\n  {\n    \"url\": \"resources/dia_fr.txt\",\n    \"revision\": \"bdde1f332647bcc1f7e442192149c2f6\"\n  },\n  {\n    \"url\": \"resources/dia_gl.txt\",\n    \"revision\": \"b2511dfa377ed0c4f4aef554b0cdd48a\"\n  },\n  {\n    \"url\": \"resources/dia_gu.txt\",\n    \"revision\": \"f2e237fae11c6d5d9c14c6a90526b7c4\"\n  },\n  {\n    \"url\": \"resources/dia_he.txt\",\n    \"revision\": \"316568ef9660c8faff3acbbff4bb1d5d\"\n  },\n  {\n    \"url\": \"resources/dia_hi.txt\",\n    \"revision\": \"90a9db5a1781eee9f09b9e01dff4672b\"\n  },\n  {\n    \"url\": \"resources/dia_hr.txt\",\n    \"revision\": \"1c36344956001e327a563b697bb777e8\"\n  },\n  {\n    \"url\": \"resources/dia_hu.txt\",\n    \"revision\": \"8f3f05139ddb0faf2dc9e65ff2739bee\"\n  },\n  {\n    \"url\": \"resources/dia_id.txt\",\n    \"revision\": \"15028adb2a38c12911c2cfb527a6673a\"\n  },\n  {\n    \"url\": \"resources/dia_it.txt\",\n    \"revision\": \"20fe98f5e74fdd93428139a2755dfeb2\"\n  },\n  {\n    \"url\": \"resources/dia_ja.txt\",\n    \"revision\": \"86c5ab25c3ed29509d50c09ef6daf8d4\"\n  },\n  {\n    \"url\": \"resources/dia_kn.txt\",\n    \"revision\": \"9f895e516c96aef05ad7bbf62e0a6d0f\"\n  },\n  {\n    \"url\": \"resources/dia_ko.txt\",\n    \"revision\": \"454b3f239e3ea2527c296f319b25aa15\"\n  },\n  {\n    \"url\": \"resources/dia_lt.txt\",\n    \"revision\": \"423e99457a2e3c19b8139df72b779e57\"\n  },\n  {\n    \"url\": \"resources/dia_lv.txt\",\n    \"revision\": \"66139e41b90a0e3f7841f6022ec8c4ac\"\n  },\n  {\n    \"url\": \"resources/dia_ml.txt\",\n    \"revision\": \"a04f0a3a9a44e7a47acd6c8dfee48cde\"\n  },\n  {\n    \"url\": \"resources/dia_mr.txt\",\n    \"revision\": \"5ecae95143f9ddd8ea47b89fc4a32779\"\n  },\n  {\n    \"url\": \"resources/dia_ms.txt\",\n    \"revision\": \"33edd41052e9978263ddef6edce046a0\"\n  },\n  {\n    \"url\": \"resources/dia_my.txt\",\n    \"revision\": \"070e99e620b678d6efebce77a4f78f22\"\n  },\n  {\n    \"url\": \"resources/dia_nl.txt\",\n    \"revision\": \"fbbeafc95e4713743b2c5d1c578815c5\"\n  },\n  {\n    \"url\": \"resources/dia_no.txt\",\n    \"revision\": \"8c27b73d22827c38d5a3f0abcddf38b9\"\n  },\n  {\n    \"url\": \"resources/dia_pl.txt\",\n    \"revision\": \"a61057ccce1c943ee529a80c3572414a\"\n  },\n  {\n    \"url\": \"resources/dia_pt-br.txt\",\n    \"revision\": \"c7ad6374f86e3a7a82e163df81fa4f46\"\n  },\n  {\n    \"url\": \"resources/dia_pt.txt\",\n    \"revision\": \"11f18646f93aea3a125cf86afa7ed0b9\"\n  },\n  {\n    \"url\": \"resources/dia_ro.txt\",\n    \"revision\": \"4ea38fe9313df43ae827a7b56ddf407a\"\n  },\n  {\n    \"url\": \"resources/dia_ru.txt\",\n    \"revision\": \"fd2f0eb15bffe3d931f1265f3f7b5e18\"\n  },\n  {\n    \"url\": \"resources/dia_si.txt\",\n    \"revision\": \"070e99e620b678d6efebce77a4f78f22\"\n  },\n  {\n    \"url\": \"resources/dia_sk.txt\",\n    \"revision\": \"34cc4e6486b2f60f040da88f93fe93e6\"\n  },\n  {\n    \"url\": \"resources/dia_sl.txt\",\n    \"revision\": \"06a69daf3b2dbc5ed5c0a37ebd337bb6\"\n  },\n  {\n    \"url\": \"resources/dia_sr.txt\",\n    \"revision\": \"8a143e1230a6681bd24f0c5f28e5aade\"\n  },\n  {\n    \"url\": \"resources/dia_sv.txt\",\n    \"revision\": \"562ddf8fb3b86def0cd652b3c8526560\"\n  },\n  {\n    \"url\": \"resources/dia_sw.txt\",\n    \"revision\": \"b09b88a0dcf41e07dbbad5a217f4b039\"\n  },\n  {\n    \"url\": \"resources/dia_ta.txt\",\n    \"revision\": \"951784d11df6d9379a0ac67b66093a41\"\n  },\n  {\n    \"url\": \"resources/dia_te.txt\",\n    \"revision\": \"8eaa7eeacd4dac3c144bbc77f9da6041\"\n  },\n  {\n    \"url\": \"resources/dia_th.txt\",\n    \"revision\": \"7882c1b3a63b81c1b7855fe914c820a3\"\n  },\n  {\n    \"url\": \"resources/dia_tr.txt\",\n    \"revision\": \"659bd72b2d3cfe48c7aa55fad1cffdd5\"\n  },\n  {\n    \"url\": \"resources/dia_uk.txt\",\n    \"revision\": \"dd7945dee90ea3eee794a2b19d40f656\"\n  },\n  {\n    \"url\": \"resources/dia_vi.txt\",\n    \"revision\": \"4f79d38f2c9089a5b3e9fd6e477ac2f3\"\n  },\n  {\n    \"url\": \"resources/dia_zh-tw.txt\",\n    \"revision\": \"51b5d3b75dfa4a8a4b8b66752a0e97aa\"\n  },\n  {\n    \"url\": \"resources/dia_zh.txt\",\n    \"revision\": \"3dcb691f4b2abf2b91da630dba0082af\"\n  },\n  {\n    \"url\": \"favicon.ico\",\n    \"revision\": \"fab2d88b37c72d83607527573de45281\"\n  },\n  {\n    \"url\": \"images/manifest.json\",\n    \"revision\": \"389fa448cb99794bece27ffcb216abee\"\n  },\n  {\n    \"url\": \"images/logo.png\",\n    \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\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\": \"73da7989a23ce9a4be565ec65658a239\"\n  },\n  {\n    \"url\": \"images/favicon-16x16.png\",\n    \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n  },\n  {\n    \"url\": \"images/favicon-32x32.png\",\n    \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n  },\n  {\n    \"url\": \"images/android-chrome-196x196.png\",\n    \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n  },\n  {\n    \"url\": \"images/android-chrome-512x512.png\",\n    \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\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/hs.png\",\n    \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n  },\n  {\n    \"url\": \"images/aui-wait.gif\",\n    \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n  },\n  {\n    \"url\": \"mxgraph/css/common.css\",\n    \"revision\": \"618b42f0bde0c7685e04811c25dc2b3e\"\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","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"}