10.0.41 release

This commit is contained in:
Gaudenz Alder 2019-01-15 17:39:54 +01:00
parent d83c0e1097
commit 6efa4771ff
13 changed files with 409 additions and 383 deletions

View file

@ -1,3 +1,11 @@
15-JAN-2019: 10.0.41
- Adds ignored page size in checksum
15-JAN-2019: 10.0.40
- Fixes possible use of undefined variable
15-JAN-2019: 10.0.39
- Fixes shadow change check

View file

@ -1 +1 @@
10.0.39
10.0.41

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 01/15/2019 02:40 PM
# 01/15/2019 05:34 PM
app.html
index.html?offline=1

View file

@ -7429,8 +7429,9 @@ DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getD
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,c){var b=null!=c?c.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",
this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.isRevisionHistorySupported()?(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))):this.ui.editor.setStatus(a))};
DrawioFile.prototype.addUnsavedStatus=function(a){this.inConflictState||null==this.ui.statusContainer||(a instanceof Error&&null!=a.message&&""!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(a=this.getErrorMessage(a),null!=a&&60<a.length&&(a=a.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.isRevisionHistorySupported()?(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,
function(){this.ui.actions.get("revisionHistory").funct()}))):this.ui.editor.setStatus(a))};
DrawioFile.prototype.addUnsavedStatus=function(a){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(a instanceof Error&&null!=a.message&&""!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(a=this.getErrorMessage(a),null!=a&&60<a.length&&(a=a.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=a&&""!=a?" ("+mxUtils.htmlEntities(a)+")":"")+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>")))};
DrawioFile.prototype.addConflictStatus=function(a,c){this.invalidChecksum&&(c=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=c&&""!=c?" ("+mxUtils.htmlEntities(c)+")":""));this.ui.spinner.stop();this.clearAutosave();var b=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=b&&0<b.length?mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&a()})):
this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};
@ -7886,7 +7887,7 @@ this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.
var ErrorDialog=function(a,c,b,d,f,h,l,m,p,g,k){p=null!=p?p:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,c);n.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");
b.style.marginTop="16px";b.style.textAlign="center";null!=h&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();h()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=k&&k()}),g.className="geBtn",b.appendChild(g));var t=mxUtils.button(d,function(){p&&a.hideDialog();null!=f&&f()});t.className="geBtn";b.appendChild(t);null!=l&&(d=mxUtils.button(l,function(){p&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",
b.appendChild(d));this.init=function(){t.focus()};n.appendChild(b);this.container=n};
(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.0.39";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,f);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
(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.0.41";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,f);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 g=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:"";(new Image).src=k+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}};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(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
@ -7946,7 +7947,7 @@ c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",act
!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(u){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?
window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()}),!0)}else d();return c};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var b=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(c),this.editor.removeListener("hideDialog",b),this.editor.graph.removeListener(b),null!=window.requestAnimationFrame?
window.requestAnimationFrame(a):a())}),c={mouseDown:function(){},mouseMove:function(){},mouseUp:b};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,b);this.editor.graph.addListener(mxEvent.ESCAPE,b);this.editor.graph.addMouseListener(c);this.editor.addListener("hideDialog",b)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=
0,b.nodeCount=0);for(var k=0;k<a.length;k++){this.updatePageRoot(a[k]);var f=a[k].node.cloneNode(!1);f.removeAttribute("name");f.removeAttribute("pageWidth");f.removeAttribute("pageHeight");d.root=a[k].root;var h=g.encode(d);this.editor.graph.saveViewState(a[k].viewState,h,!0);f.appendChild(h);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(f,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||
0,b.nodeCount=0);for(var k=0;k<a.length;k++){this.updatePageRoot(a[k]);var f=a[k].node.cloneNode(!1);f.removeAttribute("name");d.root=a[k].root;var h=g.encode(d);this.editor.graph.saveViewState(a[k].viewState,h,!0);h.removeAttribute("pageWidth");h.removeAttribute("pageHeight");f.appendChild(h);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(f,function(a,b,c,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||
"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?d&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var g=0;g<a.attributes.length;g++){var k=a.attributes[g].name,f=null!=b?b(a,k,a.attributes[g].value,
!0):a.attributes[g].value;null!=f&&(d^=this.hashValue(k,b,c)+this.hashValue(f,b,c))}}if(null!=a.childNodes)for(g=0;g<a.childNodes.length;g++)d=(d<<5)-d+this.hashValue(a.childNodes[g],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(g=0;g<a.length;g++)b=(b<<5)-b+a.charCodeAt(g)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,f,h,l){};
EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");
@ -8239,7 +8240,7 @@ mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings
this.activityListener=mxUtils.bind(this,function(a){this.lastActivity=new Date;this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.pusherErrorListener=
mxUtils.bind(this,function(a){null!=a.error&&null!=a.error.data&&4004===a.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected()){if(!this.announced){var a=this.file.getCurrentUser(),b={a:"join"};null!=a&&(b.name=a.displayName,b.uid=a.id);mxUtils.post(this.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(b))));
this.file.stats.msgSent++;this.announced=!0}this.fileChangedNotify()}});this.changeListener=mxUtils.bind(this,function(a){this.file.stats.msgReceived++;this.lastActivity=new Date;if(this.enabled&&!this.file.inConflictState&&!this.redirectDialogShowing)try{var b=this.stringToObject(a);null!=b&&(EditorUi.debug("Sync.message",[this],b,a.length,"bytes"),b.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):b.v===DrawioFileSync.PROTOCOL&&null!=b.d&&this.handleMessageData(b.d))}catch(d){null!=
window.console&&"1"==urlParams.test&&console.log(d)}})};DrawioFileSync.PROTOCOL=5;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;
window.console&&"1"==urlParams.test&&console.log(d)}})};DrawioFileSync.PROTOCOL=6;mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;
DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=2;DrawioFileSync.prototype.cacheReadyDelay=500;DrawioFileSync.prototype.inactivityTimeoutSeconds=3600;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(b){}try{if(this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("Sync.start",
[this]),null==this.file.stats.start&&(this.file.stats.start=(new Date).toISOString(),!this.ui.isOffline())){var a=this.file.getCurrentUser(),c=null!=a?this.ui.hashValue(a.id):"unknown";EditorUi.logEvent({category:"RT-START-"+DrawioFile.SYNC,action:"file-"+this.file.getId()+"-mode-"+this.file.getMode()+"-size-"+this.file.getSize()+"-user-"+c+"-client-"+this.clientId,label:this.file.stats.start})}}catch(b){}this.installListeners()}window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();
@ -8522,10 +8523,10 @@ null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.o
urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){document.getElementById("geStatus").innerHTML=
"Error loading page. <a>Please try refreshing.</a>";document.getElementById("geStatus").getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}})}function d(){mxResources.loadDefaultBundle=!1;b(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,f){EditorUi.logError(a,b,c,d,f)};if("1"==
urlParams.embed||"1"==urlParams.lightbox){var f=document.getElementById("geInfo");null!=f&&f.parentNode.removeChild(f)}if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache)mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),f=document.createElement("iframe"),f.setAttribute("width","0"),f.setAttribute("height","0"),f.setAttribute("src","offline.html"),document.body.appendChild(f);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=
DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var f=null!=mxSettings.settings?mxSettings.getPlugins():null,h={},l=urlParams.p;App.initPluginCallback();if(null!=l)for(var m=l.split(";"),l=0;l<m.length;l++){var p=App.pluginRegistry[m[l]];null!=p&&null==h[p]?(h[p]=!0,mxscript(drawDevUrl+p)):null!=window.console&&console.log("Unknown plugin:",m[l])}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);
if(null!=f&&0<f.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+"//"+window.location.host,g=!0,l=0;l<f.length&&g;l++)"/"!=f[l].charAt(0)&&f[l].substring(0,m.length)!=m&&(g=!1);if(g||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[f.join("\n")]).replace(/\\n/g,"\n")))for(l=
0;l<f.length;l++)try{null==h[f[l]]&&(h[p]=!0,mxscript(f[l]))}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&
Editor.initMath();if("1"==urlParams.configure){var k=window.opener||window.parent,n=function(a){if(a.source==k)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",n);k.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
DrawioFile.SYNC||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var f=null!=mxSettings.settings?mxSettings.getPlugins():null,h={},l=urlParams.p;App.initPluginCallback();if(null!=l){var m=l.split(";");"undefined"==typeof window.drawDevUrl&&(drawDevUrl="");for(l=0;l<m.length;l++){var p=App.pluginRegistry[m[l]];null!=p&&null==h[p]?(h[p]=!0,"undefined"===typeof window.drawDevUrl?mxscript(p):mxscript(drawDevUrl+p)):null!=window.console&&console.log("Unknown plugin:",m[l])}}else"0"==
urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,null,null,null,mxClient.IS_SVG);if(null!=f&&0<f.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+"//"+window.location.host,g=!0,l=0;l<f.length&&g;l++)"/"!=f[l].charAt(0)&&f[l].substring(0,m.length)!=m&&(g=!1);if(g||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
[f.join("\n")]).replace(/\\n/g,"\n")))for(l=0;l<f.length;l++)try{null==h[f[l]]&&(h[p]=!0,mxscript(f[l]))}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=
null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var k=window.opener||window.parent,n=function(a){if(a.source==k)try{var b=JSON.parse(a.data);null!=b&&"configure"==b.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(b.config,!0),mxSettings.load(),d())}catch(u){null!=window.console&&console.log("Error in configuration: "+u)}};mxEvent.addListener(window,"message",n);k.postMessage(JSON.stringify({event:"load"}),"*")}else d()};mxUtils.extend(App,EditorUi);
App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";

