10.5.4 release

Former-commit-id: 5182b2c713
This commit is contained in:
Gaudenz Alder 2019-03-22 17:24:18 +01:00
parent c760d550a0
commit 9ece16e3ec
65 changed files with 279 additions and 126 deletions

View file

@ -1,3 +1,7 @@
22-MAR-2019: 10.5.4
- Adds custom libraries for Confluence cloud
21-MAR-2019: 10.5.3
- Fixes timing issue in graph viewer

View file

@ -1 +1 @@
10.5.3
10.5.4

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 03/21/2019 05:03 PM
# 03/22/2019 05:12 PM
app.html
index.html?offline=1

View file

@ -7756,7 +7756,7 @@ mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("
b)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,c);else if(this.isModified()&&this.addUnsavedStatus(a),c)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var b=null!=a?null!=a.error?a.error.message:a.message:null;null!=b&&60<b.length&&(b=b.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+")":"")+"</div>")}else if(this.isModified()&&!c&&this.isAutosave())if(null==this.lastWarned)this.lastWarned=Date.now();else if(Date.now()-this.lastWarned>this.warnInterval){b="";if(null!=this.lastSaved){var d=this.ui.timeSince(new Date(this.lastSaved));null!=d&&(b=mxResources.get("lastSaved",[d]))}this.ui.showError(mxResources.get("unsavedChanges"),b,mxResources.get("ignore"),mxUtils.bind(this,function(){this.lastWarned=
Date.now();this.ui.hideDialog();EditorUi.logEvent({category:"IGNORE-WARN-SAVE-FILE-"+this.getHash(),action:"ignore"})}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.lastWarned=Date.now();this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct();EditorUi.logEvent({category:"SAVE-WARN-SAVE-FILE-"+this.getHash(),action:"save"})}),null,null,360,120)}};
Date.now();this.ui.hideDialog();EditorUi.logEvent({category:"IGNORE-WARN-SAVE-FILE-"+this.getHash()+"-size-"+this.getSize(),action:"ignore"})}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.lastWarned=Date.now();this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct();EditorUi.logEvent({category:"SAVE-WARN-SAVE-FILE-"+this.getHash()+"-size-"+this.getSize(),action:"save"})}),null,null,360,120)}};
DrawioFile.prototype.handleConflictError=function(a,c){var b=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,b,d,null,!0,this.constructor==GitHubFile&&null!=a?a.commitMessage:null))}),e=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,
function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,b,d,null,null,this.constructor==GitHubFile&&null!=a?a.commitMessage:null)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(b,d,g):this.invalidChecksum?this.showRefreshDialog(b,d,this.getErrorMessage(a)):c?this.showConflictDialog(g,e):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(b,
d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};
@ -8226,18 +8226,18 @@ mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basi
[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",
STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];
mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=
[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var v=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,k,n,e,g,l){if(null!=c&&null==mxMarker.markers[c]){var u=
this.getPackageForType(c);null!=u&&mxStencilRegistry.getStencil(u)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(t.value))));t.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(t.value))))}function f(b){function c(b,c,d){var k=b.getGraphBounds(),n=0,e=0,g=ha.get(),v=1/b.pageScale,l=z.checked;if(l)var v=parseInt(X.value),t=parseInt(ia.value),v=Math.min(g.height*t/(k.height/b.view.scale),
g.width*v/(k.width/b.view.scale));else v=parseInt(p.value)/(100*b.pageScale),isNaN(v)&&(f=1/b.pageScale,p.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*f);g.height=Math.ceil(g.height*f);v*=f;!l&&b.pageVisible?(k=b.getPageLayout(),n-=k.x*g.width,e-=k.y*g.height):l=!0;if(null==c){c=PrintDialog.createPrintPreview(b,v,g,0,n,e,l);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var u=c.writeHead;c.writeHead=function(b){u.apply(this,arguments);
[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var v=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,f,d,k,n,e,g,l){if(null!=c&&null==mxMarker.markers[c]){var t=
this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){m.value=Math.max(1,Math.min(e,Math.max(parseInt(m.value),parseInt(u.value))));u.value=Math.max(1,Math.min(e,Math.min(parseInt(m.value),parseInt(u.value))))}function f(b){function c(b,c,d){var k=b.getGraphBounds(),n=0,e=0,g=ha.get(),v=1/b.pageScale,l=z.checked;if(l)var v=parseInt(X.value),u=parseInt(ia.value),v=Math.min(g.height*u/(k.height/b.view.scale),
g.width*v/(k.width/b.view.scale));else v=parseInt(p.value)/(100*b.pageScale),isNaN(v)&&(f=1/b.pageScale,p.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*f);g.height=Math.ceil(g.height*f);v*=f;!l&&b.pageVisible?(k=b.getPageLayout(),n-=k.x*g.width,e-=k.y*g.height):l=!0;if(null==c){c=PrintDialog.createPrintPreview(b,v,g,0,n,e,l);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var t=c.writeHead;c.writeHead=function(b){t.apply(this,arguments);
null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var m=c.renderPage;c.renderPage=function(a,b,c,f,d,k){var n=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=m.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}c.open(null,null,d,!0)}else{g=
b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=l;c.appendGraph(b,v,n,e,d,!0)}return c}var f=parseInt(ca.value)/100;isNaN(f)&&(f=1,ca.value="100 %");var f=.75*f,k=t.value,n=m.value,e=!l.checked,g=null;e&&(e=k==v&&n==v);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;l.checked||(u=parseInt(k)-1,e=parseInt(n)-1);for(var y=u;y<=e;y++){var B=a.pages[y],k=B==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),
n=!0,u=!1,x=null,A=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(n=B.viewState.pageVisible,u=B.viewState.mathEnabled,x=B.viewState.background,A=B.viewState.backgroundImage);k.background=x;k.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;k.pageVisible=n;k.mathEnabled=u;var q=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?y+1:q.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(B);
b.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=l;c.appendGraph(b,v,n,e,d,!0)}return c}var f=parseInt(ca.value)/100;isNaN(f)&&(f=1,ca.value="100 %");var f=.75*f,k=u.value,n=m.value,e=!l.checked,g=null;e&&(e=k==v&&n==v);if(!e&&null!=a.pages&&a.pages.length){var t=0,e=a.pages.length-1;l.checked||(t=parseInt(k)-1,e=parseInt(n)-1);for(var y=t;y<=e;y++){var B=a.pages[y],k=B==a.currentPage?d:null;if(null==k){var k=a.createTemporaryGraph(d.getStylesheet()),
n=!0,t=!1,x=null,A=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(n=B.viewState.pageVisible,t=B.viewState.mathEnabled,x=B.viewState.background,A=B.viewState.backgroundImage);k.background=x;k.backgroundImage=null!=A?new mxImage(A.src,A.width,A.height):null;k.pageVisible=n;k.mathEnabled=t;var q=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?y+1:q.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(B);
k.model.setRoot(B.root)}g=c(k,g,y!=e);k!=d&&k.container.parentNode.removeChild(k.container)}}else g=c(d);null==g?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(g.mathEnabled&&(e=g.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),
e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),
e.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>')),g.closeDocument(),!g.mathEnabled&&b&&PrintDialog.printPreview(g))}var d=a.editor.graph,k=document.createElement("div"),n=document.createElement("h3");n.style.width="100%";n.style.textAlign="center";n.style.marginTop="0px";mxUtils.write(n,b||mxResources.get("print"));k.appendChild(n);var e=1,v=1,g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","all");l.setAttribute("type","radio");l.setAttribute("name","pages-printdialog");g.appendChild(l);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));g.appendChild(n);mxUtils.br(g);var u=l.cloneNode(!0);l.setAttribute("checked","checked");u.setAttribute("value","range");g.appendChild(u);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+
":");g.appendChild(n);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";g.appendChild(t);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));g.appendChild(n);var m=t.cloneNode(!0);g.appendChild(m);mxEvent.addListener(t,"focus",function(){u.checked=!0});mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(t,"change",c);mxEvent.addListener(m,
"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){v=n+1;t.value=v;m.value=v;break}t.setAttribute("max",e);m.setAttribute("max",e);1<e&&k.appendChild(g);var y=document.createElement("div");y.style.marginBottom="10px";var B=document.createElement("input");B.style.marginRight="8px";B.setAttribute("value","adjust");B.setAttribute("type","radio");B.setAttribute("name","printZoom");y.appendChild(B);n=document.createElement("span");
var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","all");l.setAttribute("type","radio");l.setAttribute("name","pages-printdialog");g.appendChild(l);n=document.createElement("span");mxUtils.write(n,mxResources.get("printAllPages"));g.appendChild(n);mxUtils.br(g);var t=l.cloneNode(!0);l.setAttribute("checked","checked");t.setAttribute("value","range");g.appendChild(t);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+
":");g.appendChild(n);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";g.appendChild(u);n=document.createElement("span");mxUtils.write(n,mxResources.get("to"));g.appendChild(n);var m=u.cloneNode(!0);g.appendChild(m);mxEvent.addListener(u,"focus",function(){t.checked=!0});mxEvent.addListener(m,"focus",function(){t.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(m,
"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(n=0;n<a.pages.length;n++)if(a.currentPage==a.pages[n]){v=n+1;u.value=v;m.value=v;break}u.setAttribute("max",e);m.setAttribute("max",e);1<e&&k.appendChild(g);var y=document.createElement("div");y.style.marginBottom="10px";var B=document.createElement("input");B.style.marginRight="8px";B.setAttribute("value","adjust");B.setAttribute("type","radio");B.setAttribute("name","printZoom");y.appendChild(B);n=document.createElement("span");
mxUtils.write(n,mxResources.get("adjustTo"));y.appendChild(n);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";p.setAttribute("value","100 %");p.style.width="50px";y.appendChild(p);mxEvent.addListener(p,"focus",function(){B.checked=!0});k.appendChild(y);var g=g.cloneNode(!1),z=B.cloneNode(!0);z.setAttribute("value","fit");B.setAttribute("checked","checked");n=document.createElement("div");n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
n.appendChild(z);g.appendChild(n);y=document.createElement("table");y.style.display="inline-block";var x=document.createElement("tbody"),A=document.createElement("tr"),q=A.cloneNode(!0),I=document.createElement("td"),F=I.cloneNode(!0),E=I.cloneNode(!0),ga=I.cloneNode(!0),L=I.cloneNode(!0),ea=I.cloneNode(!0);I.style.textAlign="right";ga.style.textAlign="right";mxUtils.write(I,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value",
"1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";F.appendChild(X);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));E.appendChild(n);mxUtils.write(ga,mxResources.get("fitToBy"));var ia=X.cloneNode(!0);L.appendChild(ia);mxEvent.addListener(X,"focus",function(){z.checked=!0});mxEvent.addListener(ia,"focus",function(){z.checked=!0});n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsDown"));ea.appendChild(n);
@ -8250,7 +8250,7 @@ document.createElement("canvas"),F=new Image;F.onload=function(){try{I.getContex
var ErrorDialog=function(a,c,b,d,g,e,l,m,p,q,f){p=null!=p?p:!0;var k=document.createElement("div");k.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);k.appendChild(n)}c=
document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;k.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=q&&(q=mxUtils.button(q,function(){null!=f&&f()}),q.className="geBtn",b.appendChild(q));var u=mxUtils.button(d,function(){p&&a.hideDialog();null!=g&&g()});
u.className="geBtn";b.appendChild(u);null!=l&&(d=mxUtils.button(l,function(){p&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",b.appendChild(d));this.init=function(){u.focus()};k.appendChild(b);this.container=k};
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.5.3";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.5.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=k+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+
encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
"")}catch(n){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(n){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);
@ -8442,14 +8442,14 @@ function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary
a+";")])):/(\.*<graphml )/.test(a)?(f=!0,this.importGraphML(a,n)):null!=v&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(f=!0,this.importVisio(v,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(f=!0,this.parseFile(null!=v?v:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?n(a.responseText):null!=m&&m(null))}),l)):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||
(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,p));f||null==m||m(k);return k};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,f,e,g;c<d;){f=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);b+="==";break}e=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);
b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);b+=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,l,m,v,p,q,F){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var B=q||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>B){n=!0;break}var t=mxUtils.bind(this,function(){var n=this.editor.graph,v=n.gridSize;
e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,l,n,f,F)});g=null!=g?g:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var u=a.length,B=u,t=[],y=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--B){this.spinner.stop();if(null!=m)m(t);else{var c=[];n.getModel().beginUpdate();
try{for(var d=0;d<t.length;d++){var f=t[d]();null!=f&&(c=c.concat(f))}}finally{n.getModel().endUpdate()}}g(c)}}),x=0;x<u;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var m=a.target.result,u=m.indexOf(","),B=decodeURIComponent(escape(atob(m.substring(u+1)))),t=mxUtils.parseXml(B),B=t.getElementsByTagName("svg");if(0<B.length){var B=B[0],
x=F?null:B.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?y(f,mxUtils.bind(this,function(){try{if(m.substring(0,u+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=parseFloat(k.getAttribute("width")),p=parseFloat(k.getAttribute("height")),q=k.getAttribute("viewBox");if(null==
q||0==q.length)k.setAttribute("viewBox","0 0 "+l+" "+p);else if(isNaN(l)||isNaN(p)){var B=q.split(" ");3<B.length&&(l=parseFloat(B[2]),p=parseFloat(B[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var y=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,p)),x=e(m,g.type,b+f*v,c+f*v,Math.max(1,Math.round(l*y)),Math.max(1,Math.round(p*y)),g.name);if(isNaN(l)||isNaN(p)){var I=new Image;I.onload=mxUtils.bind(this,function(){l=Math.max(1,I.width);p=Math.max(1,I.height);x[0].geometry.width=l;x[0].geometry.height=
p;k.setAttribute("viewBox","0 0 "+l+" "+p);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));n.setCellStyles("image",m,[x[0]])});I.src=this.createSvgDataUri(mxUtils.getXml(k))}return x}}}catch(pa){}return null})):y(f,mxUtils.bind(this,function(){return e(x,"text/xml",b+f*v,c+f*v,0,0,g.name)}))}else y(f,mxUtils.bind(this,function(){return null}))}else{B=!1;if("image/png"==g.type){var I=F?null:this.extractGraphModelFromPng(a.target.result);
if(null!=I&&0<I.length){var z=new Image;z.src=a.target.result;y(f,mxUtils.bind(this,function(){return e(I,"text/xml",b+f*v,c+f*v,z.width,z.height,g.name)}));B=!0}}B||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
a.target.result,mxUtils.bind(this,function(l,n,m){y(f,mxUtils.bind(this,function(){if(null!=l&&l.length<p){var B=k&&this.isResampleImage(a.target.result,q)?Math.min(1,Math.min(d/n,d/m)):1;return e(l,g.type,b+f*v,c+f*v,Math.round(n*B),Math.round(m*B),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,q)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*v,c+f*v,240,160,g.name,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,g,l,m,v,p,q,F){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;p=null!=p?p:this.maxImageBytes;var f=null!=b&&null!=c,k=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var u=q||this.resampleThreshold,B=0;B<a.length;B++)if("image/"==a[B].type.substring(0,6)&&a[B].size>u){n=!0;break}var t=mxUtils.bind(this,function(){var n=this.editor.graph,v=n.gridSize;
e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,g,k,l,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,e,g,k,l,n,f,F)});g=null!=g?g:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var B=a.length,u=B,t=[],y=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--u){this.spinner.stop();if(null!=m)m(t);else{var c=[];n.getModel().beginUpdate();
try{for(var d=0;d<t.length;d++){var f=t[d]();null!=f&&(c=c.concat(f))}}finally{n.getModel().endUpdate()}}g(c)}}),x=0;x<B;x++)mxUtils.bind(this,function(f){var g=a[f];if(null!=g){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var m=a.target.result,B=m.indexOf(","),u=decodeURIComponent(escape(atob(m.substring(B+1)))),t=mxUtils.parseXml(u),u=t.getElementsByTagName("svg");if(0<u.length){var u=u[0],
x=F?null:u.getAttribute("content");null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?y(f,mxUtils.bind(this,function(){try{if(m.substring(0,B+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=parseFloat(k.getAttribute("width")),p=parseFloat(k.getAttribute("height")),q=k.getAttribute("viewBox");if(null==
q||0==q.length)k.setAttribute("viewBox","0 0 "+l+" "+p);else if(isNaN(l)||isNaN(p)){var u=q.split(" ");3<u.length&&(l=parseFloat(u[2]),p=parseFloat(u[3]))}m=this.createSvgDataUri(mxUtils.getXml(k));var y=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,p)),x=e(m,g.type,b+f*v,c+f*v,Math.max(1,Math.round(l*y)),Math.max(1,Math.round(p*y)),g.name);if(isNaN(l)||isNaN(p)){var I=new Image;I.onload=mxUtils.bind(this,function(){l=Math.max(1,I.width);p=Math.max(1,I.height);x[0].geometry.width=l;x[0].geometry.height=
p;k.setAttribute("viewBox","0 0 "+l+" "+p);m=this.createSvgDataUri(mxUtils.getXml(k));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));n.setCellStyles("image",m,[x[0]])});I.src=this.createSvgDataUri(mxUtils.getXml(k))}return x}}}catch(pa){}return null})):y(f,mxUtils.bind(this,function(){return e(x,"text/xml",b+f*v,c+f*v,0,0,g.name)}))}else y(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var I=F?null:this.extractGraphModelFromPng(a.target.result);
if(null!=I&&0<I.length){var z=new Image;z.src=a.target.result;y(f,mxUtils.bind(this,function(){return e(I,"text/xml",b+f*v,c+f*v,z.width,z.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
a.target.result,mxUtils.bind(this,function(l,n,m){y(f,mxUtils.bind(this,function(){if(null!=l&&l.length<p){var u=k&&this.isResampleImage(a.target.result,q)?Math.min(1,Math.min(d/n,d/m)):1;return e(l,g.type,b+f*v,c+f*v,Math.round(n*u),Math.round(m*u),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,q)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,b+f*v,c+f*v,240,160,g.name,
function(a){y(f,function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?e(null,g.type,b+f*v,c+f*v,240,160,g.name,function(a){y(f,function(){return a})},g):"image"==g.type.substring(0,5)?m.readAsDataURL(g):m.readAsText(g)}})(x)});n?this.confirmImageResize(function(a){k=a;t()},v):t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?
mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||
mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),k=Math.max(1,a.height);
@ -8565,13 +8565,14 @@ k.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,funct
c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var f=b.changes[e];if(f.constructor==mxChildChange&&null!=f.child&&f.child.id==c){a.contains(f.previous)&&(d=f.child);
break}}return d};EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b=
{},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<img src="/images/spin.gif">';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var l=g[a];if("R"==l.substring(0,1)){var m=
JSON.parse(decodeURIComponent(l.substring(1)));f[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},function(){this.handleError(null,mxResources.get("errorGettingConfLibs",null,"An error occured while getting Confluence libraries list"))});
c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}));this.showDialog(c.container,340,375,!0,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],
"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,e){c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:d,error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,
msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),
e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(A){b(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();
null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
JSON.parse(decodeURIComponent(l.substring(1)));f[m[0]]={id:m[0],title:m[1],downloadUrl:m[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?
b[a.id]=a:delete b[a.id]})})(d,g)}},function(){this.handleError(null,mxResources.get("errorLoadingFile"))});c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(E){this.handleError(E,
mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1}};EditorUi.prototype.remoteInvokeCallbacks=
[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=
function(a,b,c,d,e){c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:d,error:e});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),
"*")});try{var c=a.funtionName,d=this.remoteInvokableFns[c];if(null!=d&&"function"===typeof this[c]){var e=a.functionArgs;Array.isArray(e)||(e=[]);if(d.isAsync)e.push(function(){b(Array.prototype.slice.apply(arguments))}),e.push(function(a){b(null,a||"Unkown Error")}),this[c].apply(this,e);else{var f=this[c].apply(this,e);b([f])}}else b(null,"Invalid Call: "+c+" is not found.")}catch(A){b(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();
return null!=a?a.commentsSupported():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=
function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
EditorUi.prototype.patchPages=function(a,c,b,d,g){var e={},l=[],m={},p={},q={},f={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var k in d[EditorUi.DIFF_UPDATE])e[k]=d[EditorUi.DIFF_UPDATE][k];if(null!=c[EditorUi.DIFF_REMOVE])for(d=0;d<c[EditorUi.DIFF_REMOVE].length;d++)p[c[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(d=0;d<c[EditorUi.DIFF_INSERT].length;d++)m[c[EditorUi.DIFF_INSERT][d].previous]=c[EditorUi.DIFF_INSERT][d];if(null!=c[EditorUi.DIFF_UPDATE])for(k in c[EditorUi.DIFF_UPDATE])d=
c[EditorUi.DIFF_UPDATE][k],null!=d.previous&&(f[d.previous]=k);if(null!=a){var n="";for(d=0;d<a.length;d++){var u=a[d].getId();q[u]=a[d];null!=f[n]||p[u]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][u]&&null!=c[EditorUi.DIFF_UPDATE][u].previous||(f[n]=u);n=u}}var t={},y=mxUtils.bind(this,function(a){var d=null!=a?a.getId():"";if(null!=a&&!t[d]){t[d]=!0;l.push(a);var k=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][d]:null;null!=k&&(this.updatePageRoot(a),null!=k.name&&a.setName(k.name),
null!=k.view&&this.patchViewState(a,k.view),null!=k.cells&&this.patchPage(a,k.cells,e[a.getId()],g),!b||null==k.cells&&null==k.view||(a.needsUpdate=!0))}a=f[d];null!=a&&(delete f[d],y(q[a]));a=m[d];null!=a&&(delete m[d],A(a))}),A=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=q[a.getId()];null==c?y(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});y();for(k in f)y(q[f[k]]),
@ -8635,13 +8636,13 @@ if(z.v>DrawioFileSync.PROTOCOL){p=!0;n=[];break}else if(z.v===DrawioFileSync.PRO
b&&b()}))}else null!=b&&b()});window.setTimeout(q,this.cacheReadyDelay)}else null!=b&&b()}};DrawioFileSync.prototype.reload=function(a,c,b,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b,d)};
DrawioFileSync.prototype.merge=function(a,c,b,d,g,e){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var l=this.file.ignorePatches(a),m=this.file.getDescriptorEtag(b);if(!l){for(e=0;e<a.length;e++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
a[e]);var p=null!=c?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",m,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",c==p,c);if(null!=c&&c!=p){var q=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m);this.file.checksumError(g,a,"From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nCurrent: "+p,m,"merge");return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?
this.file.backupPatch:null);try{var k=this.file.getCurrentUser(),n=null!=k?k.id:"unknown";EditorUi.logEvent({category:"PATCH-SYNC-FILE-"+this.file.getHash(),action:n,label:this.clientId})}catch(u){}}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.backupPatch=null;null!=d&&d()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{this.file.errorReportsEnabled?(q=this.ui.hashValue(this.file.getCurrentEtag()),
f=this.ui.hashValue(m),this.file.sendErrorReport("Error in merge","From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u)):(k=this.file.getCurrentUser(),n=null!=k?k.id:"unknown",EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),n,u))}catch(t){}}};
this.file.backupPatch:null);try{var k=this.file.getCurrentUser(),n=null!=k?k.id:"unknown";EditorUi.logEvent({category:"PATCH-SYNC-FILE-"+this.file.getHash(),action:n+"-recvd-"+this.file.stats.bytesReceived+"-msgs-"+this.file.stats.msgReceived,label:this.clientId})}catch(u){}}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.backupPatch=null;null!=d&&d()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
null!=g&&g(u);try{this.file.errorReportsEnabled?(q=this.ui.hashValue(this.file.getCurrentEtag()),f=this.ui.hashValue(m),this.file.sendErrorReport("Error in merge","From: "+q+"\nTo: "+f+"\nChecksum: "+c+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u)):(k=this.file.getCurrentUser(),n=null!=k?k.id:"unknown",EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),n,u))}catch(t){}}};
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
DrawioFileSync.prototype.fileSaved=function(a,c,b,d){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);c=this.file.getDescriptorEtag(c);
var e=this.file.getCurrentEtag(),l=this.objectToString(this.createMessage({patch:g,checksum:d})),m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),p=this.file.getDescriptorSecret(this.file.getDescriptor());this.file.stats.bytesSent+=l.length;this.file.stats.msgSent++;mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(m)+(null!=p?"&secret="+encodeURIComponent(p):"")+(l.length<this.maxCacheEntrySize?
"&data="+encodeURIComponent(l):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",e,l.length,"bytes","diff",g,"checksum",d);try{var q=this.file.getCurrentUser(),f=null!=q?q.id:"unknown";EditorUi.logEvent({category:"DIFF-SYNC-FILE-"+this.file.getHash(),action:f,label:this.clientId})}catch(k){}}this.file.shadowPages=a;null!=b&&b()};
"&data="+encodeURIComponent(l):""),mxUtils.bind(this,function(a){}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",c,"to",e,l.length,"bytes","diff",g,"checksum",d);try{var q=this.file.getCurrentUser(),f=null!=q?q.id:"unknown";EditorUi.logEvent({category:"DIFF-SYNC-FILE-"+this.file.getHash(),action:f+"-diff-"+l.length+"-sent-"+this.file.stats.bytesSent+"-msgs-"+this.file.stats.msgSent,label:this.clientId})}catch(k){}}this.file.shadowPages=a;null!=b&&b()};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,c,b){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,c,b):this.fileChanged(c,b)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=b&&b({message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@ -8726,18 +8727,19 @@ a})}))};DriveClient.prototype.loadRealtime=function(a,c,b){"1"==urlParams.ignore
DriveClient.prototype.getXmlFile=function(a,c,b,d,g){try{var e=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+e,mxUtils.bind(this,function(d){try{if(null==d)b({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?c(new DriveLibrary(this.ui,d,a)):b({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(a.title)){var l=d.lastIndexOf(",");if(0<l){var q=this.ui.extractGraphModelFromPng(d.substring(l+
1));if(null!=q&&0<q.length)d=q;else try{var q=d.substring(l+1),f=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(q):atob(q),k=this.ui.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0);null==k||0<k.getElementsByTagName("parsererror").length?e=!0:d=f}catch(n){e=!0}}}else"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(f=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f));c(e?new LocalFile(this.ui,d,a.title,!0):new DriveFile(this.ui,d,a))}}catch(n){if(null!=
b)b(n);else throw n;}}),b,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))}catch(l){if(null!=b)b(l);else throw l;}};
DriveClient.prototype.saveFile=function(a,c,b,d,g,e,l,m){var p=mxUtils.bind(this,function(b){if(null!=d)d(b);else throw b;try{if(!a.isConflict(b)){var c="error-"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code-"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"."+a.desc.headRevisionId+"."+a.desc.modifiedDate,action:c,label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=a.sync?a.sync.clientId:"nosync")})}}catch(B){}}),q=mxUtils.bind(this,
function(b){p(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(v){}});try{if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),k=a.desc.etag,n=a.desc.modifiedDate,u=a.desc.headRevisionId,
t=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());g=null!=g?g:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var y=mxUtils.bind(this,function(d,g,B){try{var v=null,y=!1,x={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)&&(x.mimeType=this.xmlMimeType,v=a.desc,y=c=!0);a.constructor==DriveFile&&(null==m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",
value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));B||(null!=d||e||(d=this.placeholderThumbnail,g=this.placeholderMimeType),null!=d&&null!=g&&(x.thumbnail={image:d,mimeType:g}));var A=a.getData(),z=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-(new Date(n)).getTime();if(0>=e||k==d.etag||c&&u==d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");k==d.etag&&resons.push("stale etag");c&&u==d.headRevisionId&&
resons.push("stale revision");var l=": "+g.join(", ");p({message:mxResources.get("errorSavingFile")+l},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+" "+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nErrors="+l+"\nOld="+u+" "+n+" etag-hash="+this.ui.hashValue(k)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),
EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+n+"-"+this.ui.hashValue(k)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),null!=this.user?this.user.id:"unknown")}catch(M){}}else{b(d,A);if(null!=v){this.executeRequest(gapi.client.drive.revisions.get({fileId:v.id,revisionId:v.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:v.id,
revisionId:v.headRevisionId,resource:a}))})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from-"+v.id+"."+v.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?this.user.id:"unknown-user."+(null!=a.sync?a.sync.clientId:"nosync")})}catch(M){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"."+u+"."+n,action:"saved-"+d.headRevisionId+"."+d.modifiedDate,label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=
a.sync?a.sync.clientId+"-chan-"+(a.sync.channelId||"none"):"nosync")})}catch(M){}}}catch(M){q(M)}}),D=mxUtils.bind(this,function(b,e){try{null!=m&&(x.properties=m);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||l,e,d?null:
f,y),z,mxUtils.bind(this,function(b){try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{k(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown."+(null!=a.sync?a.sync.clientId:
"nosync"))}catch(Y){}}else null!=p&&p(b,c)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){null!=p&&p(b)})):p(b)}catch(W){q(W)}}))}catch(U){q(U)}});if(t&&null==d){var n=new Image;n.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/n.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(n.height*a);b.getContext("2d").drawImage(n,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");x.thumbnail=
{image:c,mimeType:"image/png"};k(!1)}catch(W){k(!1)}});n.src="data:image/png;base64,"+b}else k(!1)}catch(O){q(O)}});t?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),p,this.ui.getCurrentFile()!=a?A:null):D(A,!1)}catch(H){q(H)}}),A=mxUtils.bind(this,function(){(e||t||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,
function(a){try{var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(B){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");y(b,"image/png")}catch(B){q(B)}})))&&y(null,null,a.constructor!=DriveLibrary)});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),null!=p&&p({message:mxResources.get("readOnly")})}catch(z){q(z)}};
DriveClient.prototype.saveFile=function(a,c,b,d,g,e,l,m){var p=mxUtils.bind(this,function(b){if(null!=d)d(b);else throw b;try{if(!a.isConflict(b)){var c="error-"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code-"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"."+a.desc.headRevisionId+"."+a.desc.modifiedDate+"-size-"+a.getSize(),action:c,label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=a.sync?a.sync.clientId+"-chan-"+
(a.sync.channelId||"none"):"-nosync")+(this.ui.editor.autosave?"-autosave-on":"-autosave-off")})}}catch(B){}}),q=mxUtils.bind(this,function(b){p(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(v){}});
try{if(a.isEditable()&&null!=a.desc){var f=(new Date).getTime(),k=a.desc.etag,n=a.desc.modifiedDate,u=a.desc.headRevisionId,t=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());g=null!=g?g:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var y=mxUtils.bind(this,function(d,g,B){try{var v=null,y=!1,x={mimeType:a.desc.mimeType,title:a.getTitle()};this.isGoogleRealtimeMimeType(a.desc.mimeType)&&(x.mimeType=this.xmlMimeType,v=a.desc,y=c=!0);a.constructor==DriveFile&&(null==
m&&(m=[]),null==a.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));B||(null!=d||e||(d=this.placeholderThumbnail,g=this.placeholderMimeType),null!=d&&null!=g&&(x.thumbnail={image:d,mimeType:g}));var A=a.getData(),z=mxUtils.bind(this,function(d){try{a.saveDelay=(new Date).getTime()-f;var e=(new Date(d.modifiedDate)).getTime()-(new Date(n)).getTime();if(0>=e||k==d.etag||c&&u==
d.headRevisionId){var g=[];0>=e&&g.push("invalid modified time");k==d.etag&&resons.push("stale etag");c&&u==d.headRevisionId&&resons.push("stale revision");var l=": "+g.join(", ");p({message:mxResources.get("errorSavingFile")+l},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+" "+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nErrors="+
l+"\nOld="+u+" "+n+" etag-hash="+this.ui.hashValue(k)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+n+"-"+this.ui.hashValue(k)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),null!=this.user?this.user.id:"unknown")}catch(M){}}else{b(d,A);if(null!=v){this.executeRequest(gapi.client.drive.revisions.get({fileId:v.id,revisionId:v.headRevisionId,
supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:v.id,revisionId:v.headRevisionId,resource:a}))})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from-"+v.id+"."+v.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?this.user.id:"unknown-user."+(null!=a.sync?a.sync.clientId:"nosync")})}catch(M){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+
a.getHash()+"."+u+"."+n,action:"saved-"+d.headRevisionId+"."+d.modifiedDate+"-size-"+a.getSize(),label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=a.sync?a.sync.clientId+"-chan-"+(a.sync.channelId||"none"):"-nosync")+(this.ui.editor.autosave?"-autosave-on":"-autosave-off")})}catch(M){}}}catch(M){q(M)}}),D=mxUtils.bind(this,function(b,e){try{null!=m&&(x.properties=m);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,
function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||l,e,d?null:f,y),z,mxUtils.bind(this,function(b){try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-
.5)));else{k(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown."+(null!=a.sync?a.sync.clientId:"nosync"))}catch(Y){}}else null!=p&&p(b,c)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){null!=p&&p(b)})):p(b)}catch(W){q(W)}}))}catch(U){q(U)}});if(t&&null==d){var n=new Image;n.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/n.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;
b.height=Math.floor(n.height*a);b.getContext("2d").drawImage(n,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");x.thumbnail={image:c,mimeType:"image/png"};k(!1)}catch(W){k(!1)}});n.src="data:image/png;base64,"+b}else k(!1)}catch(O){q(O)}});t?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),p,this.ui.getCurrentFile()!=a?A:null):D(A,!1)}catch(H){q(H)}}),A=mxUtils.bind(this,function(){(e||t||a.constructor==DriveLibrary||!this.enableThumbnails||
"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(B){b=null}y(b,"image/png")}catch(B){q(B)}})))&&y(null,null,a.constructor!=DriveLibrary)});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),
null!=p&&p({message:mxResources.get("readOnly")})}catch(z){q(z)}};
DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var g=(new Date).getTime();if(b||g-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=g,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=
c&&c()})))};
DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing=
@ -8911,8 +8913,8 @@ null!=q&&q(b)}))});a()}),k=null,n=null,u=mxUtils.bind(this,function(e){null==e&&
this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var v=0;v<g.length;v++)mxUtils.bind(this,function(d){m.appendChild(p(d.name,mxUtils.bind(this,function(){a?(b=d.id,f()):(this.ui.hideDialog(),c(d.id))})))})(g[v]);100==g.length&&(m.appendChild(k),n=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&l()},mxEvent.addListener(m,"scroll",n))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(t,q,!0):null!=q&&q({message:a.responseText})}))});t()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};DrawioComment=function(a,c,b,d,g,e,l){this.file=a;this.id=c;this.content=b;this.modifiedDate=d;this.createdDate=g;this.isResolved=e;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,b,d,g){c()};DrawioComment.prototype.editComment=function(a,c,b){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DriveComment=function(a,c,b,d,g,e,l,m){DrawioComment.call(this,a,c,b,d,g,e,l);this.pCommentId=m};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,c,b,d,g){a={content:a.content};d?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest(gapi.client.drive.replies.insert({fileId:this.file.getId(),commentId:this.id,resource:a}),mxUtils.bind(this,function(a){c(a.replyId)}),b)};
DriveComment.prototype.editComment=function(a,c,b){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies.patch({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id,resource:a}):gapi.client.drive.comments.patch({fileId:this.file.getId(),commentId:this.id,resource:a}),c,b)};
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies["delete"]({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id}):gapi.client.drive.comments["delete"]({fileId:this.file.getId(),commentId:this.id}),a,c)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&a.isModified()&&null!=this.drive&&EditorUi.logEvent({category:"DISCARD-SAVE-FILE-"+a.getHash()+"."+a.desc.headRevisionId+"."+a.desc.modifiedDate,action:"time-"+(new Date).toISOString()+"-saved-"+(null!=a.lastSaved?a.lastSaved.toISOString():
"never"),label:null!=this.drive.user?this.drive.user.id:"unknown-user"})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
DriveComment.prototype.deleteComment=function(a,c){this.file.ui.drive.executeRequest(this.pCommentId?gapi.client.drive.replies["delete"]({fileId:this.file.getId(),commentId:this.pCommentId,replyId:this.id}):gapi.client.drive.comments["delete"]({fileId:this.file.getId(),commentId:this.id}),a,c)};App=function(a,c,b){EditorUi.call(this,a,c,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&a.isModified()&&null!=this.drive?EditorUi.logEvent({category:"DISCARD-SAVE-FILE-"+a.getHash()+"."+a.desc.headRevisionId+"."+a.desc.modifiedDate+"-size-"+a.getSize(),action:"time-"+(new Date).toISOString()+"-saved-"+(null!=a.lastSaved?
a.lastSaved.toISOString():"never")+(this.editor.autosave?"-autosave-on":"-autosave-off"),label:null!=this.drive.user?this.drive.user.id:"unknown-user"}):null!=a&&a.isModified()&&EditorUi.logEvent({category:"DISCARD-SAVE-FILE-"+a.getHash(),action:"unload",label:this.editor.autosave?"autosave-on":"autosave-off"})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var d=null;try{d=window.open(a)}catch(q){}null==d||void 0===d?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});var d=mxClipboard.copy,g=this;mxClipboard.copy=function(a,b){var c=null;try{c=d.apply(this,arguments)}catch(p){g.handleError(p)}return c};this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&
window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(e){null!=window.console&&console.log("Plugin Error:",e,App.DrawPlugins[a])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(a){try{a(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,
function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
@ -8969,9 +8971,9 @@ App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,c=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,b=0;256>b;b++){c=b;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[b]=c}return a};
App.prototype.getThumbnail=function(a,c){var b=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var d=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),g=d.getGlobalVariable,e=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?e.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(e.root)}if(mxClient.IS_CHROMEAPP||!d.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
function(a){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=d.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),q=Math.floor(m.x),f=Math.floor(m.y);l.setAttribute("width",Math.ceil(p*(m.width+4)));l.setAttribute("height",Math.ceil(p*(m.height+4)));var k=l.getContext("2d");
k.scale(p,p);k.translate(-q,-f);var n=d.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";k.save();k.fillStyle=n;k.fillRect(q,f,Math.ceil(m.width+4),Math.ceil(m.height+4));k.restore();var u=new mxJsCanvas(l),t=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var y=new mxImageExport;y.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};y.drawText=function(a,
b){};y.drawState(d.getView().getState(d.model.root),t);t.finish(mxUtils.bind(this,function(){y.drawState(d.getView().getState(d.model.root),u);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);c(l)}));b=!0}}catch(A){d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}return b};
function(a){try{d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(z){a=null}c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()},null,null,null,null,null,null,d),b=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),m=d.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),q=Math.floor(m.x),f=Math.floor(m.y);l.setAttribute("width",Math.ceil(p*(m.width+4)));l.setAttribute("height",
Math.ceil(p*(m.height+4)));var k=l.getContext("2d");k.scale(p,p);k.translate(-q,-f);var n=d.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";k.save();k.fillStyle=n;k.fillRect(q,f,Math.ceil(m.width+4),Math.ceil(m.height+4));k.restore();var u=new mxJsCanvas(l),t=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var y=new mxImageExport;y.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,
-.5),b.restore())};y.drawText=function(a,b){};y.drawState(d.getView().getState(d.model.root),t);t.finish(mxUtils.bind(this,function(){try{y.drawState(d.getView().getState(d.model.root),u),d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}catch(A){l=null}c(l)}));b=!0}}catch(A){d!=this.editor.graph&&null!=d.container.parentNode&&d.container.parentNode.removeChild(d.container)}return b};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,b){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();c=null!=d?d.getMode():c;c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):c==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default")}if(b)try{if(isLocalStorage)localStorage.setItem(".mode",c);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+c+"; expires="+g.toUTCString()}}catch(e){}}})();
@ -9190,7 +9192,7 @@ typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxRes
" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},
c):p&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,
"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.editor.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(J){a.handleError(J,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();
a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confCloud",null,"Confluence Cloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("confCloudLibs",null,"Confluence Cloud Libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));"1"==urlParams.confLib&&(b.addSeparator(c),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){a.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
q=a.actions.addAction("comments",mxUtils.bind(this,function(){null==this.commentsWindow?(this.commentsWindow=new CommentsWindow(a,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("comments"))):(this.commentsWindow.window.setVisible(!this.commentsWindow.window.isVisible()),
this.commentsWindow.refreshCommentsTime())}));q.setToggleAction(!0);q.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));a.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var q=this.get("viewPanels"),z=q.funct;q.funct=function(b,c){z.apply(this,arguments);a.commentsSupported()&&a.menus.addMenuItems(b,["comments"],c)};this.put("view",
new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(a.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),
@ -9262,8 +9264,8 @@ this.model.setCollapsed(d[g],a))}for(g=0;g<f.length;g++)this.model.setVisible(f[
b?b.style:t.getCellStyle(a)).containerType);return b}function d(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function m(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==
a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function p(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-
10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),l=t.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||
f==mxConstants.DIRECTION_NORTH,v=g=d=0;v<p.length;v++){var y=t.model.getTerminal(p[v],!1);if(f==m(y)){var u=t.view.getState(y);y!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(d=10+Math.max(d,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/l))}}q?g=0:d=0;for(v=0;v<p.length;v++)if(y=t.model.getTerminal(p[v],!1),f==m(y)&&(u=t.view.getState(y),y!=a&&null!=
u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY()))){var x=[];t.traverse(u.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});t.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function q(a){t.model.beginUpdate();try{var b=m(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=
f==mxConstants.DIRECTION_NORTH,v=g=d=0;v<p.length;v++){var u=t.model.getTerminal(p[v],!1);if(f==m(u)){var y=t.view.getState(u);u!=a&&null!=y&&(q&&b!=y.getCenterX()<k.getCenterX()||!q&&b!=y.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,y)&&(d=10+Math.max(d,(Math.min(n.x+n.width,y.x+y.width)-Math.max(n.x,y.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,y.y+y.height)-Math.max(n.y,y.y))/l))}}q?g=0:d=0;for(v=0;v<p.length;v++)if(u=t.model.getTerminal(p[v],!1),f==m(u)&&(y=t.view.getState(u),u!=a&&null!=
y&&(q&&b!=y.getCenterX()<k.getCenterX()||!q&&b!=y.getCenterY()<k.getCenterY()))){var x=[];t.traverse(y.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});t.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function q(a){t.model.beginUpdate();try{var b=m(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=
e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);t.moveCells(g,k,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function f(a){t.model.beginUpdate();try{var b=t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],
a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=t.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=t.view.getBounds(f),n=m(a),p=t.view.translate,q=t.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=
null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/q-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/q-p.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function k(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=

View file

@ -26,11 +26,17 @@ App = function(editor, container, lightbox)
if (file != null && file.constructor == DriveFile && file.isModified() && this.drive != null)
{
EditorUi.logEvent({category: 'DISCARD-SAVE-FILE-' + file.getHash() + '.' +
file.desc.headRevisionId + '.' + file.desc.modifiedDate,
file.desc.headRevisionId + '.' + file.desc.modifiedDate + '-size-' + file.getSize(),
action: 'time-' + new Date().toISOString() + '-saved-' +
((file.lastSaved != null) ? file.lastSaved.toISOString() : 'never'),
((file.lastSaved != null) ? file.lastSaved.toISOString() : 'never') +
((this.editor.autosave) ? '-autosave-on' : '-autosave-off'),
label: (this.drive.user != null) ? this.drive.user.id : 'unknown-user'});
}
else if (file != null && file.isModified())
{
EditorUi.logEvent({category: 'DISCARD-SAVE-FILE-' + file.getHash(), action: 'unload',
label: ((this.editor.autosave) ? 'autosave-on' : 'autosave-off')});
}
});
}
@ -1768,12 +1774,19 @@ App.prototype.getThumbnail = function(width, success)
if (mxClient.IS_CHROMEAPP || (!graph.mathEnabled && this.useCanvasForExport))
{
this.exportToCanvas(mxUtils.bind(this, function(canvas)
{
try
{
// Removes temporary graph from DOM
if (graph != this.editor.graph)
if (graph != this.editor.graph && graph.container.parentNode != null)
{
graph.container.parentNode.removeChild(graph.container);
}
}
catch (e)
{
canvas = null;
}
success(canvas);
}), width, this.thumbImageCache, '#ffffff', function()
@ -1853,14 +1866,21 @@ App.prototype.getThumbnail = function(width, success)
imgExport.drawState(graph.getView().getState(graph.model.root), asynCanvas);
asynCanvas.finish(mxUtils.bind(this, function()
{
try
{
imgExport.drawState(graph.getView().getState(graph.model.root), htmlCanvas);
// Removes temporary graph from DOM
if (graph != this.editor.graph)
if (graph != this.editor.graph && graph.container.parentNode != null)
{
graph.container.parentNode.removeChild(graph.container);
}
}
catch (e)
{
canvas = null;
}
success(canvas);
}));
@ -1872,7 +1892,7 @@ App.prototype.getThumbnail = function(width, success)
{
// ignore and use placeholder
// Removes temporary graph from DOM
if (graph != this.editor.graph)
if (graph != this.editor.graph && graph.container.parentNode != null)
{
graph.container.parentNode.removeChild(graph.container);
}

View file

@ -1631,13 +1631,15 @@ DrawioFile.prototype.handleFileError = function(err, manual)
{
this.lastWarned = Date.now();
this.ui.hideDialog();
EditorUi.logEvent({category: 'IGNORE-WARN-SAVE-FILE-' + this.getHash(), action: 'ignore'});
EditorUi.logEvent({category: 'IGNORE-WARN-SAVE-FILE-' + this.getHash() +
'-size-' + this.getSize(), action: 'ignore'});
}), null, mxResources.get('save'), mxUtils.bind(this, function()
{
this.lastWarned = Date.now();
this.ui.actions.get((this.ui.mode == null || !this.isEditable()) ?
'saveAs' : 'save').funct();
EditorUi.logEvent({category: 'SAVE-WARN-SAVE-FILE-' + this.getHash(), action: 'save'});
EditorUi.logEvent({category: 'SAVE-WARN-SAVE-FILE-' + this.getHash() +
'-size-' + this.getSize(), action: 'save'});
}), null, null, 360, 120);
}
}

View file

@ -950,7 +950,9 @@ DrawioFileSync.prototype.merge = function(patches, checksum, desc, success, erro
var uid = (user != null) ? user.id : 'unknown';
EditorUi.logEvent({category: 'PATCH-SYNC-FILE-' + this.file.getHash(),
action: uid, label: this.clientId});
action: uid + '-recvd-' + this.file.stats.bytesReceived + '-msgs-' +
this.file.stats.msgReceived,
label: this.clientId});
}
catch (e)
{
@ -1122,7 +1124,9 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error)
var uid = (user != null) ? user.id : 'unknown';
EditorUi.logEvent({category: 'DIFF-SYNC-FILE-' + this.file.getHash(),
action: uid, label: this.clientId});
action: uid + '-diff-' + data.length + '-sent-' +
this.file.stats.bytesSent + '-msgs-' +
this.file.stats.msgSent, label: this.clientId});
}
catch (e)
{

View file

@ -1070,9 +1070,11 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
}
EditorUi.logEvent({category: 'ERROR-SAVE-FILE-' + file.getHash() + '.' +
file.desc.headRevisionId + '.' + file.desc.modifiedDate,
action: err, label: ((this.user != null) ? this.user.id : 'unknown-user') +
'.' + ((file.sync != null) ? file.sync.clientId : 'nosync')});
file.desc.headRevisionId + '.' + file.desc.modifiedDate + '-size-' + file.getSize(),
action: err, label: ((this.user != null) ? this.user.id : 'unknown-user') + '.' +
((file.sync != null) ? (file.sync.clientId + '-chan-' +
(file.sync.channelId || 'none')) : '-nosync') +
((this.ui.editor.autosave) ? '-autosave-on' : '-autosave-off')});
}
}
catch (ex)
@ -1294,10 +1296,11 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
{
EditorUi.logEvent({category: 'SUCCESS-SAVE-FILE-' + file.getHash() +
'.' + head0 + '.' + mod0, action: 'saved-' + resp.headRevisionId +
'.' + resp.modifiedDate, label: ((this.user != null) ?
this.user.id : 'unknown-user') + '.' + ((file.sync != null) ?
(file.sync.clientId + '-chan-' + (file.sync.channelId || 'none')) :
'nosync')});
'.' + resp.modifiedDate + '-size-' + file.getSize(),
label: ((this.user != null) ? this.user.id : 'unknown-user') + '.' +
((file.sync != null) ? (file.sync.clientId + '-chan-' +
(file.sync.channelId || 'none')) : '-nosync') +
((this.ui.editor.autosave) ? '-autosave-on' : '-autosave-off')});
}
catch (e)
{
@ -1487,26 +1490,23 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
(file.desc.mimeType != null && file.desc.mimeType.substring(0, 29) != 'application/vnd.jgraph.mxfile') ||
!this.ui.getThumbnail(this.thumbnailWidth, mxUtils.bind(this, function(canvas)
{
// Callback for getThumbnail
try
{
// Callback for getThumbnail
var thumb = null;
if (canvas != null)
{
try
{
if (canvas != null)
{
// Security errors are possible
thumb = canvas.toDataURL('image/png');
}
catch (e)
{
// ignore and continue with placeholder
}
}
// Maximum thumbnail size is 2MB
if (thumb == null || thumb.length > this.maxThumbnailSize)
if (thumb != null)
{
if (thumb.length > this.maxThumbnailSize)
{
thumb = null;
}
@ -1515,6 +1515,12 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
// Converts base64 data into required format for Drive (base64url with no prefix)
thumb = thumb.substring(thumb.indexOf(',') + 1).replace(/\+/g, '-').replace(/\//g, '_');
}
}
}
catch (e)
{
thumb = null;
}
doSave(thumb, 'image/png');
}

View file

@ -11822,11 +11822,17 @@
}
catch(e){}
this.remoteInvoke('getCustomLibraries', null, null, function(libsList)
{
libsSection.innerHTML = '';
if (libsList.length == 0)
{
libsSection.innerHTML = '<div style="text-align:center;padding-top:20px;color:gray;">' +
mxUtils.htmlEntities(mxResources.get('noLibraries')) + '</div>';
}
else
{
for (var i = 0; i < libsList.length; i++)
{
var lib = libsList[i];
@ -11853,9 +11859,10 @@
});
})(lib, libCheck)
}
}
}, function()
{
this.handleError(null, mxResources.get('errorGettingConfLibs', null, 'An error occured while getting Confluence libraries list'));
this.handleError(null, mxResources.get('errorLoadingFile'));
});
div.appendChild(libsSection);
@ -11907,7 +11914,7 @@
}
if (pendingLibs == 0) this.spinner.stop();
}));
}), null, null, 'https://desk.draw.io/support/solutions/articles/16000092763');
this.showDialog(dlg.container, 340, 375, true, true);
};

