code
stringlengths
31
2.05k
label_name
stringclasses
5 values
label
int64
0
4
save: function (callback) { if (this.loading) { return; } this.loading = true; this.$spinner.removeClass('hidden'); var formData = Garnish.getPostData(this.$form), data = $.extend({enabled: 1}, formData, this.params); Craft.postActionRequest( 'entries/save-entry', data, (response, textStatus) => { this.loading = false; this.$spinner.addClass('hidden'); if (this.$errorList) { this.$errorList.children().remove(); } if (textStatus === 'success') { if (response.success) { Craft.cp.displayNotice(Craft.t('app', 'Entry saved.')); callback(response); } else { Craft.cp.displayError(Craft.t('app', 'Couldn’t save entry.')); if (response.errors) { if (!this.$errorList) { this.$errorList = $('<ul class="errors"/>').insertAfter( this.$form ); } for (var attribute in response.errors) { if (!response.errors.hasOwnProperty(attribute)) { continue; } for (var i = 0; i < response.errors[attribute].length; i++) { var error = response.errors[attribute][i]; $('<li>' + error + '</li>').appendTo(this.$errorList); } } } } } } ); },
Base
1
options: this.elementIndex.getSortOptions(this.$source).map((o) => { return { label: o.label, value: o.attr, }; }), })
Base
1
options: this.elementIndex.getSortOptions(this.$source).map((o) => { return { label: o.label, value: o.attr, }; }),
Base
1
options: this.sourceData.sortOptions.map((o) => { return { label: o.label, value: o.attr, }; }),
Base
1
options: this.sourceData.sortOptions.map((o) => { return { label: o.label, value: o.attr, }; }), value: this.sourceData.defaultSort[0], })
Base
1
function renderRestrictedPipeline(node) { var gui = ''; gui += '<h3 title="' + node.name + '" class="restricted">' + node.name + '</h3>'; if (node.message) { gui += '<div class="message restricted"><span>' + node.message + '</span></div>'; } gui += '<div class="actions restricted">'; gui += '<button class="pin" title="Keep dependencies highlighted" /></div>'; return gui; }
Base
1
function renderWarning(node) { var gui = ''; if (node.message) { gui += '<div class="warning"><span>' + node.message + '</span></div>'; } return gui; }
Base
1
function renderDeletedPipeline(node) { var gui = ''; gui += '<h3 title="' + node.name + '" class="deleted">' + node.name + '</h3>'; if (node.message) { gui += '<div class="message deleted"><span>' + node.message + '</span></div>'; } gui += '<div class="actions deleted"><button class="pin" title="Keep dependencies highlighted" /></div>'; return gui; }
Base
1
function renderScmInstance(instance) { return '<li class="instance">' + '<div title="' + instance.revision + '" class="revision"><span>Revision: </span>' + '<a href="' + instance.locator + '">' + instance.revision + '</a>' + ' </div>' + '<div class="usercomment wraptext">' + parseComment(instance.comment) + '</div>' + '<div class="author">' + '<p>' + _.escape(instance.user) + ' </p>' + '<p>' + instance.modified_time + '</p>' + '</div>' + '</li>'; }
Base
1
function parseComment(comment) { if (/"TYPE":"PACKAGE_MATERIAL"/.test(comment)) { var comment_markup = ""; var comment_map = JSON.parse(comment); var package_comment = comment_map['COMMENT']; var trackback_url = comment_map['TRACKBACK_URL']; if (typeof package_comment !== "undefined" || package_comment != null) { comment_markup = package_comment + "<br/>"; } if (typeof trackback_url !== "undefined" || trackback_url != null) { return comment_markup + "Trackback: " + "<a href=" + trackback_url + ">" + trackback_url + "</a>"; } return comment_markup + "Trackback: " + "Not Provided"; } return _.escape(comment); }
Base
1
function parseCommentForTooltip(comment) { if (/"TYPE":"PACKAGE_MATERIAL"/.test(comment)) { var comment_tooltip = ""; var comment_map = JSON.parse(comment); var package_comment = comment_map['COMMENT']; var trackback_url = comment_map['TRACKBACK_URL']; if (typeof package_comment !== "undefined" || package_comment != null) { comment_tooltip = package_comment + "\n"; } if (typeof trackback_url !== "undefined" || trackback_url != null) { return comment_tooltip + "Trackback: " + trackback_url; } return comment_tooltip + "Trackback: " + "Not Provided"; } return _.escape(comment); }
Base
1
export function is_content_type(request, ...types) { const type = request.headers.get('content-type')?.split(';', 1)[0].trim() ?? ''; return types.includes(type); }
Compound
4
const newWrapped = (error, sst) => { if (localArrayIsArray(sst)) { for (let i=0; i < sst.length; i++) { const cs = sst[i]; if (typeof cs === 'object' && localReflectGetPrototypeOf(cs) === OriginalCallSite.prototype) { sst[i] = new CallSite(cs); } } } return value(error, sst); };
Class
2
set(value) { if (typeof(value) !== 'function') { currentPrepareStackTrace = value; return; } const wrapped = localReflectApply(localWeakMapGet, wrappedPrepareStackTrace, [value]); if (wrapped) { currentPrepareStackTrace = wrapped; return; } const newWrapped = (error, sst) => { if (localArrayIsArray(sst)) { for (let i=0; i < sst.length; i++) { const cs = sst[i]; if (typeof cs === 'object' && localReflectGetPrototypeOf(cs) === OriginalCallSite.prototype) { sst[i] = new CallSite(cs); } } } return value(error, sst); }; localReflectApply(localWeakMapSet, wrappedPrepareStackTrace, [value, newWrapped]); localReflectApply(localWeakMapSet, wrappedPrepareStackTrace, [newWrapped, newWrapped]); currentPrepareStackTrace = newWrapped; }
Class
2
process: function(image, options, callback) { if (typeof options === 'function') { callback = options; options = null; } const shellMetaChar = /\$\(.+\)/; if (shellMetaChar.test(image)) { callback(Error('Invalid image path')); return; } var defaultOptions = utils.merge({}, Tesseract.options); options = utils.merge(defaultOptions, options); // generate output file name var output = path.resolve(tmpdir, 'node-tesseract-' + uuid.v4()); // add the tmp file to the list Tesseract.tmpFiles.push(output); // assemble tesseract command var command = [options.binary, image, output]; if (options.l !== null) { command.push('-l ' + options.l); } if (options.psm !== null) { command.push('--psm ' + options.psm); } if (options.config !== null) { command.push(options.config); } command = command.join(' '); var opts = options.env || {}; // Run the tesseract command exec(command, opts, function(err, stdout, stderr) { if (err) { // Something went wrong executing the assembled command callback(err, null); return; } let extra = {}; const regex = /OSD:[\s\w\d\(\),.]+: ([\d]+)/; if (regex.test(stderr)) { let match = regex.exec(stderr); let orientation = parseInt(match[1]); extra.orientation = orientation; } // Find one of the three possible extension glob(output + '.+(html|hocr|txt)', function(err, files){ if (err) { callback(err, null); return; } fs.readFile(files[0], Tesseract.outputEncoding, function(err, data) { if (err) { callback(err, null); return; } var index = Tesseract.tmpFiles.indexOf(output); if (~index) Tesseract.tmpFiles.splice(index, 1); fs.unlinkSync(files[0]); callback(null, data, extra); }); }) }); // end exec }
Class
2
Menus.prototype.addMenuItem=function(a,c,f,e,g,d){var k=this.editorUi.actions.get(c);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(c=a.addItem(d||k.label,null,function(n){k.funct(e,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(c,Editor.checkmarkImage),this.addShortcut(c,k),c):null};
Class
2
Sidebar.prototype.createEdgeTemplate=function(a,c,f,e,g,d,k,n){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,c,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,f,g,d,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,f,e,g,d,k,n){return this.createItem(a,e,g,null!=n?n:!0,c,f,d,k)};
Class
2
EditorUi.prototype.setScrollbars=function(a){var c=this.editor.graph,f=c.container.style.overflow;c.scrollbars=a;this.editor.updateGraphComponents();f!=c.container.style.overflow&&(c.container.scrollTop=0,c.container.scrollLeft=0,c.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
Class
2
Sidebar.prototype.createDragSource=function(a,c,f,e,g){function d(Z,oa){var va=mxUtils.createImage(Z.src);va.style.width=Z.width+"px";va.style.height=Z.height+"px";null!=oa&&va.setAttribute("title",oa);mxUtils.setOpacity(va,Z==this.refreshTarget?30:20);va.style.position="absolute";va.style.cursor="crosshair";return va}function k(Z,oa,va,Ja){null!=Ja.parentNode&&(mxUtils.contains(va,Z,oa)?(mxUtils.setOpacity(Ja,100),L=Ja):mxUtils.setOpacity(Ja,Ja==fa?30:20));return va}for(var n=this.editorUi,u=n.editor.graph,
Class
2
1<c.vertices.length);this.menus.get("align").setEnabled(c.unlocked&&0<c.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
Class
2
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){var f=this.graph.model.getParent(a);if(!this.graph.isCellCollapsed(a)&&(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,c))){a=this.graph.getCellStyle(a);if("stackLayout"==a.childLayout)return c=new mxStackLayout(this.graph,!0),c.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax",
Class
2
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){c=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=c.getAttribute("label_"+Graph.diagramLanguage)), null==f&&(f=c.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Class
2
Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(c.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],e={},g=0;g<a.length;g++){null==e[a[g]]&&(e[a[g]]=!0,f.push(a[g]));var d=a[g].replace(/\.*\d*$/,"");d!=a[g]&&null==e[d]&&(e[d]=!0,f.push(d))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],c)}return c};
Class
2
EditorUi.prototype.executeLayout=function(a,c,f){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(e.getModel().endUpdate(),null!=f&&f())}}};
Class
2
function(t){var z=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*z+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,z){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(z.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t?c(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||
Class
2
mxShape);Ga.prototype.paintBackground=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(0,0);b.quadTo(l,0,l,p/2);b.quadTo(l,p,0,p);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(b,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(h,q);b.ellipse(0,v,l-2*v,p-2*v);b.fillAndStroke();b.begin();b.moveTo(l/2,0);b.quadTo(l,0,l,p/2);b.quadTo(l, p,l/2,p);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(b,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var J=Math.min(h,p-h),y=Math.min(J+2*h,p-h);v?(b.moveTo(q,J),b.lineTo(w,J),b.lineTo(w,J+h),b.lineTo(q,J+h),b.moveTo(q,
Class
2
q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(l-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(l-y,J+y):b.moveTo(l,y)};Fa.prototype.lineNEInner=function(b,h,q,l,p,v,w,J,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?b.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.lineTo(l-y,J+.5*y): ("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.lineTo(l-y,J+y):b.lineTo(l,y)};Fa.prototype.moveNWInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&N?b.moveTo(y,0):Y&&!N?b.moveTo(0,y):"square"==w||"default"==w&&"square"==v?b.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?b.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&b.moveTo(y,J+y):b.moveTo(0,0)};Fa.prototype.lineNWInner=
Class
2
0),!1,null,0,.5*(q+l)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};e.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0, 0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));b.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,q));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q-.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));return b};A.prototype.getConstraints=function(b,h,q){b=[];h=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,
Class
2
Sidebar.prototype.insertSearchHint=function(a,c,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[c])),a.appendChild(f))};
Class
2
StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi,f=c.editor.graph,e=c.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft= "8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){e=c.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, 0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};
Class
2
EditorUi.prototype.showError=function(a,c,f,e,g,d,k,n,u,m,r,x,A){a=new ErrorDialog(this,a,c,f||mxResources.get("ok"),e,g,d,k,x,n,u);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,m||340,r||100+20*c,!0,!1,A);a.init()};EditorUi.prototype.showDialog=function(a,c,f,e,g,d,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,f,e,g,d,k,n,u,m);this.dialogs.push(this.dialog)};
Class
2
Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,c,f,e,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,c,f,e)}))};
Class
2
Sidebar.prototype.removePalette=function(a){var c=this.palettes[a];if(null!=c){this.palettes[a]=null;for(a=0;a<c.length;a++)this.container.removeChild(c[a]);return!0}return!1};
Class
2
Graph.prototype.decompress=function(a,c){return Graph.decompress(a,c)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
Class
2
d));a=this.model.getParent(a);c=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var c=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(a){var c=this.getCurrentCellStyle(a);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Class
2
y.push(function(A){k(null,A||"Unkown Error")}),this[l].apply(this,y);else{var z=this[l].apply(this,y);k([z])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(A){k(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"}); 2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=g&&g(x)}};l.onsuccess=mxUtils.bind(this,function(p){var q=l.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(x){if(!x||
Class
2
(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(a,c,f,e){f=null!=f?f:30;e=null!=e?e:30;var g=null,d=0,k=mxUtils.bind(this,function(){if(d==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=c&&c()}else for(n=0;n<a.length;n++)a[n].execute(d,f);d++});g=window.setInterval(k,e);k()};
Class
2
DiagramFormatPanel.prototype.addGridOption=function(a){function c(u){var m=f.isFloatUnit()?parseFloat(d.value):parseInt(d.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));d.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,e=this.editorUi,g=e.editor.graph,d=document.createElement("input");d.style.position="absolute";d.style.textAlign="right";d.style.width="48px";d.style.marginTop="-2px";d.style.height= "21px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";d.style.boxSizing="border-box";d.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(d,c,this.getUnitStep(),null,null,null,this.isFloatUnit());d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;mxEvent.addListener(d,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(d.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))}); mxEvent.addListener(d,"blur",c);mxEvent.addListener(d,"change",c);d.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),e.setGridColor(u));d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(), e.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});n.appendChild(d);n.appendChild(k);a.appendChild(n)};
Class
2
"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);b.end()};mxCellRenderer.registerShape("corner",cb);mxUtils.extend(jb,mxActor);jb.prototype.redrawPath=function(b,h,q, l,p){b.moveTo(0,0);b.lineTo(0,p);b.end();b.moveTo(l,0);b.lineTo(l,p);b.end();b.moveTo(0,p/2);b.lineTo(l,p/2);b.end()};mxCellRenderer.registerShape("crossbar",jb);mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(b,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,
Class
2
this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,c,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(c,f,null,e);this.setCurrentMenu(g)};
Class
2
e)};Graph.prototype.sanitizeHtml=function(a,c){return Graph.sanitizeHtml(a,c)};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var f=this.model.cells[c];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Class
2
EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,z,A,K,P,L,u,D,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
Class
2
function ja(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Fa(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
Class
2
FilenameDialog.createFileTypes=function(a,c,f){var e=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");e.appendChild(g)}mxEvent.addListener(e,"change",function(d){d=f[e.value].extension;var k=c.value.lastIndexOf(".drawio.");k=0<k?k:c.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);c.value=0<k?c.value.substring(0,k+1)+d:c.value+"."+d;"createEvent"in document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),c.dispatchEvent(d)):c.fireEvent("onchange")});a=function(d){d=c.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(d.substring(d.length-u.length-1)=="."+u||null!=m&&d.substring(d.length-m.length-1)=="."+m){k=n;break}}e.value=k};mxEvent.addListener(c,"change",a);mxEvent.addListener(c,"keyup",a);a();return e};
Class
2
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var c=a.getSelectionCells(),f=new mxDictionary,e=[],g=0;g<c.length;g++){var d=a.isTableCell(c[g])?a.model.getParent(c[g]):c[g];null==d||f.get(d)||(f.put(d,!0),e.push(d))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
Class
2
"keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var c=a.getElementsByTagName("td");for(i=0;i<c.length;i++)"mxPopupMenuItem"==c[i].getAttribute("class")&&(c[i].style.display="none");return a};
Class
2
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,c){return Graph.compress(a,c)};
Class
2
"keys",[c],"values",[A],"cells",C))}finally{r.getModel().endUpdate()}}},{install:function(A){this.listener=function(){A(mxUtils.getValue(x,c,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})};
Class
2
F()};TextFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
Class
2
EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,f=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?f=a.getData("Text"):(f=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,0<=mxUtils.indexOf(a.types,"text/plain")&&(null==f||0==f.length)&&(f=a.getData("text/plain"))),null!=f&&(f=Graph.zapGremlins(mxUtils.trim(f)),a=this.extractGraphModelFromHtml(f),null!=a&&(f=a))));null!=f&&this.isCompatibleString(f)&& (c=f);return c};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(c){this.save(c)}),null,mxUtils.bind(this,function(c){if(null!=c&&0<c.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
Class
2
mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,c,f){return null};
Class
2
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var A=this.getState(r);null!=A&&x&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=c.apply(this, arguments);null!=A&&x&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style,
Class
2
function Action(a,c,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(c);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Class
2
(c=f);return c};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(c){this.save(c)}),null,mxUtils.bind(this,function(c){if(null!=c&&0<c.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
Class
2
function A(b,h,q,l){mxShape.call(this);this.bounds=b;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function E(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(){mxActor.call(this)}function aa(){mxActor.call(this)}function T(){mxActor.call(this)}function U(b,h){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
Class
2
mxStencilRegistry.getBasenameForStencil=function(a){var c=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){c=a[1];for(var f=2;f<a.length-1;f++)c+="/"+a[f]}return c};
Class
2
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
Class
2
this.position2)))),J=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(b,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+J),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",ba);mxUtils.extend(qa,mxActor);qa.prototype.size=.2;qa.prototype.fixedSize=20;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(b,h, q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("step",
Class
2
!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var l=this.getCurrentFile();null!=l?l.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();
Class
2
!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var l=this.getCurrentFile();null!=l?l.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();
Class
2
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2))- 1;c=a.getGraphBounds();0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{c=a.getGraphBounds();var f=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height, a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{c=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var e=a.view.scale;c.x=c.x/e-f.x;c.y=c.y/e-f.y;c.width/=e;c.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-c.height)/4))-c.y+1))}};
Class
2
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(c,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(c){return"%"+("00"+c.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,c){a=mxUtils.getXml(a);return Graph.compress(c?a:Graph.zapGremlins(a))};
Class
2
Toolbar.prototype.createLabel=function(a,c){c=document.createElement("a");c.className="geLabel";mxUtils.write(c,a);return c};
Class
2
Toolbar.prototype.addMenuFunction=function(a,c,f,e,g,d){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,c,f,e,d)};Toolbar.prototype.addMenuFunctionInContainer=function(a,c,f,e,g,d){c=e?this.createLabel(c):this.createButton(c);this.initElement(c,f);this.addMenuHandler(c,e,g,d);a.appendChild(c);return c};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var c=document.createElement("div");c.className="geSeparator";a.appendChild(c);return c};
Class
2
q.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(x){null==x.target.result?d(q):(q.push(x.target.result.value),x.target.result.continue())};p.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k= k||"objects";var p=l.transaction([k],"readonly").objectStore(k).getAllKeys();p.onsuccess=function(){d(p.result)};p.onerror=g}catch(q){null!=g&&g(q)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():
Class
2
z=this.editor.graph,A=null,K=null,P=null,L=null,u=null,D=null,B=null,C="whiteSpace=wrap;html=1;",G=null,N=null,I="",F="auto",H="auto",R=null,W=null,J=40,V=40,U=100,X=0,t=function(){null!=g?g(ta):(z.setSelectionCells(ta),z.scrollCellToVisible(z.getSelectionCell()))},E=z.getFreeInsertPoint(),M=E.x,T=E.y;E=T;var O=null,Q="auto";N=null;for(var S=[],Y=null,ba=null,ea=0;ea<k.length&&"#"==k[ea].charAt(0);){d=k[ea].replace(/\r$/,"");for(ea++;ea<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ea].charAt(0);)d=
Class
2
(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(b=null==b?h:b.concat(h)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);b=rb[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var kb=new mxPoint(1,0),hb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);kb=mxUtils.getRotatedPoint(kb,
Class
2
ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(b,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(h+l/8,q+p);b.lineTo(h+7*l/8,q+p);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",ka);mxUtils.extend(wa,mxShape);wa.prototype.paintVertexShape=function(b,h,q,l,p){b.translate(h,q);b.begin();b.moveTo(l,0);b.lineTo(0,p);b.moveTo(0,0);b.lineTo(l,p);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",wa);mxUtils.extend(W,
Class
2
EditorUi.parsePng=function(a,c,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=c&&c(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
Class
2
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var c=document.createElement("div");c.style.display="inline-block";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.maxWidth="66px";mxUtils.write(c,a);this.fontMenu.appendChild(c);this.appendDropDownImageHtml(this.fontMenu)}};
Class
2
ArrangePanel.prototype.addAlign=function(a){var c=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var e=document.createElement("div");e.style.position="relative";e.style.whiteSpace="nowrap";e.style.paddingLeft="0px";e.style.paddingBottom="2px";e.style.borderWidth="0px";e.style.width="220px";e.className="geToolbarContainer";if(1<c.vertices.length){c=this.editorUi.toolbar.addButton("geSprite-alignleft", mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},e);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},e),d=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},e),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},e),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle", mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},e),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},e);this.styleButtons([c,g,d,k,n,u]);d.style.marginRight="10px"}a.appendChild(e);this.addActions(a,["snapToGrid"]);return a};
Class
2
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
Class
2
Sidebar.prototype.createThumb=function(a,c,f,e,g,d,k){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((c-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
Class
2
Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var c=!1;null!=a&&(a=this.getCurrentCellStyle(a),c="1"==mxUtils.getValue(a,"ignoreEdge","0"));return c};Graph.prototype.isSplitTarget=function(a,c,f){return!this.model.isEdge(c[0])&&!mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
Class
2
a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
Class
2
getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
Class
2
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,c,f){mxUtils.confirm(a)?null!=c&&c():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
Class
2
mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1, null,h-l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&b.push(new mxConnectionConstraint(new mxPoint(.5, 0),!1));return b};E.prototype.getConstraints=function(b,h,q){b=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));b.push(new mxConnectionConstraint(new mxPoint(0,
Class
2
Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),f=this.defaultMenuItems,e=0;e<f.length;e++)mxUtils.bind(this,function(g){var d=c.addMenu(mxResources.get(f[e]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,d)})(this.get(f[e]));return c};
Class
2
b.width,Math.max(b.x,q.x)),b.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(h.style,"size",ba.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,
Class
2
EditorUi.prototype.showImageDialog=function(a,c,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,c);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
Class
2
Graph.prototype.createWipeAnimations=function(a,c){for(var f=[],e=0;e<a.length;e++){var g=this.view.getState(a[e]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,c)))}return f};
Class
2
ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,f=c.editor.graph,e=c.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var d=null,k=null,n=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),d=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop= "10px");e.containsLabel||(g=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?g=mxResources.get("turn")+" / "+g:0<e.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){c.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=d&&(n.style.marginTop="8px"));if(null!=d){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=d)e=c.getSelectionState(), m=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
Class
2
this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(0,v)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(b, h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h, v),new mxPoint(h,p)],this.isRounded,w,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(h,0);b.lineTo(l,0);b.quadTo(l-2*h,p/2,l,p);b.lineTo(h,p);b.quadTo(h-
Class
2
g[0]||"mxfile"==g[0])&&(c=g[1]));if(null!=c||"IDAT"==d)return!0}))}catch(g){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.isDarkMode=function(a){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
Class
2
n.appendChild(u);d.appendChild(n);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
Class
2
arguments)};mxCellRenderer.registerShape("process",fa);mxCellRenderer.registerShape("process2",fa);mxUtils.extend(ha,mxRectangleShape);ha.prototype.paintBackground=function(b,h,q,l,p){b.setFillColor(mxConstants.NONE);b.rect(h,q,l,p);b.fill()};ha.prototype.paintForeground=function(b,h,q,l,p){};mxCellRenderer.registerShape("transparent",ha);mxUtils.extend(ba,mxHexagon);ba.prototype.size=30;ba.prototype.position=.5;ba.prototype.position2=.5;ba.prototype.base=20;ba.prototype.getLabelMargins=function(){return new mxRectangle(0,
Class
2
Graph.zapGremlins=function(a){for(var c=0,f=[],e=0;e<a.length;e++){var g=a.charCodeAt(e);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(c,e)),c=e+1)}0<c&&c<a.length&&f.push(a.substring(c));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);return c.join("")};
Class
2
q.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(x){null==x.target.result?d(q):(q.push(x.target.result.value),x.target.result.continue())};p.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=
Class
2
v?b.lineTo(J+.5*y,y):b.lineTo(J+y,y):b.lineTo(0,y):b.lineTo(0,0)};Fa.prototype.paintNEInner=function(b,h,q,l,p,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)b.arcTo(J-.5*y,J-.5*y,0,0,0,l-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)b.arcTo(J+y,J+y,0,0,1,l-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)b.lineTo(l-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)b.lineTo(l-J-y,J+y),b.lineTo(l-J-y,y)};Fa.prototype.paintRightInner=function(b,h,q,l,p,v,w,J,y,Y,N){Y||N?!Y&&
Class
2
(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,c){var f=this.editorUi.editor.graph;c=f.toggleCellStyles(a,c);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[c],"cells",f.getSelectionCells()))};
Class
2
var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");c.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(f);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);f=document.createElement("a");f.setAttribute("href", "http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},TextareaDialog=function(a,c,f,e,g,d,k,n,u,m,r,x,A,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
Class
2
this.sidebar.graph.pasteStyle(x,[A]):m.insertHandler([A],""!=A.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([A],25,25,C,null,!0,!1,A.geometry.width,A.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(A);if(null!=e)e(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-A.geometry.width/2);F.geometry.y=r.snap(Math.round(c/r.view.scale)-r.view.translate.y-A.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F); r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=d&&d()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,c-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
Class
2
m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,c,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,c,f,e,g))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
Class
2
Graph.prototype.createEdgeWipeAnimation=function(a,c){var f=a.absolutePoints.slice(),e=a.segments,g=a.length,d=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;c||(n=1-n);for(var m=g*n,r=1;r<d;r++)if(m<=e[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/e[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/e[r-1]));break}else m-=e[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!= a.text.node&&(a.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),c?1:0))})}};
Class
2
"1"!=urlParams.sketch&&B.mode!=App.MODE_ATLAS&&this.addMenuItems(J,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(J,["toggleDarkMode"],V);J.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(J,V){B.menus.addMenuItems(J,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var J=this.get("insert"),V=J.funct;J.funct=function(U, X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(U,["insertTemplate"],X),B.menus.addMenuItems(U,["insertImage","insertLink","-"],X),B.menus.addSubmenu("insertLayout",U,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced"))):(V.apply(this,arguments),B.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(J,V,U,X){J.addItem(U,
Class
2
EditorUi.prototype.showImageDialog=function(a,c,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,c);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,c,f){a=new LinkDialog(this,a,c,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
Class
2
window.addEventListener("message",x)}})));d(q);q.onversionchange=function(){q.close()}});l.onerror=g;l.onblocked=function(){}}catch(p){null!=g&&g(p)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,l,p){this.openDatabase(mxUtils.bind(this,function(q){try{p=p||"objects";Array.isArray(p)||(p=[p],d=[d],g=[g]);var x=q.transaction(p,"readwrite");x.oncomplete=k;x.onerror=l;for(q=0;q<p.length;q++)x.objectStore(p[q]).put(null!=d&&null!=d[q]?{key:d[q],data:g[q]}:g[q])}catch(y){null!= l&&l(y)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);p=p.transaction(l,"readwrite");p.oncomplete=g;p.onerror=k;for(var q=0;q<l.length;q++)p.objectStore(l[q]).delete(d[q])}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){try{l=l||"objects";var q=p.transaction([l],"readonly").objectStore(l).get(d);q.onsuccess=function(){g(q.result)};
Class
2
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var c=document.createElement("div");c.setAttribute("title",a);c.style.textOverflow="ellipsis";c.style.whiteSpace="nowrap";c.style.textAlign="center";c.style.overflow="hidden";c.style.width="100%";c.style.padding="14px 0";mxUtils.write(c,a);return c})};
Class
2
"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, "size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);b.end()};mxCellRenderer.registerShape("parallelogram",Q);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(b,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
Class
2