View file

@ -2679,8 +2679,9 @@ DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getD
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,b){var f=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=f&&f.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",
this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.isRevisionHistorySupported()?(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))):this.ui.editor.setStatus(a))};
DrawioFile.prototype.addUnsavedStatus=function(a){this.inConflictState||null==this.ui.statusContainer||(a instanceof Error&&null!=a.message&&""!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(a=this.getErrorMessage(a),null!=a&&60<a.length&&(a=a.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.isRevisionHistorySupported()?(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,
function(){this.ui.actions.get("revisionHistory").funct()}))):this.ui.editor.setStatus(a))};
DrawioFile.prototype.addUnsavedStatus=function(a){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(a instanceof Error&&null!=a.message&&""!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(a=this.getErrorMessage(a),null!=a&&60<a.length&&(a=a.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=a&&""!=a?" ("+mxUtils.htmlEntities(a)+")":"")+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>")))};
DrawioFile.prototype.addConflictStatus=function(a,b){this.invalidChecksum&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""));this.ui.spinner.stop();this.clearAutosave();var f=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=f&&0<f.length?mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&a()})):
this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};
@ -2912,7 +2913,7 @@ b=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",act
!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(k){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?
window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()}),!0)}else d();return b};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var c=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(b),this.editor.removeListener("hideDialog",c),this.editor.graph.removeListener(c),null!=window.requestAnimationFrame?
window.requestAnimationFrame(a):a())}),b={mouseDown:function(){},mouseMove:function(){},mouseUp:c};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,c);this.editor.graph.addListener(mxEvent.ESCAPE,c);this.editor.graph.addMouseListener(b);this.editor.addListener("hideDialog",c)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=
0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var p=a[f].node.cloneNode(!1);p.removeAttribute("name");p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");d.root=a[f].root;var l=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,l,!0);p.appendChild(l);null!=b&&(b.eltCount+=p.getElementsByTagName("*").length,b.nodeCount+=p.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(p,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||
0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var p=a[f].node.cloneNode(!1);p.removeAttribute("name");d.root=a[f].root;var l=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,l,!0);l.removeAttribute("pageWidth");l.removeAttribute("pageHeight");p.appendChild(l);null!=b&&(b.eltCount+=p.getElementsByTagName("*").length,b.nodeCount+=p.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(p,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||
"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var g=a.attributes[f].name,h=null!=b?b(a,g,a.attributes[f].value,
!0):a.attributes[f].value;null!=h&&(c^=this.hashValue(g,b,d)+this.hashValue(h,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,t,k,p){};
EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");

File diff suppressed because one or more lines are too long

View file

@ -477,6 +477,11 @@ App.main = function(callback, createUi)
// Mapping from key to URL in App.plugins
var t = temp.split(';');
if (typeof window.drawDevUrl == 'undefined')
{
drawDevUrl = '';
}
for (var i = 0; i < t.length; i++)
{
var url = App.pluginRegistry[t[i]];
@ -484,8 +489,16 @@ App.main = function(callback, createUi)
if (url != null && pluginsLoaded[url] == null)
{
pluginsLoaded[url] = true;
if (typeof window.drawDevUrl === 'undefined')
{
mxscript(url);
}
else
{
mxscript(drawDevUrl + url);
}
}
else if (window.console != null)
{
console.log('Unknown plugin:', t[i]);

View file

@ -1188,7 +1188,7 @@ DrawioFile.prototype.installListeners = function()
*/
DrawioFile.prototype.addAllSavedStatus = function(status)
{
if (this.ui.statusContainer != null)
if (this.ui.statusContainer != null && this.ui.getCurrentFile() == this)
{
status = (status != null) ? status : mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));
@ -1218,7 +1218,7 @@ DrawioFile.prototype.addAllSavedStatus = function(status)
*/
DrawioFile.prototype.addUnsavedStatus = function(err)
{
if (!this.inConflictState && this.ui.statusContainer != null)
if (!this.inConflictState && this.ui.statusContainer != null && this.ui.getCurrentFile() == this)
{
if (err instanceof Error && err.message != null && err.message != '')
{

View file

@ -150,7 +150,7 @@ DrawioFileSync = function(file)
* be incremented if new messages are added or the format is changed.
* This must be numeric to compare older vs newer protocol versions.
*/
DrawioFileSync.PROTOCOL = 5;
DrawioFileSync.PROTOCOL = 6;
//Extends mxEventSource
mxUtils.extend(DrawioFileSync, mxEventSource);

View file

@ -2405,14 +2405,15 @@
// ignore in hash and do not diff null names for now
diagram.removeAttribute('name');
// Local defaults may be different in files so ignore
diagram.removeAttribute('pageWidth');
diagram.removeAttribute('pageHeight');
// Model is only a holder for the root
model.root = pages[i].root;
var xmlNode = codec.encode(model);
this.editor.graph.saveViewState(pages[i].viewState, xmlNode, true);
// Local defaults may be different in files so ignore
xmlNode.removeAttribute('pageWidth');
xmlNode.removeAttribute('pageHeight');
diagram.appendChild(xmlNode);
if (details != null)

View file

@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.39",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.41",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||

View file

@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.39",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.41",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||

View file

@ -2679,8 +2679,9 @@ DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getD
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,b){var f=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=f&&f.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",
this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.isRevisionHistorySupported()?(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))):this.ui.editor.setStatus(a))};
DrawioFile.prototype.addUnsavedStatus=function(a){this.inConflictState||null==this.ui.statusContainer||(a instanceof Error&&null!=a.message&&""!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(a=this.getErrorMessage(a),null!=a&&60<a.length&&(a=a.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.isRevisionHistorySupported()?(this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(mxResources.get("revisionHistory"))+'" style="text-decoration:underline;cursor:pointer;">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,
function(){this.ui.actions.get("revisionHistory").funct()}))):this.ui.editor.setStatus(a))};
DrawioFile.prototype.addUnsavedStatus=function(a){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(a instanceof Error&&null!=a.message&&""!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(a=this.getErrorMessage(a),null!=a&&60<a.length&&(a=a.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=a&&""!=a?" ("+mxUtils.htmlEntities(a)+")":"")+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),null!=a&&0<a.length?mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()})):this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+"</div>")))};
DrawioFile.prototype.addConflictStatus=function(a,b){this.invalidChecksum&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""));this.ui.spinner.stop();this.clearAutosave();var f=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=f&&0<f.length?mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&a()})):
this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};
@ -2912,7 +2913,7 @@ b=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:"File",act
!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(k){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?
window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()}),!0)}else d();return b};EditorUi.prototype.isActive=function(){return this.editor.graph.isEditing()||this.editor.graph.isMouseDown||null!=this.dialog};EditorUi.prototype.runWhenIdle=function(a){if(this.isActive()){var c=mxUtils.bind(this,function(){this.isActive()||(this.editor.graph.removeMouseListener(b),this.editor.removeListener("hideDialog",c),this.editor.graph.removeListener(c),null!=window.requestAnimationFrame?
window.requestAnimationFrame(a):a())}),b={mouseDown:function(){},mouseMove:function(){},mouseUp:c};this.editor.graph.addListener(mxEvent.EDITING_STOPPED,c);this.editor.graph.addListener(mxEvent.ESCAPE,c);this.editor.graph.addMouseListener(b);this.editor.addListener("hideDialog",c)}else null!=window.requestAnimationFrame?window.requestAnimationFrame(a):a()};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,g=new mxCodec;null!=b&&(b.byteCount=0,b.attrCount=0,b.eltCount=
0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var p=a[f].node.cloneNode(!1);p.removeAttribute("name");p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");d.root=a[f].root;var l=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,l,!0);p.appendChild(l);null!=b&&(b.eltCount+=p.getElementsByTagName("*").length,b.nodeCount+=p.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(p,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||
0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var p=a[f].node.cloneNode(!1);p.removeAttribute("name");d.root=a[f].root;var l=g.encode(d);this.editor.graph.saveViewState(a[f].viewState,l,!0);l.removeAttribute("pageWidth");l.removeAttribute("pageHeight");p.appendChild(l);null!=b&&(b.eltCount+=p.getElementsByTagName("*").length,b.nodeCount+=p.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(p,function(a,c,b,d){return!d||"mxGeometry"!=a.nodeName&&"mxPoint"!=a.nodeName||
"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if("object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var g=a.attributes[f].name,h=null!=b?b(a,g,a.attributes[f].value,
!0):a.attributes[f].value;null!=h&&(c^=this.hashValue(g,b,d)+this.hashValue(h,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,d,f,t,k,p){};
EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");