From ab43eee50125aafc5138a582a66e0647e6b73572 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Sat, 11 Mar 2017 15:01:55 +0100 Subject: [PATCH] 6.3.0 release Former-commit-id: 4ba5d569402f0b686513367cb1b99e513ed31cf8 --- ChangeLog | 6 + VERSION | 2 +- war/cache.manifest | 2 +- war/js/app.min.js | 72 +++--- war/js/atlas-viewer.min.js | 392 ++++++++++++++--------------- war/js/atlas.min.js | 36 +-- war/js/diagramly/EditorUi.js | 2 +- war/js/diagramly/GitHubClient.js | 56 ++--- war/js/diagramly/GitHubFile.js | 5 +- war/js/embed-static.min.js | 16 +- war/js/mxgraph/Editor.js | 3 +- war/js/mxgraph/Graph.js | 19 +- war/js/reader.min.js | 16 +- war/js/viewer.min.js | 412 +++++++++++++++---------------- 14 files changed, 520 insertions(+), 519 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e6a4f20..3fc8da25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +11-MAR-2017: 6.3.0 + +- Fixes slashes in branch names for GitHub client +- Fixes order for add selected cells to library +- Fixes order, missing shapes for export selected cells + 09-MAR-2017: 6.2.9 - Fixes label offset for export of selected edges diff --git a/VERSION b/VERSION index ca460a25..e7e42a4b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.2.9 \ No newline at end of file +6.3.0 \ No newline at end of file diff --git a/war/cache.manifest b/war/cache.manifest index 41e489b0..91555e1c 100644 --- a/war/cache.manifest +++ b/war/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 03/09/2017 05:50 PM +# 03/11/2017 02:54 PM app.html index.html?offline=1 diff --git a/war/js/app.min.js b/war/js/app.min.js index e9f86bad..37da76ca 100644 --- a/war/js/app.min.js +++ b/war/js/app.min.js @@ -2005,9 +2005,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f this.graph.pageBreaksVisible;var c=a.getAttribute("pageWidth"),f=a.getAttribute("pageHeight");null!=c&&null!=f&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(c),parseFloat(f)));a=a.getAttribute("background");this.graph.background=null!=a&&0';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; +[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b, 0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6
')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c= a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))}; @@ -7343,13 +7343,13 @@ a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttrib mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var y=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=y?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)== k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default", D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),g.style.paddingRight=18*l.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),y.setAttribute("src",IMAGE_PATH+"/download.png"),y.setAttribute("title",mxResources.get("save")),l.insertBefore(y,l.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this, -function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);y.parentNode.removeChild(y);y=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g';k=0\x3c/script>')};EditorUi.prototype.showHtmlDialog= -function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value", -"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"), -l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input"); -B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1=a.getStatus()?b(JSON.parse(a.getText())):401===a.getStatus()? (this.clearPersistentToken(),this.setUser(null),this.token=null,l?e({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){k(!0)},e)})}):this.authenticate(function(){g(!0)},e)):e(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&e(this.parseRequestText(a))}))}),k=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){k(!0)},e,a):g(a)});null==this.token?this.authenticate(function(){k(!0)},e):k(!1)}else e({message:mxResources.get("unknownError")})}; OneDriveClient.prototype.parseRequestText=function(a){var c={message:mxResources.get("unknownError")};try{c=JSON.parse(a.getText())}catch(f){}return c};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(a)};OneDriveClient.prototype.pickFolder=function(a){WL.fileDialog({mode:"save"}).then(function(c){a(c)},function(c){a(null)})}; -OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});WL.fileDialog({mode:"open",select:"multi"}).then(function(c){if(null!=c&&null!=c.data&&null!=c.data.files)for(var f=0;f=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1}; GitHubFile.prototype.save=function(a,c,f){this.doSave(this.getTitle(),c,f)};GitHubFile.prototype.saveAs=function(a,c,f){this.doSave(a,c,f)};GitHubFile.prototype.doSave=function(a,c,f){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,f)}; GitHubFile.prototype.saveFile=function(a,c,f,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var b=this.isModified,e=this.isModified(),g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}});g();this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=b;this.meta.sha=a.content.sha;this.meta.html_url=a.content.html_url;this.meta.download_url=a.content.download_url; @@ -7783,26 +7783,26 @@ k.close()}}))});l()}else null!=k&&k.close()}):c({message:mxResources.get("servic GitHubClient.prototype.executeRequest=function(a,c,f){var d=mxUtils.bind(this,function(e){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout),l=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+l)};a.send(mxUtils.bind(this,function(){window.clearTimeout(k);if(g)if(200<=a.getStatus()&&299>=a.getStatus())c(a);else if(401===a.getStatus())e?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this, function(){this.authenticate(function(){b(!0)},f)})}):this.authenticate(function(){d(!0)},f);else if(403===a.getStatus()){var l=!1;try{var n=JSON.parse(a.getText());null!=n&&null!=n.errors&&0=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(b={path:d,message:b,content:e},null!=g&&(b.sha=g),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref="+encodeURIComponent(f),JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),l))}; +GitHubClient.prototype.writeFile=function(a,c,f,d,b,e,g,k,l){e.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(f={path:d,branch:decodeURIComponent(f),message:b,content:e},null!=g&&(f.sha=g),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d,JSON.stringify(f),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),l))}; GitHubClient.prototype.checkExists=function(a,c,f){this.getFile(a,mxUtils.bind(this,function(d){if(c&&null!=d.meta){var b=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b();f(!0,d.meta.sha)},function(){b();f(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){f(!1)})}),mxUtils.bind(this,function(a){f(!0)}))}; GitHubClient.prototype.saveFile=function(a,c,f){var d=a.meta.org,b=a.meta.repo,e=a.meta.ref,g=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(k){var l=Base64.encode(a.getData()),m=mxUtils.bind(this,function(n){this.writeFile(d,b,e,g,k,l,n,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"), mxResources.get("fileChangedOverwrite"),mxResources.get("cancel"),mxUtils.bind(this,function(){f()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+b+"/"+e+"/"+g,mxUtils.bind(this,function(a){m(a.meta.sha)}),mxUtils.bind(this,function(){m(null)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):f(a)}))});m(a.meta.sha)}),mxUtils.bind(this,function(){f()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)}; GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)}; GitHubClient.prototype.showGitHubDialog=function(a,c){var f=null,d=null,b=null,e=null,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,mxResources.get(a?"selectFile":"selectFolder"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px"; -g.appendChild(l);var m=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){c(f+"/"+d+"/"+b+"/"+e)}));this.ui.showDialog(m.container,340,270,!0,!0);a&&m.okButton.parentNode.removeChild(m.okButton);var n=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(n(f+"/"+d,mxUtils.bind(this, -function(){e=null;v()})));a||(mxUtils.write(c," / "),c.appendChild(n(b,mxUtils.bind(this,function(){e=null;t()}))));if(null!=e&&0]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y=z)v=q&1?v:"";else if(A=v.charCodeAt(1),F=v.charCodeAt(2),E=48<=A&&57>=A,I=48<=F&&57>=F,43===z&&(E||46===A&&I))v=q&1?(E?"":"0")+v.substring(1):"";else if(45===z&&(E||46===A&&I))v=q&4?(E?"-":"-0")+v.substring(1): -q&1?"0":"";else if(46===z&&E)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,E=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y=z)v=q&1?v:"";else if(A=v.charCodeAt(1),E=v.charCodeAt(2),F=48<=A&&57>=A,I=48<=E&&57>=E,43===z&&(F||46===A&&I))v=q&1?(F?"":"0")+v.substring(1):"";else if(45===z&&(F||46===A&&I))v=q&4?(F?"-":"-0")+v.substring(1): +q&1?"0":"";else if(46===z&&F)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R"]=E["+"]=E["~"]=E;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c"]=F["+"]=F["~"]=F;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c])/g; -d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,Q,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=Q,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("</",f,Q,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,Q,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,Q,e))}else{var u=c,G=b,y=f,x=Q,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D, -y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("<",f,Q,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l"!==c[l]||!/--$/.test(c[l-1]));l++);if(l"!==c[l];l++);l"!==c[l];l++);l":b.e&&b.e(">",f,Q,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,Q,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==Q)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=P.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n= -e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(K,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)"); +16)):Q&&W.test(b)?(Q.innerHTML="&"+b+";",d=Q.textContent,V[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(K,"&").replace(T,"<").replace(aa,">").replace(ba,""")}function e(a){return a.replace(N,"&$1").replace(T,"<").replace(aa,">")}function k(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g; +d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,P,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=P,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("</",f,P,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,P,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,P,e))}else{var u=c,G=b,y=f,x=P,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D, +y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("<",f,P,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l"!==c[l]||!/--$/.test(c[l-1]));l++);if(l"!==c[l];l++);l"!==c[l];l++);l":b.e&&b.e(">",f,P,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,P,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==P)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=O.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n= +e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(ca,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)"); if("attribs"in m)k=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=c,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===c&&(p.v!==n||c!==n)&&g.push("")}l&a.c.EMPTY||e.push({D:c,v:n});g.push("<",n);c=0;for(p=k.length;c");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&g.push("")}else f=!(l&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d= a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var k=e[d].D;if(k===b)break;if(!(a.f[k]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(k=e.length;--k>d;){var g=e[k].v;a.f[g]&a.c.OPTIONAL_ENDTAG||c.push("")}d")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("")}})}function q(a,b,c,d,e){if(!e)return null;try{var k= f.parse(""+a);if(k&&(!k.K()||ga.test(k.W()))){var g=e(k,b,c,d);return g?g.toString():null}}catch(ia){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function G(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function I(b,c,d,e,f){for(var k=0;k",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,aa="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,K=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,M=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,L=/&/g,O=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T= -/[<]/g,ba=/>/g,ca=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,Q={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=N;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,N(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q); +e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,G(a.J,b,g),G(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function M(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:I(e,f,b,c,d)}}}function J(a,b){var c=[];p(b)(a, +c);return c.join("")}var U,R;"undefined"!==typeof window&&(U=window.parseCssDeclarations,R=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,Q="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,L=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,N=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T= +/[<]/g,aa=/>/g,ba=/\"/g,O=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,P={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=M;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,M(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q); c=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=c)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");l>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):(127d?b+= String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;cd?(b+=String.fromCharCode(d),c++):191d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(k,m){if(!d[k]){if(!c[k]){var l="function"==typeof require&&require;if(!m&&l)return l(k,!0);if(g)return g(k,!0);l=Error("Cannot find module '"+k+"'");throw l.code="MODULE_NOT_FOUND",l;}l=d[k]={exports:{}}; @@ -115,76 +115,76 @@ d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6 2===g?31:3===g?15:7;1k?n[f++]=k:(k-=65536,n[f++]=55296|k>>10&1023,n[f++]=56320|1023&k)}return e(n,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+l[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var e=65535&b|0;b=b>>>16&65535|0;for(var f;0!==d;){f=2E3d;d++){b=d;for(var e= 0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=0))} -function k(b,c){F._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+O,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>= -2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&kg){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window, -b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=E(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+ -b.insert>=L)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<=L&&(b.ins_h=(b.ins_h<=L)if(e=F._tr_tally(b,b.strstart-b.match_start,b.match_length-L),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=L){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=L&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===U||b.match_length===L&&4096=L&&b.match_length<=b.prev_length){f= -b.strstart+b.lookahead-L;e=F._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-L);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+N,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>= +2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&kg){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window, +b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=F(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+ +b.insert>=K)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=K)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===U||b.match_length===K&&4096=K&&b.match_length<=b.prev_length){f= +b.strstart+b.lookahead-K;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ba:ca,b.adler=2===c.wrap?0:1,c.last_flush=B,F._tr_init(c),I):e(b,N)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length= -b.prev_length=L-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15k||k>D||d!==X||8>f||15c||9g||g>R)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<b.pending_buf_size-5&& -(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):(b.strstart>b.block_start&&k(b,!1),P)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32, -32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b, -0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ba)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>> -8&255)),n.gzhead.hcrc&&(b.adler=E(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!== -n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending- -q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindexq&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r= -1;break}r=n.gzindexq&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)- -(4=L&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=L?(t=F._tr_tally(n,1,n.match_length- -L),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=F._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=P;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:Q):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==Q||(n.status=666),t===P||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?F._tr_align(n):5!==c&&(F._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0=== -n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>= -L;){e=d.strstart;k=d.lookahead-(L-1);do d.ins_h=(d.ins_h<z&&(x+=N[e++]<>>24,x>>>=C,z-=C,C=E>>>16&255,0===C)J[m++]=65535&E;else{if(!(16&C)){if(0===(64&C)){E=A[(65535&E)+(x&(1<>>=C,z-=C);15>z&&(x+=N[e++]<>>24,x>>>=C,z-=C,C=E>>>16&255,!(16&C)){if(0===(64&C)){E=v[(65535& -E)+(x&(1<q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,I=y,0===u){if(E+=r-C,C>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e>> +this.ins_h=0;this.dyn_ltree=new v.Buf16(2*da);this.dyn_dtree=new v.Buf16(2*(2*Q+1));this.bl_tree=new v.Buf16(2*(2*ca+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new v.Buf16(L+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c; +return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?aa:ba,b.adler=2===c.wrap?0:1,c.last_flush=B,E._tr_init(c),I):e(b,M)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length= +b.prev_length=K-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return M;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15k||k>D||d!==X||8>f||15c||9g||g>R)return e(b,M);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<b.pending_buf_size-5&& +(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return O;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return O}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):(b.strstart>b.block_start&&k(b,!1),O)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32, +32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?M:(b.state.gzhead=c,I):M};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5c)return b?e(b,M):M;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b, +0===b.avail_out?-5:M);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===aa)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>> +8&255)),n.gzhead.hcrc&&(b.adler=F(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ba,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!== +n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending- +q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindexq&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r= +1;break}r=n.gzindexq&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)- +(4=K&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=K?(t=E._tr_tally(n,1,n.match_length- +K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=O;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:P):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?O:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==P||(n.status=666),t===O||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0=== +n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>= +K;){e=d.strstart;k=d.lookahead-(K-1);do d.ins_h=(d.ins_h<z&&(x+=M[e++]<>>24,x>>>=C,z-=C,C=F>>>16&255,0===C)J[m++]=65535&F;else{if(!(16&C)){if(0===(64&C)){F=A[(65535&F)+(x&(1<>>=C,z-=C);15>z&&(x+=M[e++]<>>24,x>>>=C,z-=C,C=F>>>16&255,!(16&C)){if(0===(64&C)){F=v[(65535& +F)+(x&(1<q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(F=0,I=y,0===u){if(F+=r-C,C>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e>> 24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was= -this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(F),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15< +this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(E),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15< c)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==z&&(b.state=null),d):A}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext= -e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveD;){if(0===m)break a;m--;B+=f[g++]<>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check"; -d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,P=(15&B)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<D;){if(0===m)break a;m--;B+=f[g++]<>8&1);512&d.flags&& +e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveD;){if(0===m)break a;m--;B+=f[g++]<>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check"; +d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,O=(15&B)+8,0===d.wbits)d.wbits=O;else if(O>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<D;){if(0===m)break a;m--;B+=f[g++]<>8&1);512&d.flags&& (S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<>>8&255,S[2]=B>>>16&255,S[3]=B>>>24&255,d.check=u(d.check,S,4,0));D=B=0;d.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<>8);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>D;){if(0===m)break a;m--; -B+=f[g++]<>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(K=d.length,K>m&&(K=m),K&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,K,P)),512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,d.length-=K),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;K=0;do P=f[g+ -K++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&Kd.length&&(d.head.comment+=String.fromCharCode(P));while(P&&KD;){if(0===m)break a;m--; +B+=f[g++]<>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(E=d.length,E>m&&(E=m),E&&(d.head&&(O=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,E,O)),512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,d.length-=E),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;E=0;do O=f[g+ +E++],d.head&&O&&65536>d.length&&(d.head.name+=String.fromCharCode(O));while(O&&Ed.length&&(d.head.comment+=String.fromCharCode(O));while(O&&ED;){if(0===m)break a;m--; B+=f[g++]<>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<>>=7&D;D-=7&D;d.mode=27;break}for(;3>D;){if(0=== -m)break a;m--;B+=f[g++]<>>=1,--D,3&B){case 0:d.mode=14;break;case 1:O=d;if(E){p=new r.Buf32(512);q=new r.Buf32(32);for(M=0;144>M;)O.lens[M++]=8;for(;256>M;)O.lens[M++]=9;for(;280>M;)O.lens[M++]=7;for(;288>M;)O.lens[M++]=8;x(1,O.lens,0,288,p,0,O.work,{bits:9});for(M=0;32>M;)O.lens[M++]=5;x(2,O.lens,0,32,q,0,O.work,{bits:5});E=!1}O.lencode=p;O.lenbits=9;O.distcode=q;O.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type", -d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(K=d.length){if(K>m&&(K=m),K>C&&(K=C),0===K)break a;r.arraySet(k,f,g,K,l);m-=K;g+=K;C-=K;l+=K;d.length-=K;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<>>=5,D-=5,d.ndist=(31&B)+ +m)break a;m--;B+=f[g++]<>>=1,--D,3&B){case 0:d.mode=14;break;case 1:N=d;if(F){p=new r.Buf32(512);q=new r.Buf32(32);for(L=0;144>L;)N.lens[L++]=8;for(;256>L;)N.lens[L++]=9;for(;280>L;)N.lens[L++]=7;for(;288>L;)N.lens[L++]=8;x(1,N.lens,0,288,p,0,N.work,{bits:9});for(L=0;32>L;)N.lens[L++]=5;x(2,N.lens,0,32,q,0,N.work,{bits:5});F=!1}N.lencode=p;N.lenbits=9;N.distcode=q;N.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type", +d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(E=d.length){if(E>m&&(E=m),E>C&&(E=C),0===E)break a;r.arraySet(k,f,g,E,l);m-=E;g+=E;C-=E;l+=E;d.length-=E;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<>>=5,D-=5,d.ndist=(31&B)+ 1,B>>>=5,D-=5,d.ncode=(15&B)+4,B>>>=4,D-=4,286D;){if(0===m)break a;m--;B+=f[g++]<>>=3;D-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},Y=x(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have< -d.nlen+d.ndist;){for(;Q=d.lencode[B&(1<>>24,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<O)B>>>=L,D-=L,d.lens[d.have++]=O;else{if(16===O){for(M=L+2;D>>=L,D-=L,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];K=3+(3&B);B>>>=2;D-=2}else if(17===O){for(M=L+3;D>>=L;D-=L;P=0;K=3+(7&B);B>>>=3;D-=3}else{for(M=L+7;D>>=L;D-=L;P=0;K=11+(127&B);B>>>=7;D-=7}if(d.have+K>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;K--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist, -d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,F);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;Q=d.lencode[B&(1<>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,d.length=O,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode= -23;case 23:for(;Q=d.distcode[B&(1<>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(K=F-C,d.offset>K){if(K=d.offset-K,K>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}K>d.wnext?(K-=d.wnext,H=d.wsize-K):H=d.wnext-K;K>d.length&&(K=d.length);M=d.window}else M=k,H=l-d.offset,K=d.length;K>C&&(K=C);C-=K;d.length-=K;do k[l++]=M[H++];while(--K);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a; -k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<D;){if(0===m)break a;m--;B+=f[g++]<d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,F-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,F-=b.avail_out,b.total_in+=W,b.total_out+=F,d.total+=F,d.wrap&&F&&(b.adler=d.check=d.flags?u(d.check,k,F,b.next_out-F):t(d.check,k,F,b.next_out-F)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===F||4=== +d.nlen+d.ndist;){for(;P=d.lencode[B&(1<>>24,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<N)B>>>=K,D-=K,d.lens[d.have++]=N;else{if(16===N){for(L=K+2;D>>=K,D-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}O=d.lens[d.have-1];E=3+(3&B);B>>>=2;D-=2}else if(17===N){for(L=K+3;D>>=K;D-=K;O=0;E=3+(7&B);B>>>=3;D-=3}else{for(L=K+7;D>>=K;D-=K;O=0;E=11+(127&B);B>>>=7;D-=7}if(d.have+E>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;E--;)d.lens[d.have++]=O}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist, +d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,Q);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;P=d.lencode[B&(1<>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,d.length=N,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode= +23;case 23:for(;P=d.distcode[B&(1<>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=N;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(E=Q-C,d.offset>E){if(E=d.offset-E,E>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}E>d.wnext?(E-=d.wnext,H=d.wsize-E):H=d.wnext-E;E>d.length&&(E=d.length);L=d.window}else L=k,H=l-d.offset,E=d.length;E>C&&(E=C);C-=E;d.length-=E;do k[l++]=L[H++];while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a; +k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<D;){if(0===m)break a;m--;B+=f[g++]<d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,Q-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,Q-=b.avail_out,b.total_in+=W,b.total_out+=Q,d.total+=Q,d.wrap&&Q&&(b.adler=d.check=d.flags?u(d.check,k,Q,b.next_out-Q):t(d.check,k,Q,b.next_out-Q)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===Q||4=== c)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return A;var c=b.state;return c.window&&(c.window=null),b.state=null,z};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?A:(d.head=c,c.done=!1,z)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,z)):A};d.inflateInfo="pako inflate (from Nodeca project)"}, {"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24, -25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,y){var m,n,p,v,F,H,E,C,B=y.bits,G,I,N,J,U,R,V=0,X,D=null,W=0,aa=new e.Buf16(16);v=new e.Buf16(16);var K=null,da=0;for(G=0;15>=G;G++)aa[G]=0;for(I=0;IN&&(J=N),0===N)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B=G;G++)if(m<<=1,m-=aa[G],0>m)return-1;if(0G;G++)v[G+1]=v[G]+ -aa[G];for(I=0;IF?(E=K[da+u[I]],C=D[W+u[I]]):(E=96,C=0);m=1<>R)+n]=H<<24|E<<16|C|0;while(0!==n);for(m=1<>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--aa[G]){if(G===N)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R; -for(m=1<=m));)U++,m<<=1;if(V+=1<=G;G++)Q[G]=0;for(I=0;IM&&(J=M),0===M)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B=G;G++)if(m<<=1,m-=Q[G],0>m)return-1;if(0G;G++)v[G+1]=v[G]+Q[G]; +for(I=0;IE?(F=ca[da+u[I]],C=D[W+u[I]]):(F=96,C=0);m=1<>R)+n]=H<<24|F<<16|C|0;while(0!==n);for(m=1<>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--Q[G]){if(G===M)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R;for(m= +1<=m));)U++,m<<=1;if(V+=1<>>8&255}function l(b,c,d){b.bi_valid>V-d?(b.bi_buf|=c<>V-b.bi_valid,b.bi_valid+=d-V):(b.bi_buf|=c<>>=1,d<<=1;while(0< ---c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;ce?ba[e]:ba[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k],l(b, -e,g)));while(nb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]= +--c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;ce?aa[e]:aa[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k], +l(b,e,g)));while(nb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]= d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,D=c.stat_desc.extra_bits,y=c.stat_desc.extra_base,x=c.stat_desc.max_length,B=0;for(e=0;e<=R;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;dx&&(e=x,B++),g[2* f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=D[f-y]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==B){do{for(e=x-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[x]--;B-=2}while(0l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function z(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,g=c[2*(e+1)+1],++l=l?b.bl_tree[2*W]++:b.bl_tree[2*aa]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,aa,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138, -q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;ce;e++)for(P[e]=d,c=0;c<1<e;e++)for(Y[e]= -d,c=0;c<1<>=7;e=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,I+1,k);for(c=0;c>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)F(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,O,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+ -1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ca[d]+G+1)]++,b.dyn_dtree[2*(256>c?ba[c]:ba[256+(c>>>7)])]++),b.last_lit=== -b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign; +f===g||(l=l?b.bl_tree[2*W]++:b.bl_tree[2*Q]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,Q,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,q= +3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;ce;e++)for(O[e]=d,c=0;c<1<e;e++)for(Y[e]= +d,c=0;c<1<>=7;e=c;)N[2*c+1]=8,c++,k[8]++;for(;255>=c;)N[2*c+1]=9,c++,k[9]++;for(;279>=c;)N[2*c+1]=7,c++,k[7]++;for(;287>=c;)N[2*c+1]=8,c++,k[8]++;p(N,I+1,k);for(c=0;c>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,N,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+ +1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ba[d]+G+1)]++,b.dyn_dtree[2*(256>c?aa[c]:aa[256+(c>>>7)])]++),b.last_lit=== +b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,N);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign; var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); @@ -523,9 +523,9 @@ mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxCon n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}}; mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0r.alpha&&u.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(y);this.root.appendChild(u);var x,z;q=x=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!= -document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&& (q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);y.setAttribute("width", Math.round(Math.max(1,c)));y.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(y,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}}; @@ -573,9 +573,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){k=this.sta g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=Math.PI/180*p,e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)}; function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2}; mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a}; -mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-E)>1,++e[l];return c}; mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;fn&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,y=null,x,z=null,l=0;lu[H]&&v++,r[A]y[H]&&v++,t[A]u[H]&&v++,r[A]y[H]&&v++,t[A]'):("CSS1Compat"===document.compatMode&&k.writeln(""),k.writeln(""));k.writeln("");this.writeHead(k,a);k.writeln("");k.writeln('')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-= q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),y=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*y;var x=mxUtils.bind(this,function(){if(this.pageSelector&&(1");a.writeln("");a.close();mxEvent.release(a.body)}}; mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln(""+this.title+"");mxClient.IS_VML&&a.writeln('');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('")};mxPrintPreview.prototype.writePostfix=function(a){}; @@ -1149,17 +1149,17 @@ b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&& d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))}, SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,F=null!=u&&x.y>=u.y&&x.y<=u.y+ -u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&F,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(F||u)){m=F?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.yb.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.xb.x+b.width))&&f(new mxPoint(n.x, +Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,E=null!=u&&x.y>=u.y&&x.y<=u.y+ +u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&E,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(E||u)){m=E?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.yb.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.xb.x+b.width))&&f(new mxPoint(n.x, p.y));m?p.y=n.y:p.x=n.x;for(r=0;rc.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.xc.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1< e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[q]&&null!=c)for(;1v;v++)mxEdgeStyle.limits[v][1]= -n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);F=z-p;z=0;0>v?z=0>F?2:1:0>=F&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST), +n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=z-p;z=0;0>v?z=0>E?2:1:0>=E&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST), b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-A,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-A,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-A,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-A,0);A=[]; c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),A[v]=q[v][0]&d[v],A[v]|=(q[v][1]&d[v])<<8,A[v]|=(q[1-v][v]&d[v])<<16,A[v]|=(q[1-v][1-v]&d[v])<<24,0==(A[v]&15)&&(A[v]<<=8),0==(A[v]&3840)&&(A[v]=A[v]&15|A[v]>>8),0==(A[v]& @@ -2005,9 +2005,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f this.graph.pageBreaksVisible;var b=a.getAttribute("pageWidth"),c=a.getAttribute("pageHeight");null!=b&&null!=c&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(b),parseFloat(c)));a=a.getAttribute("background");this.graph.background=null!=a&&0mxUtils.indexOf(z,r))&&d.setCellStyles(r,C,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){H(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){H(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a, b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, +mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, "locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();H=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell"); null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=H?this.addSelectionCells(H):1"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(a.style, -mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle= -k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=""; -this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a, -b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE))); -this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)== +mxConstants.FONT_BOLD,k=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight= +f?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+ +"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=mxCellEditor.prototype.resize; +mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN, +mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"
").replace(/\n/g,"
"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}}; var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(b||"")&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor= function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&& @@ -2361,10 +2361,10 @@ this.secondDiv=null)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberb c};var z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE; this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= -function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return v.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell), -d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell); +function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return v.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell), +d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell); (this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0"); b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())}; @@ -2695,26 +2695,26 @@ d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=pars function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value", "url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"), l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var A=document.createElement("input"); -A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}), null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})}; EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;eb;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13, 10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-8);m=4294967295;m=this.updateCRC(m,b,0,4);m=this.updateCRC(m,d,0,d.length);e+=k(c.length+d.length+1+("zTXt"==b?1:0))+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+k(m^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e, !0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0=a.getStatus()&&q(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=l.xml&&0mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(x.getDefaultParent());ca()},!0,z);z=null}else if("horizontaltree"==E||"verticaltree"== -E||"auto"==E&&da.length==2*c.length-1&&1==K.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==E);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ba=new mxParallelEdgeLayout(x);ba.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ca()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}}; +null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0mxUtils.indexOf(c,a)};this.executeLayout(function(){O.execute(x.getDefaultParent());ba()},!0,z);z=null}else if("horizontaltree"==F||"verticaltree"== +F||"auto"==F&&da.length==2*c.length-1&&1==ca.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==F);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(x);aa.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ba()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}}; EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width- 2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&& @@ -2905,9 +2905,9 @@ Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this, p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=v.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document); p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){v.style.display=1';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; +(function(){EditorUi.VERSION="6.3.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='';EditorUi.prototype.emptyLibraryXml="[]";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b, 0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6
')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c= a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))}; @@ -7356,13 +7356,13 @@ a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttrib mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)== k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default", E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this, -function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g 0) ? tokens[tokens.length - 1] : path; @@ -366,7 +365,7 @@ GitHubClient.prototype.getFile = function(path, success, error, asLibrary) else { var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo + - '/contents/' + path + '?ref=' + encodeURIComponent(ref), null, 'GET'); + '/contents/' + path + '?ref=' + decodeURIComponent(ref), null, 'GET'); this.executeRequest(req, mxUtils.bind(this, function(req) { @@ -525,6 +524,7 @@ GitHubClient.prototype.writeFile = function(org, repo, ref, path, message, data, var entity = { path: path, + branch: decodeURIComponent(ref), message: message, content: data }; @@ -535,8 +535,7 @@ GitHubClient.prototype.writeFile = function(org, repo, ref, path, message, data, } var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo + - '/contents/' + path + '?ref=' + encodeURIComponent(ref), - JSON.stringify(entity), 'PUT'); + '/contents/' + path, JSON.stringify(entity), 'PUT'); this.executeRequest(req, mxUtils.bind(this, function(req) { @@ -705,7 +704,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn) var dlg = new CustomDialog(this.ui, content, mxUtils.bind(this, function() { - fn(org + '/' + repo + '/' + ref + '/' + path); + fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + path); })); this.ui.showDialog(dlg.container, 340, 270, true, true); @@ -738,7 +737,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn) if (!hideRef) { mxUtils.write(pathInfo, ' / '); - pathInfo.appendChild(createLink(ref, mxUtils.bind(this, function() + pathInfo.appendChild(createLink(decodeURIComponent(ref), mxUtils.bind(this, function() { path = null; selectRef(); @@ -778,7 +777,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn) var selectFile = mxUtils.bind(this, function() { var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo + - '/contents/' + path + '?ref=' + encodeURIComponent(ref), null, 'GET'); + '/contents/' + path + '?ref=' + ref, null, 'GET'); dlg.okButton.removeAttribute('disabled'); div.innerHTML = ''; this.ui.spinner.spin(div, mxResources.get('loading')); @@ -828,7 +827,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn) else if (showFiles && file.type == 'file') { this.ui.hideDialog(); - fn(org + '/' + repo + '/' + ref + '/' + file.path); + fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + file.path); } }))); mxUtils.br(div); @@ -943,30 +942,29 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn) { if (value != null) { - this.ui.spinner.spin(div, mxResources.get('loading')); + var tokens = value.split('/'); - this.getFile(value, mxUtils.bind(this, function(file) + if (tokens.length > 1 && this.ui.spinner.spin(div, mxResources.get('loading'))) { - this.ui.spinner.stop(); - org = file.meta.org; - repo = file.meta.repo; - ref = file.meta.ref; - - if (file.meta.path != null && showFiles) - { - this.ui.hideDialog(); - fn(org + '/' + repo + '/' + ref + '/' + file.meta.path); - } - else + var tmpOrg = tokens[0]; + var tmpRepo = tokens[1]; + var tmpRef = encodeURIComponent(tokens.slice(2, tokens.length).join('/')); + + this.getFile(tmpOrg + '/' + tmpRepo + '/' + tmpRef, mxUtils.bind(this, function(file) { + this.ui.spinner.stop(); + org = file.meta.org; + repo = file.meta.repo; + ref = decodeURIComponent(file.meta.ref); path = ''; + selectFile(); - } - }), mxUtils.bind(this, function(err) - { - this.ui.spinner.stop(); - this.ui.handleError({message: mxResources.get('fileNotFound')}); - })); + }), mxUtils.bind(this, function(err) + { + this.ui.spinner.stop(); + this.ui.handleError({message: mxResources.get('fileNotFound')}); + })); + } } }), mxResources.get('enterValue')); this.ui.showDialog(dlg.container, 300, 80, true, false); diff --git a/war/js/diagramly/GitHubFile.js b/war/js/diagramly/GitHubFile.js index c89c7475..67edee5a 100644 --- a/war/js/diagramly/GitHubFile.js +++ b/war/js/diagramly/GitHubFile.js @@ -24,9 +24,8 @@ GitHubFile.prototype.getHash = function() ((this.meta.repo != null) ? encodeURIComponent(this.meta.repo) + '/' + ((this.meta.ref != null) ? - encodeURIComponent(this.meta.ref) + - ((this.meta.path != null) ? '/' + this.meta.path - : '') : '') : '')); + this.meta.ref + ((this.meta.path != null) ? + '/' + this.meta.path : '') : '') : '')); }; /** diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js index f3b583c9..3077c48f 100644 --- a/war/js/embed-static.min.js +++ b/war/js/embed-static.min.js @@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.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;enavigator.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:"6.3.0",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/")|| @@ -1655,13 +1655,13 @@ f&&Math.abs(this.scrollTop-g.container.scrollTop)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:"6.3.0",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/")|| @@ -1655,13 +1655,13 @@ f&&Math.abs(this.scrollTop-g.container.scrollTop)]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y=z)v=q&1?v:"";else if(A=v.charCodeAt(1),F=v.charCodeAt(2),E=48<=A&&57>=A,I=48<=F&&57>=F,43===z&&(E||46===A&&I))v=q&1?(E?"":"0")+v.substring(1):"";else if(45===z&&(E||46===A&&I))v=q&4?(E?"-":"-0")+v.substring(1): -q&1?"0":"";else if(46===z&&E)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R]/g,A={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},v=/^(?:([^:/?# ]+):)?/,E=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function G(f,k,g,l,m){f=x(f);var n=b[f];if(n&&"object"===typeof n){for(var q=n.cssPropBits,r=q&80,t=q&1536,u=NaN,y=0,C=0;y=z)v=q&1?v:"";else if(A=v.charCodeAt(1),E=v.charCodeAt(2),F=48<=A&&57>=A,I=48<=E&&57>=E,43===z&&(F||46===A&&I))v=q&1?(F?"":"0")+v.substring(1):"";else if(45===z&&(F||46===A&&I))v=q&4?(F?"-":"-0")+v.substring(1): +q&1?"0":"";else if(46===z&&F)v=q&1?"0"+v:"";else if('url("'===v.substring(0,5))v=g&&q&16?a(p(d(l,k[y].substring(5,v.length-2)),f,g)):"";else if("("===v.charAt(v.length-1))a:{H=k;J=y;v=1;R=J+1;for(z=H.length;R"]=E["+"]=E["~"]=E;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c"]=F["+"]=F["~"]=F;k=function(a,b,c){function d(d,l){function m(c,d,e){var g,l,m,p,r,t=!0;g="";c])/g; -d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,Q,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=Q,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("</",f,Q,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,Q,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,Q,e))}else{var u=c,G=b,y=f,x=Q,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D, -y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("<",f,Q,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l"!==c[l]||!/--$/.test(c[l-1]));l++);if(l"!==c[l];l++);l"!==c[l];l++);l":b.e&&b.e(">",f,Q,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,Q,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==Q)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=P.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n= -e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(K,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)"); +16)):Q&&W.test(b)?(Q.innerHTML="&"+b+";",d=Q.textContent,V[b]=d):"&"+b+";"}return c}function c(a){return a.replace(da,b)}function d(a){return(""+a).replace(K,"&").replace(T,"<").replace(aa,">").replace(ba,""")}function e(a){return a.replace(N,"&$1").replace(T,"<").replace(aa,">")}function k(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g; +d=a+"";if(Y)d=d.split(e);else{for(var f=[],k=0,g;null!==(g=e.exec(d));)f.push(d.substring(k,g.index)),f.push(g[0]),k=g.index+g[0].length;f.push(d.substring(k));d=f}l(b,d,0,{r:!1,C:!1},c)}}function g(a,b,c,d,e){return function(){l(a,b,c,d,e)}}function l(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var k,l,p,q=c.length;d"===c[d+1])d+=2,p=k[1].toLowerCase(),b.t&&b.t(p,f,P,g(b,c,d,e,f));else{var u=c,G=d,y=b,x=f,D=P,C=e,S=n(u,G);S?(y.t&&y.t(S.name,x,D,g(y,u,G,C,x)),d=S.next):d=u.length}else b.e&&b.e("</",f,P,g(b,c,d,e,f));break;case "<":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&">"===c[d+1]){d+=2;p=k[1].toLowerCase();b.w&&b.w(p,[],f,P,g(b,c,d,e,f));var ka=a.f[p];ka&Z&&(d=m(c,{name:p,next:d,c:ka},b,f,P,e))}else{var u=c,G=b,y=f,x=P,D=e,z=n(u,d);z?(G.w&&G.w(z.name,z.R,y,x,g(G,u,z.next,D, +y)),d=z.c&Z?m(u,z,G,y,x,D):z.next):d=u.length}else b.e&&b.e("<",f,P,g(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(l=d+1;l"!==c[l]||!/--$/.test(c[l-1]));l++);if(l"!==c[l];l++);l"!==c[l];l++);l":b.e&&b.e(">",f,P,g(b,c,d,e,f));break;case "":break;default:b.e&&b.e(r,f,P,g(b,c,d,e,f))}}b.B&&b.B(f)}catch(fa){if(fa!==P)throw fa;}}function m(b,c,d,f,k,l){var m=b.length;S.hasOwnProperty(c.name)||(S[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var n=S[c.name],p=c.next,q=c.next+1;q"!==b[g];g++)k+=b[g];if(!(l<=g)){for(var m=[];""!==k;)if(e=O.exec(k))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],n=!1,k=[k,b[g++]];g"===b[g])break}else 0<=b[g].indexOf(e)&&(n=!0);k.push(b[g])}if(l<=g)break;k=k.join("")}else{var n= +e[1].toLowerCase(),p;if(e[2]){p=e[3];var q=p.charCodeAt(0);if(34===q||39===q)p=p.substr(1,p.length-2);p=c(p.replace(ca,""))}else p="";m.push(n,p);k=k.substr(e[0].length)}else k=k.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=g+1;return f}}function p(b){function c(a,b){f||b.push(a)}var e,f;return k({startDoc:function(){e=[];f=!1},startTag:function(c,k,g){if(!f&&a.f.hasOwnProperty(c)){var l=a.f[c];if(!(l&a.c.FOLDABLE)){var m=b(c,k);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)"); if("attribs"in m)k=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=a.f[n]):(n=c,m=l);if(l&a.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===c&&(p.v!==n||c!==n)&&g.push("")}l&a.c.EMPTY||e.push({D:c,v:n});g.push("<",n);c=0;for(p=k.length;c");l&a.c.EMPTY&&!(m&a.c.EMPTY)&&g.push("")}else f=!(l&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d= a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var k=e[d].D;if(k===b)break;if(!(a.f[k]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(k=e.length;--k>d;){var g=e[k].v;a.f[g]&a.c.OPTIONAL_ENDTAG||c.push("")}d")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("")}})}function q(a,b,c,d,e){if(!e)return null;try{var k= f.parse(""+a);if(k&&(!k.K()||ga.test(k.W()))){var g=e(k,b,c,d);return g?g.toString():null}}catch(ia){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function G(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function I(b,c,d,e,f){for(var k=0;k",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,aa="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,K=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,M=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,L=/&/g,O=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T= -/[<]/g,ba=/>/g,ca=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,Q={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=N;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,N(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q); +e?e(l):l;f&&r(f,b,g,m,l);break;case a.d.URI:l=q(l,G(a.J,b,g),G(a.I,b,g),{TYPE:"MARKUP",XML_ATTR:g,XML_TAG:b},d);f&&r(f,b,g,m,l);break;case a.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=e?e(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&r(f,b,g,m,l);break;default:l=null,f&&r(f,b,g,m,l)}else l=null,f&&r(f,b,g,m,l);c[k+1]=l}return c}function M(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:I(e,f,b,c,d)}}}function J(a,b){var c=[];p(b)(a, +c);return c.join("")}var U,R;"undefined"!==typeof window&&(U=window.parseCssDeclarations,R=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},X=/^#(\d+)$/,D=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,Q="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,da=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,L=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,N=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T= +/[<]/g,aa=/>/g,ba=/\"/g,O=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,Z=a.c.CDATA|a.c.RCDATA,P={},S={},ga=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=d;ea.ra=ea.makeHtmlSanitizer=p;ea.sa=ea.makeSaxParser=k;ea.ta=ea.makeTagPolicy=M;ea.wa=ea.normalizeRCData=e;ea.xa=ea.sanitize=function(a,b,c,d){return J(a,M(b,c,d))};ea.ya=ea.sanitizeAttribs=I;ea.za=ea.sanitizeWithPolicy=J;ea.Ba=ea.unescapeEntities=c;return ea}(q); c=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=c)})(); var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");l>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):(127d?b+= @@ -118,76 +118,76 @@ d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6 2===g?31:3===g?15:7;1k?n[f++]=k:(k-=65536,n[f++]=55296|k>>10&1023,n[f++]=56320|1023&k)}return e(n,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+l[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var e=65535&b|0;b=b>>>16&65535|0;for(var f;0!==d;){f=2E3d;d++){b=d;for(var e= 0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=0))} -function k(b,c){F._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+O,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>= -2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&kg){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window, -b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=E(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+ -b.insert>=L)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<=L&&(b.ins_h=(b.ins_h<=L)if(e=F._tr_tally(b,b.strstart-b.match_start,b.match_length-L),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=L){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=L&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===U||b.match_length===L&&4096=L&&b.match_length<=b.prev_length){f= -b.strstart+b.lookahead-L;e=F._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-L);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,n=b.window,p=b.w_mask,q=b.prev,r=b.strstart+N,t=n[k+g-1],G=n[k+g];b.prev_length>=b.good_match&&(f>>= +2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===G&&n[d+g-1]===t&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;for(d++;n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&kg){if(b.match_start=c,g=e,e>=l)break;t=n[k+g-1];G=n[k+g]}}while((c=q[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=k+(k-T)){v.arraySet(b.window, +b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,v.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=H(c.adler,e,l,g):2===c.state.wrap&&(c.adler=F(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),b.lookahead+=d,b.lookahead+ +b.insert>=K)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=K)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===U||b.match_length===K&&4096=K&&b.match_length<=b.prev_length){f= +b.strstart+b.lookahead-K;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ba:ca,b.adler=2===c.wrap?0:1,c.last_flush=B,F._tr_init(c),I):e(b,N)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length= -b.prev_length=L-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15k||k>D||d!==X||8>f||15c||9g||g>R)return e(b,N);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<b.pending_buf_size-5&& -(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:Q):(b.strstart>b.block_start&&k(b,!1),P)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32, -32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,I):N};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b, -0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ba)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>> -8&255)),n.gzhead.hcrc&&(b.adler=E(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!== -n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending- -q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindexq&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r= -1;break}r=n.gzindexq&&(b.adler=E(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)- -(4=L&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=L?(t=F._tr_tally(n,1,n.match_length- -L),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=F._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=P;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:Q):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==Q||(n.status=666),t===P||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?F._tr_align(n):5!==c&&(F._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0=== -n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>= -L;){e=d.strstart;k=d.lookahead-(L-1);do d.ins_h=(d.ins_h<z&&(x+=N[e++]<>>24,x>>>=C,z-=C,C=E>>>16&255,0===C)J[m++]=65535&E;else{if(!(16&C)){if(0===(64&C)){E=A[(65535&E)+(x&(1<>>=C,z-=C);15>z&&(x+=N[e++]<>>24,x>>>=C,z-=C,C=E>>>16&255,!(16&C)){if(0===(64&C)){E=v[(65535& -E)+(x&(1<q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,I=y,0===u){if(E+=r-C,C>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e>> +this.ins_h=0;this.dyn_ltree=new v.Buf16(2*da);this.dyn_dtree=new v.Buf16(2*(2*Q+1));this.bl_tree=new v.Buf16(2*(2*ca+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new v.Buf16(L+1);this.heap=new v.Buf16(2*W+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new v.Buf16(2*W+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c; +return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?aa:ba,b.adler=2===c.wrap?0:1,c.last_flush=B,E._tr_init(c),I):e(b,M)}function x(b){var c=y(b);c===I&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=A[b.level].max_lazy,b.good_match=A[b.level].good_length,b.nice_match=A[b.level].nice_length,b.max_chain_length=A[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length= +b.prev_length=K-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,k,g){if(!b)return M;var l=1;if(c===J&&(c=6),0>f?(l=0,f=-f):15k||k>D||d!==X||8>f||15c||9g||g>R)return e(b,M);8===f&&(f=9);var m=new u;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<b.pending_buf_size-5&& +(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===B)return O;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(k(b,!1),0===b.strm.avail_out))return O}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?Z:P):(b.strstart>b.block_start&&k(b,!1),O)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,32, +32,q),new t(4,4,16,16,r),new t(8,16,32,32,r),new t(8,16,128,128,r),new t(8,32,128,256,r),new t(32,128,258,1024,r),new t(32,258,258,4096,r)];d.deflateInit=function(b,c){return z(b,c,X,15,8,0)};d.deflateInit2=z;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?M:(b.state.gzhead=c,I):M};d.deflate=function(b,c){var d,n,q,r;if(!b||!b.state||5c)return b?e(b,M):M;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||666===n.status&&c!==G)return e(b, +0===b.avail_out?-5:M);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===aa)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),l(n,n.gzhead.extra.length>> +8&255)),n.gzhead.hcrc&&(b.adler=F(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(q=X+(n.w_bits-8<<4)<<8,q|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(q|=32),n.status=ba,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!== +n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending- +q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r=1;break}r=n.gzindexq&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q)),g(b),q=n.pending,n.pending===n.pending_buf_size)){r= +1;break}r=n.gzindexq&&(b.adler=F(b.adler,n.pending_buf,n.pending-q,q));0===r&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=-1,I}else if(0===b.avail_in&&(c<<1)- +(4=K&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=K?(t=E._tr_tally(n,1,n.match_length- +K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(k(n,!1),0===n.strm.avail_out)){t=O;break a}}t=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?Z:P):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?O:Y)}else t=A[n.level].func(n,c);if(t!==Z&&t!==P||(n.status=666),t===O||t===Z)return 0===b.avail_out&&(n.last_flush=-1),I;if(t===Y&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,0,0,!1),3===c&&(f(n.head),0=== +n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,I}return c!==G?I:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new v.Buf8(d.w_size),v.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(p(d);d.lookahead>= +K;){e=d.strstart;k=d.lookahead-(K-1);do d.ins_h=(d.ins_h<z&&(x+=M[e++]<>>24,x>>>=C,z-=C,C=F>>>16&255,0===C)J[m++]=65535&F;else{if(!(16&C)){if(0===(64&C)){F=A[(65535&F)+(x&(1<>>=C,z-=C);15>z&&(x+=M[e++]<>>24,x>>>=C,z-=C,C=F>>>16&255,!(16&C)){if(0===(64&C)){F=v[(65535& +F)+(x&(1<q){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,z-=C,C=m-n,G>C){if(C=G-C,C>t&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(F=0,I=y,0===u){if(F+=r-C,C>3;e-=B;z-=B<<3;b.next_in=e;b.next_out=m;b.avail_in=e>> 24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was= -this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(F),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15< +this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(E),c.distcode=c.distdyn=new r.Buf32(H),c.sane=1,c.back=-1,z):A}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):A}function l(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15< c)?A:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):A}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==z&&(b.state=null),d):A}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext= -e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveD;){if(0===m)break a;m--;B+=f[g++]<>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check"; -d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,P=(15&B)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<D;){if(0===m)break a;m--;B+=f[g++]<>8&1);512&d.flags&& +e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveD;){if(0===m)break a;m--;B+=f[g++]<>>8&255;d.check=u(d.check,S,2,0);D=B=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&B)<<8)+(B>>8))%31){b.msg="incorrect header check"; +d.mode=30;break}if(8!==(15&B)){b.msg="unknown compression method";d.mode=30;break}if(B>>>=4,D-=4,O=(15&B)+8,0===d.wbits)d.wbits=O;else if(O>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<D;){if(0===m)break a;m--;B+=f[g++]<>8&1);512&d.flags&& (S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<>>8&255,S[2]=B>>>16&255,S[3]=B>>>24&255,d.check=u(d.check,S,4,0));D=B=0;d.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;B+=f[g++]<>8);512&d.flags&&(S[0]=255&B,S[1]=B>>>8&255,d.check=u(d.check,S,2,0));D=B=0;d.mode=5;case 5:if(1024&d.flags){for(;16>D;){if(0===m)break a;m--; -B+=f[g++]<>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(K=d.length,K>m&&(K=m),K&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,K,P)),512&d.flags&&(d.check=u(d.check,f,K,g)),m-=K,g+=K,d.length-=K),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;K=0;do P=f[g+ -K++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&Kd.length&&(d.head.comment+=String.fromCharCode(P));while(P&&KD;){if(0===m)break a;m--; +B+=f[g++]<>>8&255,d.check=u(d.check,S,2,0));D=B=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(E=d.length,E>m&&(E=m),E&&(d.head&&(O=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,g,E,O)),512&d.flags&&(d.check=u(d.check,f,E,g)),m-=E,g+=E,d.length-=E),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===m)break a;E=0;do O=f[g+ +E++],d.head&&O&&65536>d.length&&(d.head.name+=String.fromCharCode(O));while(O&&Ed.length&&(d.head.comment+=String.fromCharCode(O));while(O&&ED;){if(0===m)break a;m--; B+=f[g++]<>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>D;){if(0===m)break a;m--;B+=f[g++]<>>=7&D;D-=7&D;d.mode=27;break}for(;3>D;){if(0=== -m)break a;m--;B+=f[g++]<>>=1,--D,3&B){case 0:d.mode=14;break;case 1:O=d;if(E){p=new r.Buf32(512);q=new r.Buf32(32);for(M=0;144>M;)O.lens[M++]=8;for(;256>M;)O.lens[M++]=9;for(;280>M;)O.lens[M++]=7;for(;288>M;)O.lens[M++]=8;x(1,O.lens,0,288,p,0,O.work,{bits:9});for(M=0;32>M;)O.lens[M++]=5;x(2,O.lens,0,32,q,0,O.work,{bits:5});E=!1}O.lencode=p;O.lenbits=9;O.distcode=q;O.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type", -d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(K=d.length){if(K>m&&(K=m),K>C&&(K=C),0===K)break a;r.arraySet(k,f,g,K,l);m-=K;g+=K;C-=K;l+=K;d.length-=K;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<>>=5,D-=5,d.ndist=(31&B)+ +m)break a;m--;B+=f[g++]<>>=1,--D,3&B){case 0:d.mode=14;break;case 1:N=d;if(F){p=new r.Buf32(512);q=new r.Buf32(32);for(L=0;144>L;)N.lens[L++]=8;for(;256>L;)N.lens[L++]=9;for(;280>L;)N.lens[L++]=7;for(;288>L;)N.lens[L++]=8;x(1,N.lens,0,288,p,0,N.work,{bits:9});for(L=0;32>L;)N.lens[L++]=5;x(2,N.lens,0,32,q,0,N.work,{bits:5});F=!1}N.lencode=p;N.lenbits=9;N.distcode=q;N.distbits=5;if(d.mode=20,6===c){B>>>=2;D-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type", +d.mode=30}B>>>=2;D-=2;break;case 14:B>>>=7&D;for(D-=7&D;32>D;){if(0===m)break a;m--;B+=f[g++]<>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&B,B=0,D=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(E=d.length){if(E>m&&(E=m),E>C&&(E=C),0===E)break a;r.arraySet(k,f,g,E,l);m-=E;g+=E;C-=E;l+=E;d.length-=E;break}d.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;B+=f[g++]<>>=5,D-=5,d.ndist=(31&B)+ 1,B>>>=5,D-=5,d.ncode=(15&B)+4,B>>>=4,D-=4,286D;){if(0===m)break a;m--;B+=f[g++]<>>=3;D-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Z={bits:d.lenbits},Y=x(0,d.lens,0,19,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have< -d.nlen+d.ndist;){for(;Q=d.lencode[B&(1<>>24,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<O)B>>>=L,D-=L,d.lens[d.have++]=O;else{if(16===O){for(M=L+2;D>>=L,D-=L,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];K=3+(3&B);B>>>=2;D-=2}else if(17===O){for(M=L+3;D>>=L;D-=L;P=0;K=3+(7&B);B>>>=3;D-=3}else{for(M=L+7;D>>=L;D-=L;P=0;K=11+(127&B);B>>>=7;D-=7}if(d.have+K>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;K--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist, -d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,F);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;Q=d.lencode[B&(1<>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,d.length=O,0===M){d.mode=26;break}if(32&M){d.back=-1;d.mode=12;break}if(64&M){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&M;d.mode=22;case 22:if(d.extra){for(M=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode= -23;case 23:for(;Q=d.distcode[B&(1<>>24,M=Q>>>16&255,O=65535&Q,!(L<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],L=Q>>>24,M=Q>>>16&255,O=65535&Q,!(T+L<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=L,D-=L,d.back+=L,64&M){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&M;d.mode=24;case 24:if(d.extra){for(M=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(K=F-C,d.offset>K){if(K=d.offset-K,K>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}K>d.wnext?(K-=d.wnext,H=d.wsize-K):H=d.wnext-K;K>d.length&&(K=d.length);M=d.window}else M=k,H=l-d.offset,K=d.length;K>C&&(K=C);C-=K;d.length-=K;do k[l++]=M[H++];while(--K);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a; -k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<D;){if(0===m)break a;m--;B+=f[g++]<d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,F-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,F-=b.avail_out,b.total_in+=W,b.total_out+=F,d.total+=F,d.wrap&&F&&(b.adler=d.check=d.flags?u(d.check,k,F,b.next_out-F):t(d.check,k,F,b.next_out-F)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===F||4=== +d.nlen+d.ndist;){for(;P=d.lencode[B&(1<>>24,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<N)B>>>=K,D-=K,d.lens[d.have++]=N;else{if(16===N){for(L=K+2;D>>=K,D-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}O=d.lens[d.have-1];E=3+(3&B);B>>>=2;D-=2}else if(17===N){for(L=K+3;D>>=K;D-=K;O=0;E=3+(7&B);B>>>=3;D-=3}else{for(L=K+7;D>>=K;D-=K;O=0;E=11+(127&B);B>>>=7;D-=7}if(d.have+E>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;E--;)d.lens[d.have++]=O}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Z={bits:d.lenbits},Y=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,Z),d.lenbits=Z.bits,Y){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,Z={bits:d.distbits},Y=x(2,d.lens,d.nlen,d.ndist, +d.distcode,0,d.work,Z),d.distbits=Z.bits,Y){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=C){b.next_out=l;b.avail_out=C;b.next_in=g;b.avail_in=m;d.hold=B;d.bits=D;y(b,Q);l=b.next_out;k=b.output;C=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;B=d.hold;D=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;P=d.lencode[B&(1<>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,d.length=N,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}d.was=d.length;d.mode= +23;case 23:for(;P=d.distcode[B&(1<>>24,L=P>>>16&255,N=65535&P,!(K<=D);){if(0===m)break a;m--;B+=f[g++]<>T)],K=P>>>24,L=P>>>16&255,N=65535&P,!(T+K<=D);){if(0===m)break a;m--;B+=f[g++]<>>=T;D-=T;d.back+=T}if(B>>>=K,D-=K,d.back+=K,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=N;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=d.extra;D>>=d.extra;D-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(E=Q-C,d.offset>E){if(E=d.offset-E,E>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}E>d.wnext?(E-=d.wnext,H=d.wsize-E):H=d.wnext-E;E>d.length&&(E=d.length);L=d.window}else L=k,H=l-d.offset,E=d.length;E>C&&(E=C);C-=E;d.length-=E;do k[l++]=L[H++];while(--E);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a; +k[l++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>D;){if(0===m)break a;m--;B|=f[g++]<D;){if(0===m)break a;m--;B+=f[g++]<d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,Q-b.avail_out)?(d.mode=31,-4):(W-=b.avail_in,Q-=b.avail_out,b.total_in+=W,b.total_out+=Q,d.total+=Q,d.wrap&&Q&&(b.adler=d.check=d.flags?u(d.check,k,Q,b.next_out-Q):t(d.check,k,Q,b.next_out-Q)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===W&&0===Q||4=== c)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return A;var c=b.state;return c.window&&(c.window=null),b.state=null,z};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?A:(d.head=c,c.done=!1,z)):A};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?A:11===d.mode&&(e=1,e=t(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,z)):A};d.inflateInfo="pako inflate (from Nodeca project)"}, {"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24, -25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,q,r,t,u,y){var m,n,p,v,F,H,E,C,B=y.bits,G,I,N,J,U,R,V=0,X,D=null,W=0,aa=new e.Buf16(16);v=new e.Buf16(16);var K=null,da=0;for(G=0;15>=G;G++)aa[G]=0;for(I=0;IN&&(J=N),0===N)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B=G;G++)if(m<<=1,m-=aa[G],0>m)return-1;if(0G;G++)v[G+1]=v[G]+ -aa[G];for(I=0;IF?(E=K[da+u[I]],C=D[W+u[I]]):(E=96,C=0);m=1<>R)+n]=H<<24|E<<16|C|0;while(0!==n);for(m=1<>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--aa[G]){if(G===N)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R; -for(m=1<=m));)U++,m<<=1;if(V+=1<=G;G++)Q[G]=0;for(I=0;IM&&(J=M),0===M)return r[t++]=20971520,r[t++]=20971520,y.bits=1,0;for(B=1;B=G;G++)if(m<<=1,m-=Q[G],0>m)return-1;if(0G;G++)v[G+1]=v[G]+Q[G]; +for(I=0;IE?(F=ca[da+u[I]],C=D[W+u[I]]):(F=96,C=0);m=1<>R)+n]=H<<24|F<<16|C|0;while(0!==n);for(m=1<>=1;if(0!==m?(X&=m-1,X+=m):X=0,I++,0===--Q[G]){if(G===M)break;G=c[d+u[I]]}if(G>J&&(X&q)!==p){0===R&&(R=J);v+=B;U=G-R;for(m= +1<=m));)U++,m<<=1;if(V+=1<>>8&255}function l(b,c,d){b.bi_valid>V-d?(b.bi_buf|=c<>V-b.bi_valid,b.bi_valid+=d-V):(b.bi_buf|=c<>>=1,d<<=1;while(0< ---c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;ce?ba[e]:ba[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k],l(b, -e,g)));while(nb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]= +--c);return d>>>1}function p(b,c,d){var e,f=Array(R+1),k=0;for(e=1;e<=R;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function q(b){var c;for(c=0;ce?aa[e]:aa[256+(e>>>7)],m(b,k,d),g=da[k],0!==g&&(e-=Y[k], +l(b,e,g)));while(nb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)u(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,k,1),e=b.heap[1],b.heap[--b.heap_max]= d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,u(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,g=c.dyn_tree,l=c.max_code,r=c.stat_desc.static_tree,t=c.stat_desc.has_stree,D=c.stat_desc.extra_bits,y=c.stat_desc.extra_base,x=c.stat_desc.max_length,B=0;for(e=0;e<=R;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;dx&&(e=x,B++),g[2* f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=y&&(n=D[f-y]),q=g[2*f],b.opt_len+=q*(e+n),t&&(b.static_len+=q*(r[2*f+1]+n)));if(0!==B){do{for(e=x-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[x]--;B-=2}while(0l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function z(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,g=c[2*(e+1)+1],++l=l?b.bl_tree[2*W]++:b.bl_tree[2*aa]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,aa,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138, -q=3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;ce;e++)for(P[e]=d,c=0;c<1<e;e++)for(Y[e]= -d,c=0;c<1<>=7;e=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,I+1,k);for(c=0;c>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)F(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,O,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+ -1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ca[d]+G+1)]++,b.dyn_dtree[2*(256>c?ba[c]:ba[256+(c>>>7)])]++),b.last_lit=== -b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign; +f===g||(l=l?b.bl_tree[2*W]++:b.bl_tree[2*Q]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function A(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,q=4;0===g&&(p=138,q=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,Q,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,q= +3):f===g?(p=6,q=3):(p=7,q=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return F;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;ce;e++)for(O[e]=d,c=0;c<1<e;e++)for(Y[e]= +d,c=0;c<1<>=7;e=c;)N[2*c+1]=8,c++,k[8]++;for(;255>=c;)N[2*c+1]=9,c++,k[9]++;for(;279>=c;)N[2*c+1]=7,c++,k[7]++;for(;287>=c;)N[2*c+1]=8,c++,k[8]++;p(N,I+1,k);for(c=0;c>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),y(b,N,T);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+ +1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ba[d]+G+1)]++,b.dyn_dtree[2*(256>c?aa[c]:aa[256+(c>>>7)])]++),b.last_lit=== +b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,X,N);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign; var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export"; window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources"; window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); @@ -527,9 +527,9 @@ mxConstants.ALIGN_CENTER?l-=c/2:e==mxConstants.ALIGN_RIGHT&&(l-=c);a+=l;f==mxCon n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}}; mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){p=null!=p?p:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==l){var t="vertical-align:top;";n?t+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?t+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(t+="width:"+Math.round(c+1)+"px;",0r.alpha&&u.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");t=this.createDiv(e,f,g,t,m);if(null!=t){null!=q&&t.setAttribute("dir",q);u.appendChild(y);this.root.appendChild(u);var x,z;q=x=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!= -document?(t.style.visibility="hidden",document.body.appendChild(t)):y.appendChild(t);var A=t;null!=A.firstChild&&"DIV"==A.firstChild.nodeName&&(A=A.firstChild,k&&"break-word"==t.style.wordWrap&&(A.style.width="100%"));v=A.offsetWidth;0==v&&t.parentNode==y&&(t.style.visibility="hidden",document.body.appendChild(t),v=A.offsetWidth);this.cacheOffsetSize&&(u.mxCachedOffsetWidth=v);!n&&k&&0r.alpha&&u.setAttribute("opacity",r.alpha);q=t=0;f==mxConstants.ALIGN_CENTER?t-=c/2:f==mxConstants.ALIGN_RIGHT&&(t-=c);a+=t;g==mxConstants.ALIGN_MIDDLE?q-=d/2:g==mxConstants.ALIGN_BOTTOM&& (q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);b+=q;A=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(A+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=p&&(A+="rotate("+p+","+-t+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+A);y.setAttribute("width", Math.round(Math.max(1,c)));y.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(y,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}}; @@ -577,9 +577,9 @@ mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){k=this.sta g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=Math.PI/180*p,e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)}; function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2}; mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a}; -mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-E)>1,++e[l];return c}; mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;fn&&(n=l);k[n]=m}for(var p=null,q=null,r,t,u=null,y=null,x,z=null,l=0;lu[H]&&v++,r[A]y[H]&&v++,t[A]u[H]&&v++,r[A]y[H]&&v++,t[A]'):("CSS1Compat"===document.compatMode&&k.writeln(""),k.writeln(""));k.writeln("");this.writeHead(k,a);k.writeln("");k.writeln('')}var m=this.graph.getGraphBounds().clone(),n=this.graph.getView().getScale(),p=n/this.scale,q=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=q.x*this.scale,this.y0-= q.y*this.scale,m.width+=m.x,m.height+=m.y,m.x=0,this.border=m.y=0);var r=this.pageFormat.width-2*this.border,t=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;m.width/=p;m.height/=p;var u=Math.max(1,Math.ceil((m.width+this.x0)/r)),y=Math.max(1,Math.ceil((m.height+this.y0)/t));this.pageCount=u*y;var x=mxUtils.bind(this,function(){if(this.pageSelector&&(1");a.writeln("");a.close();mxEvent.release(a.body)}}; mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln(""+this.title+"");mxClient.IS_VML&&a.writeln('');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('")};mxPrintPreview.prototype.writePostfix=function(a){}; @@ -1153,17 +1153,17 @@ b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&& d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))}, SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,F=null!=u&&x.y>=u.y&&x.y<=u.y+ -u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&F,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(F||u)){m=F?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.yb.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.xb.x+b.width))&&f(new mxPoint(n.x, +Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)r;r++){var A=null!=y&&y.x==x.x,v=null!=y&&y.y==x.y,E=null!=u&&x.y>=u.y&&x.y<=u.y+ +u.height,u=null!=u&&x.x>=u.x&&x.x<=u.x+u.width,x=v||null==y&&E,z=A||null==y&&u;if(0!=r||!(x&&z||A&&v)){if(null!=y&&!v&&!A&&(E||u)){m=E?!1:!0;break}if(z||x){m=x;1==r&&(m=0==d.length%2?x:z);break}}u=c;y=g[q];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),u=null);x=d[d.length-1];A&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.yb.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.xb.x+b.width))&&f(new mxPoint(n.x, p.y));m?p.y=n.y:p.x=n.x;for(r=0;rc.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.xc.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1< e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[q]&&null!=c)for(;1v;v++)mxEdgeStyle.limits[v][1]= -n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);F=z-p;z=0;0>v?z=0>F?2:1:0>=F&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST), +n[v][0]-z[v],mxEdgeStyle.limits[v][2]=n[v][1]-z[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+z[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+z[v];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=z-p;z=0;0>v?z=0>E?2:1:0>=E&&(z=3,0==v&&(z=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST), b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-A,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-A,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-A,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-A,0);A=[]; c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),A[v]=q[v][0]&d[v],A[v]|=(q[v][1]&d[v])<<8,A[v]|=(q[1-v][v]&d[v])<<16,A[v]|=(q[1-v][1-v]&d[v])<<24,0==(A[v]&15)&&(A[v]<<=8),0==(A[v]&3840)&&(A[v]=A[v]&15|A[v]>>8),0==(A[v]& @@ -2010,9 +2010,9 @@ a.getAttribute("fold");this.chromeless&&this.graph.foldingEnabled&&(this.graph.f this.graph.pageBreaksVisible;var b=a.getAttribute("pageWidth"),c=a.getAttribute("pageHeight");null!=b&&null!=c&&(this.graph.pageFormat=new mxRectangle(0,0,parseFloat(b),parseFloat(c)));a=a.getAttribute("background");this.graph.background=null!=a&&0mxUtils.indexOf(z,r))&&d.setCellStyles(r,C,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){H(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){H(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a, b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, +mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=r&&(q=mxUtils.getBoundingBox(q,r));(k.isEdge(p)||k.isVertex(p))&&q.x>=a&&q.y+q.height<=l&&q.y>=b&&q.x+q.width<=g&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, "locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();H=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell"); null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=H?this.addSelectionCells(H):1"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(a.style, -mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle= -k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight= -"normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a= -this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width; -this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html", -"0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"
").replace(/\n/g,"
"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}};var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue= -function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(b||"")&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)|| -this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint= -function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint= -function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0"):g,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)== +mxConstants.FONT_BOLD,k=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight= +f?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));g=this.graph.sanitizeHtml(b?g.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):g,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+ +"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=g&&(this.textarea.innerHTML=g);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()};var l=mxCellEditor.prototype.resize; +mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN, +mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"
").replace(/\n/g,"
"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var m=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();m.apply(this,arguments);try{this.graph.container.focus()}catch(W){}}; +var n=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(n.apply(this,arguments),this.graph.isCellDeletable(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==mxUtils.trim(b||"")&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor= +function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&& +(e=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top= +this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE; this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= -function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return v.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell), -d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell); +function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return v.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell), +d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell); (this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0"); b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())}; @@ -2708,26 +2708,26 @@ d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=pars function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value", "url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"), l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var A=document.createElement("input"); -A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value="100%";e.appendChild(A);var v=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}), null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})}; EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;eb;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13, 10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,l);do{var m=g(a);if("IDAT"==f(a,4)){e=a.substring(0,l-8);m=4294967295;m=this.updateCRC(m,b,0,4);m=this.updateCRC(m,d,0,d.length);e+=k(c.length+d.length+1+("zTXt"==b?1:0))+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+k(m^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+m);d=f(a,m);f(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e, !0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0=a.getStatus()&&q(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=l.xml&&0mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(x.getDefaultParent());ca()},!0,z);z=null}else if("horizontaltree"==E||"verticaltree"== -E||"auto"==E&&da.length==2*c.length-1&&1==K.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==E);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ba=new mxParallelEdgeLayout(x);ba.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ca()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}}; +null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0mxUtils.indexOf(c,a)};this.executeLayout(function(){O.execute(x.getDefaultParent());ba()},!0,z);z=null}else if("horizontaltree"==F||"verticaltree"== +F||"auto"==F&&da.length==2*c.length-1&&1==ca.length){x.view.validate();var Z=new mxCompactTreeLayout(x,"horizontaltree"==F);Z.levelDistance=u;Z.edgeRouting=!1;this.executeLayout(function(){Z.execute(x.getDefaultParent(),0c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*u;S.resetEdges=!1;var ga=S.isVertexIgnored;S.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(x);aa.spacing=k;this.executeLayout(function(){S.execute(x.getDefaultParent());ba()},!0,z);z=null}this.hideDialog()}finally{x.model.endUpdate()}null!=z&&z()}}catch(ea){this.handleError(ea)}}; EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width- 2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&& @@ -2920,9 +2920,9 @@ Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this, p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=v.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document); p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){v.style.display=1