View file

@ -2770,9 +2770,9 @@
{
menu.addSeparator(parent);
menu.addItem(mxResources.get('confCloud', null, 'Confluence Cloud') + '...', null, function()
menu.addItem(mxResources.get('confluenceCloud') + '...', null, function()
{
editorUi.showRemotelyStoredLibrary(mxResources.get('confCloudLibs', null, 'Confluence Cloud Libraries'));
editorUi.showRemotelyStoredLibrary(mxResources.get('libraries'));
}, parent);
}
}));
@ -2782,8 +2782,7 @@
this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
{
this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
'find', '-',
'editData', 'editTooltip', '-', 'editStyle', 'editGeometry', '-',
'find', '-', 'editData', 'editTooltip', '-', 'editStyle', 'editGeometry', '-',
'edit', '-', 'editLink', 'openLink', '-',
'selectVertices', 'selectEdges', 'selectAll', 'selectNone', '-', 'lockUnlock']);
})));

File diff suppressed because one or more lines are too long

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Als geklärt gekennzeichnet
noCommentsFound=Keine Kommentare gefunden
comments=Kommentare
timeAgo=Vor {1}
confluenceCloud=Confluence Cloud
libraries=Bibliotheken

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=markedAsResolved
noCommentsFound=noCommentsFound
comments=comments
timeAgo=timeAgo
confluenceCloud=confluenceCloud
libraries=libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries

View file

@ -814,3 +814,5 @@ markedAsResolved=Marked as resolved
noCommentsFound=No comments found
comments=Comments
timeAgo={1} ago
confluenceCloud=Confluence Cloud
libraries=Libraries