mcanoglu/cwe-class-group huggingface dataset:
function addAdlist() {
  var address = $("#new_address").val();
  var comment = $("#new_comment").val();

  utils.disableAll();
  utils.showAlert("info", "", "Adding adlist...", address);

  if (address.length === 0) {
    utils.showAlert("warning", "", "Warning", "Please specify an adlist address");
    return;
  }

  $.ajax({
    url: "scripts/pi-hole/php/groups.php",
    method: "post",
    dataType: "json",
    data: {
      action: "add_adlist",
      address: address,
      comment: comment,
      token: token
    },
    success: function (response) {
      utils.enableAll();
      if (response.success) {
        utils.showAlert("success", "fas fa-plus", "Successfully added adlist", address);
        table.ajax.reload(null, false);
        $("#new_address").val("");
        $("#new_comment").val("");
        table.ajax.reload();
      } else {
        utils.showAlert("error", "", "Error while adding new adlist: ", response.message);
      }
    },
    error: function (jqXHR, exception) {
      utils.enableAll();
      utils.showAlert("error", "", "Error while adding new adlist: ", jqXHR.responseText);
      console.log(exception); // eslint-disable-line no-console
    }
  });
}

// Vulnerability class: CWE-862
function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,T,ca,ia,ma,pa,ua,ya,Fa,Ma,Oa,Qa){var Ta=null;if(null!=Qa)for(Ta=new mxDictionary,Fa=0;Fa<Qa.length;Fa++)Ta.put(Qa[Fa],!0);if(Qa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;ma=

// Vulnerability class: CWE-20
object: function (schema) {
			var o = {};
			var prop = schema.properties || {};

			for (var key in prop) {
				if (prop.hasOwnProperty(key)){
					if (prop[key].optional === true && _rand.bool() === true) {
						continue;
					}
					if (key !== '*') {
						o[key] = this.generate(prop[key]);
					}
					else {
						var rk = '__random_key_';
						var randomKey = rk + 0;
						var n = _rand.int(1, 9);
						for (var i = 1; i <= n; i++) {
							if (!(randomKey in prop)) {
								o[randomKey] = this.generate(prop[key]);
							}
							randomKey = rk + i;
						}
					}
				}
			}
			return o;
		},

// Vulnerability class: CWE-668
Q.push(F);A.appendChild(F);var C=function(pa){Aa.style.display="none";ea.style.display="none";Z.style.left="30px";p(pa?-1:1);null==W&&(W=Ma);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,va,ra){H=0;S.stop();Ma=ya;ra=ra||{};var wa=0,fa;for(fa in ra)wa+=ra[fa].length;if(va)Z.innerHTML=va;else if(0==ya.length&&0==wa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<wa){Aa.style.display="";Z.style.left="160px";Aa.innerHTML="";
Oa=0;Da={"draw.io":ya};for(fa in ra)Da[fa]=ra[fa];B()}else M(!0)};pa?q(I.value,sa):m(sa)};m&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){C()}),A.appendChild(F),Q.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(F);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(pa){13==

// Vulnerability class: CWE-20
mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),function(){var D=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(D,G,"text/xml",null,null,!0,null,"xml"):

// Vulnerability class: CWE-20
ca,ca,!1)[0];ia.push(Fa);if(L)T.add(ya,ua[M]);else{var Ma=ya.getIndex(z[M]);T.add(ya,ua[M],Ma+1)}if(this.isTable(ya)){var Oa=this.getCellGeometry(ua[M]),Qa=this.getCellGeometry(ya);null!=Oa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Oa.height,T.setGeometry(ya,Qa))}}else ia.push(ua[M])}this.updateCustomLinks(this.createCellMapping(ma,pa),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ia=0;ia<T.length;ia++)ca.push(T[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=ca[ia-1]){z[ia].setAttribute("width",L);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);

// Vulnerability class: CWE-20
S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Pa){null!=S&&S(Pa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"==

// Vulnerability class: CWE-20
$.fn.hideWidget = function() {
    $(this).each(function() {
        var widget = $(this);

        // slice of the "x2widget_" from the id to get widget name
        var widgetName = $(this).attr('id').slice(9); 

        // console.log ('widgetName = ' + widgetName);
        $.post(yii.scriptUrl+'/site/hideWidget', {name: widgetName}, function(response) {
            widget.slideUp(function() {
                widget.remove();
                if (widgetName === 'RecordViewChart') removeChartWidget ();
                $('#x2-hidden-widgets-menu').replaceWith(response);
        //        $('.x2-widget-menu-item').draggable({revert: 'invalid', helper:'clone', revertDuration:200, appendTo:'#x2-hidden-widgets-menu',iframeFix:true});
                $('.x2-hidden-widgets-menu-item').click(function() {
                    return handleWidgetMenuItemClick($(this));
                });
                $('.x2-hidden-widgets-menu-item.widget-right').click(function() {
                    return handleWidgetRightMenuItemClick($(this));
                });
            });
        });
    });
};

// Vulnerability class: CWE-20
u,E.value=T,E.scale=J,E.redraw())}};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,

// Vulnerability class: CWE-20
c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function B(){k.model.setStyle(v,x+u())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var F=k.createVertexHandler;k.createVertexHandler=function(){var I=F.apply(this,
arguments);I.livePreview=!1;return I};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,N=e.width,J=e.height,E=(300-N)/2,H=(300-J)/2,S=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(S[0]),Q=parseFloat(S[1]),W=parseFloat(S[2]),V=parseFloat(S[3]);isFinite(U)&&isFinite(Q)&&isFinite(W)&&isFinite(V)?(G.x=V/100*N+E,G.y=U/100*J+H,G.width=(100-Q)/100*N+E-G.x,G.height=(100-W)/100*J+H-G.y,"round"==S[4]?"50%"==S[5]?L.setAttribute("checked","checked"):(q=parseInt(S[5]),n.value=q,z.setAttribute("checked",
"checked"),M.style.visibility="visible"):A.setAttribute("checked","checked")):l=null}else l=null}catch(I){}v.style=x+(l?l:u());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,B);k.addListener(mxEvent.CELLS_RESIZED,B);var X=k.graphHandler.mouseUp,p=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){X.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){p.apply(this,arguments);g.style.backgroundColor=""};k.dblClick=
function(){};var C=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){C.call(this,[v],[v])}};e.onerror=function(){e.onload=null;e.src=Editor.errorImage};e.setAttribute("src",f);e.style.maxWidth="300px";e.style.maxHeight="300px";c.appendChild(e);D.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";D.appendChild(g);var k=null,m=new mxGeometry(100,100,100,100),q=

// Vulnerability class: CWE-20
H+K));var S=(G.x-F)/P*100;P=100-(G.x+G.width-F)/P*100;F=(G.y-H)/K*100;G=100-(G.y+G.height-H)/K*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(P)+"% "+mxUtils.format(G)+"% "+mxUtils.format(S)+"%"+(C?" round "+q+"%":D?" round 50%":"")+")"}function n(C){null!=l&&(!0!==C&&(l.model.setGeometry(x,p.clone()),q=5,t.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=B.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");d.style.height="300px";

// Vulnerability class: CWE-20
N||null!=T.pageId&&T.pageId==N){U();for(N=0;N<T.removed.length;N++){var Q=T.removed[N];if(null!=Q){var R=J[Q];delete J[Q];null!=R&&R.destroy()}}for(N=0;N<T.added.length;N++)Q=T.added[N],null!=Q&&(R=l.model.getCell(Q),null!=R&&(J[Q]=l.highlightCell(R,y[u].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",M))}}function d(M,W){if(!K&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:W,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){V("sendSignal",
{to:M,from:z,signal:X})});U.on("error",function(X){delete L[M];EditorUi.debug("P2PCollab: p2p socket error",X);!P&&W&&U.destroyed&&O[M]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",M),d(M,!0))});U.on("connect",function(){delete L[M];null==C[M]||C[M].destroyed?(C[M]=U,O[M]=!0,EditorUi.debug("P2PCollab: p2p socket connected",M)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",M))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
M),k(I[M]),delete C[M])});U.on("data",v);return L[M]=U}}function g(M,W){k(W||I[M]);null!=M&&(delete I[M],O[M]=!1)}function k(M){var W=y[M];if(null!=W){var U=W.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=W.cursor&&null!=W.cursor.parentNode&&W.cursor.parentNode.removeChild(W.cursor);clearTimeout(W.inactiveTO);delete y[M]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),

// Vulnerability class: CWE-20
ia){ja=fa.getAttribute("section");ba=fa.getAttribute("subsection");if(null==ja&&(ma=ia.indexOf("/"),ja=ia.substring(0,ma),null==ba)){var qa=ia.indexOf("/",ma+1);-1<qa&&(ba=ia.substring(ma+1,qa))}ma=ta[ja];null==ma&&(ya++,ma=[],ta[ja]=ma);ia=fa.getAttribute("clibs");null!=ca[ia]&&(ia=ca[ia]);ia={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title")||fa.getAttribute("name"),preview:fa.getAttribute("preview"),clibs:ia,tags:fa.getAttribute("tags")};ma.push(ia);null!=ba&&
(ma=ka[ja],null==ma&&(ma={},ka[ja]=ma),ja=ma[ba],null==ja&&(ja=[],ma[ba]=ja),ja.push(ia))}fa=fa.nextSibling}G(ta,pa,va)}})}function J(fa){D&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),V=!1,W=!0,ua.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,D(ra,function(){A(mxResources.get("cannotLoad"));ra([])},fa?null:t))}function E(fa){if(""==fa)null!=p&&(p.click(),p=null);else{if(null==TemplatesDialog.tagsList[d]){var ca={};for(Ja in ta)for(var ba=ta[Ja],ja=0;ja<ba.length;ja++){var ia=

// Vulnerability class: CWE-20
null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,A){v=mxUtils.button(v,function(z){x(z)});null!=A&&v.setAttribute("title",A);v.className="geBtn";q.appendChild(v)})(k[c][0],k[c][1],k[c][2]);m.appendChild(q);this.cancelBtn=e;this.okButton=u;this.container=m},TemplatesDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x){function A(fa){Ia.innerHTML=mxUtils.htmlEntities(fa);Ia.style.display="block";
setTimeout(function(){Ia.style.display="none"},4E3)}function z(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",p=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";Q.querySelector(".geTempDlgRadioBtn[data-id="+ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ca).src="/images/"+ba+"-sel.svg";Q.querySelector("."+ia).src=

// Vulnerability class: CWE-20
function Inspection(schema, custom) {
		var _stack = ['@'];

		this._schema = schema;
		this._custom = {};
		if (custom != null) {
			for (var key in custom) {
				if (custom.hasOwnProperty(key)){
					this._custom['$' + key] = custom[key];
				}
			}
		}

		this._getDepth = function () {
			return _stack.length;
		};

		this._dumpStack = function () {
			return _stack.map(function (i) {return i.replace(/^\[/g, '\u001b\u001c\u001d\u001e');})
			.join('.').replace(/\.\u001b\u001c\u001d\u001e/g, '[');
		};

		this._deeperObject = function (name) {
			_stack.push((/^[a-z$_][a-z0-9$_]*$/i).test(name) ? name : '["' + name + '"]');
			return this;
		};

		this._deeperArray = function (i) {
			_stack.push('[' + i + ']');
			return this;
		};

		this._back = function () {
			_stack.pop();
			return this;
		};
	}

// Vulnerability class: CWE-668
var A=g.addClickHandler;g.addClickHandler=function(D,G,P){var K=G;G=function(F,H){if(null==H){var S=mxEvent.getSource(F);"a"==S.nodeName.toLowerCase()&&(H=S.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=K&&K(F,H)};A.call(this,D,G,P)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;

// Vulnerability class: CWE-20
function test_malformedHelloMessage(altered_helloMessage, done) {
        const transport = new ServerTCP_transport();

        let initError;
        transport.init(fakeSocket.server, (err) => {
            initError = err;
            debugLog("failed !", err.message);
        });

        transport.on("message", (messageChunk) => {
            // console.log("message ", messageChunk);
            done(new Error("Not expecting an message"));
        });
        transport.on("close", (err) => {
            debugLog("close", err);
            if (initError) {
                initError.message.should.match(/BadConnectionRejected/);
            }
            done();
        });
        fakeSocket.client.write(altered_helloMessage);
    }

// Vulnerability class: CWE-400
null);mxEvent.consume(ca)})))}if(null!=L)for(M=0;M<L.length;M++){var T=document.createElement("div");T.style.marginTop=null!=z||0<M?"6px":"0px";T.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(T)}}}catch(ca){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,

// Vulnerability class: CWE-20
updatedAt: new Date(),
              recentMessage: message.owner.fullname + ': ' + message.body
            })

            var $injector = angular.injector(['ng', 'trudesk'])
            $injector.invoke([
              '$compile',
              '$rootScope',
              function ($compile, $rootScope) {
                var $scope = convoUL.prepend(newLI).scope()
                $compile(convoUL)($scope || $rootScope)
                $rootScope.$digest()
              }
            ])
          }
        }

        UIKit.$html.trigger('changed.uk.dom')
        helpers.scrollToBottom($messageScroller)
      })

// Vulnerability class: CWE-662
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})};

// Vulnerability class: CWE-20
k.isRemoteFileFormat(z,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(z,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,q,v,x,A,z,L,M){z=null!=
z?z:!0;var n=!1,y=null,K=mxUtils.bind(this,function(B){var F=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,v)):F=this.importXml(B,g,k,z,null,null!=M?mxEvent.isControlDown(M):null);null!=x&&x(F)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(y=this.importXml(e,g,k,z,null,null!=M?mxEvent.isControlDown(M):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0,
A)+c.substring(c.indexOf(",",A+1))),z&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),y=[e.insertVertex(null,null,"",g,k,m,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(n=!0,this.importGraphML(c,K)):null!=A&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(n=!0,this.importVisio(A,K)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?

// Vulnerability class: CWE-20
mxCellRenderer.prototype.destroy=function(u){D.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var P=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);

// Vulnerability class: CWE-20
K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var K=[],F=0;F<v.length;F++)null!=v[F]&&K.push([v[F].x,v[F].y]);K=PerfectFreehand.getStroke(K,I);v=[];for(F=0;F<K.length;F++)v.push({x:K[F][0],y:K[F][1]});v.push(null)}K=v[0].x;var H=v[0].x,S=v[0].y,V=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(K=Math.max(K,v[F].x),H=Math.min(H,v[F].x),S=Math.max(S,

// Vulnerability class: CWE-20
"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var K=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,P,this.thumbImageCache)):P(F)});t?this.embedFonts(D,K):(this.editor.addFontCss(D),K(D))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,

// Vulnerability class: CWE-20
H.x+" "+H.y;S="";c=[];for(U=2;U<v.length;U+=2)H=N(U),S+=" L"+H.x+" "+H.y,c.push(H);d.setAttribute("d",t+S)}m&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));E.consume()}}),mouseUp:mxUtils.bind(this,function(J,E){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y(E.getEvent()),E.consume())})});var F=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(v.push(J);v.length>l;)v.shift()},N=

// Vulnerability class: CWE-20
A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Ea.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Ea.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Ea.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,$a,ib,db,Ga){if("fold"==

// Vulnerability class: CWE-20
e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,A,B,I){function O(oa){null!=oa&&(Ha=ra=oa?135:140);oa=!0;if(null!=La)for(;H<La.length&&(oa||0!=mxUtils.mod(H,30));){var sa=La[H++];sa=L(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);oa&&sa.click();oa=!1}}function t(){if(Y&&null!=x)f||b.hideDialog(),x(Y,ea,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var oa=F.value;null!=oa&&
0<oa.length&&b.pickFolder(b.mode,function(sa){b.createFile(oa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=N&&0<N.length?N:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function z(oa,sa,ya,wa,ua,xa,ha){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");V.removeAttribute("disabled");Q=sa;T=ya;N=xa;R=oa;Y=wa;ba=ha;ea=ua;R.style.backgroundColor=d;R.style.border=g}function L(oa,sa,ya,wa,ua,xa,ha,da,

// Vulnerability class: CWE-20
mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";q.appendChild(v);if(m){mxUtils.write(q,mxResources.get("zoom")+":");var x=document.createElement("input");
x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";q.appendChild(x);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var z=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var M=k?null:this.addCheckbox(q,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=M&&(M.style.marginBottom="16px");c=new CustomDialog(this,q,mxUtils.bind(this,function(){var n=parseInt(x.value)/100||1,y=parseInt(A.value)||0;g(!z.checked,null!=L?L.checked:!1,null!=M?M.checked:!1,n,y)}),null,c,e);
this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,q,v,x,A){v=null!=v?v:Editor.defaultIncludeDiagram;var z=document.createElement("div");z.style.whiteSpace="nowrap";var L=this.editor.graph,M="jpeg"==x?220:300,n=document.createElement("h3");mxUtils.write(n,c);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";z.appendChild(n);mxUtils.write(z,mxResources.get("zoom")+":");var y=document.createElement("input");

// Vulnerability class: CWE-20
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Za);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,

// Vulnerability class: CWE-20
O.style.overflow="hidden";O.style.textAlign="center";var R=null;null!=F?(R={data:F,w:E,h:H,title:Q},null!=U&&(R.aspect=U),A[F]=I,k.push(R)):null!=S&&(S.aspect="fixed",k.push(S),R=S);mxEvent.addListener(O,"keydown",function(Z){13==Z.keyCode&&null!=M&&(M(),M=null,mxEvent.consume(Z))});W();C.appendChild(O);mxEvent.addListener(O,"mousedown",function(Z){"true"!=O.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=
new FilenameDialog(b,R.title||"",mxResources.get("ok"),function(aa){null!=aa&&(R.title=aa,W())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(Z)}else if("true"!=O.getAttribute("contentEditable")){null!=M&&(M(),M=null);if(null==R.title||0==R.title.length)O.innerHTML="";O.style.textOverflow="";O.style.whiteSpace="";O.style.cursor="text";O.style.color="";O.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(O.style,"user-select","text");
O.focus();document.execCommand("selectAll",!1,null);M=function(){O.removeAttribute("contentEditable");O.style.cursor="pointer";R.title=O.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(O,"click",T);mxEvent.addListener(C,"dblclick",T);v.appendChild(C);mxEvent.addListener(C,"dragstart",function(Z){null==F&&null!=S&&(P.style.visibility="hidden",O.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",S.xml);z=D(Z);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style,

// Vulnerability class: CWE-20
var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var K=O.getElementsByTagName("div"),F=0,H=0;H<K.length;H++)"none"!=K[H].style.display&&K[H].parentNode==O&&F++;t.style.display=0==F?"block":"none"}function d(K,F,H,S){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";M.style.display="block"}A={div:F,comment:K,saveCallback:H,deleteOnCancel:S};var M=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
"geCommentEditTxtArea";U.style.minHeight=M.offsetHeight+"px";U.value=K.content;F.insertBefore(U,M);var X=document.createElement("div");X.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){S?(F.parentNode.removeChild(F),v()):V();A=null});u.className="geCommentEditBtn";X.appendChild(u);var E=mxUtils.button(mxResources.get("save"),function(){M.innerHTML="";K.content=U.value;mxUtils.write(M,K.content);V();H(K);A=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
function(J){mxEvent.isConsumed(J)||((mxEvent.isControlDown(J)||mxClient.IS_MAC&&mxEvent.isMetaDown(J))&&13==J.keyCode?(E.click(),mxEvent.consume(J)):27==J.keyCode&&(u.click(),mxEvent.consume(J)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,M);W.style.display="none";M.style.display="none";U.focus()}function g(K,F){F.innerHTML="";K=new Date(K.modifiedDate);var H=b.timeSince(K);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",

// Vulnerability class: CWE-20
"&from="+q;break}q=z.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:z.getExportVariables()};A&&(p.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+C+D+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):

// Vulnerability class: CWE-20
J&&E(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(J)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);J&&E(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,E,J,

// Vulnerability class: CWE-20
2;ua.y+=ua.height/2-ua.width/2;var Ea=ua.width;ua.width=ua.height;ua.height=Ea;M.setGeometry(ia,ua)}var Da=this.view.getState(ia);if(null!=Da){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ya=mxUtils.getValue(Da.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,La[mxUtils.mod(mxUtils.indexOf(La,Ya)+(L?-1:1),La.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};

// Vulnerability class: CWE-20
filterPrefix: function() {
    var parts = [];
    var self = this;
    forEach(this.state.filters, function(id, filter) {
      parts.push(id + '=$filter(' + self.escape(filter) + ')');
    });
    if (parts.length) return 'var ' + parts.join(',') + ';';
    return '';
  },

// Vulnerability class: CWE-74
"25px";btn.className="geColorBtn";return btn}function Y(Aa,ta,ka,oa,sa,ya,wa){if(0<sa){var ua=Array(sa);ta=null!=ta?ta.split(","):[];for(var xa=0;xa<sa;xa++)ua[xa]=null!=ta[xa]?ta[xa]:null!=oa?oa:"";aa.push({name:Aa,values:ua,type:ka,defVal:oa,parentRow:ya,flipBkg:wa,size:sa})}return document.createElement("div")}function ba(Aa,ta,ka){var oa=document.createElement("input");oa.type="checkbox";oa.checked="1"==ta;mxEvent.addListener(oa,"change",function(){T(Aa,oa.checked?"1":"0",ka)});return oa}function ea(Aa,

// Vulnerability class: CWE-20
lex: function(text) {
    this.text = text;
    this.index = 0;
    this.tokens = [];

    while (this.index < this.text.length) {
      var ch = this.text.charAt(this.index);
      if (ch === '"' || ch === '\'') {
        this.readString(ch);
      } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {
        this.readNumber();
      } else if (this.isIdentifierStart(this.peekMultichar())) {
        this.readIdent();
      } else if (this.is(ch, '(){}[].,;:?')) {
        this.tokens.push({index: this.index, text: ch});
        this.index++;
      } else if (this.isWhitespace(ch)) {
        this.index++;
      } else {
        var ch2 = ch + this.peek();
        var ch3 = ch2 + this.peek(2);
        var op1 = OPERATORS[ch];
        var op2 = OPERATORS[ch2];
        var op3 = OPERATORS[ch3];
        if (op1 || op2 || op3) {
          var token = op3 ? ch3 : (op2 ? ch2 : ch);
          this.tokens.push({index: this.index, text: token, operator: true});
          this.index += token.length;
        } else {
          this.throwError('Unexpected next character ', this.index, this.index + 1);
        }
      }
    }
    return this.tokens;
  },

// Vulnerability class: CWE-74
function $parse(exp, interceptorFn) {
      var parsedExpression, oneTime, cacheKey;

      switch (typeof exp) {
        case 'string':
          exp = exp.trim();
          cacheKey = exp;

          parsedExpression = cache[cacheKey];

          if (!parsedExpression) {
            if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {
              oneTime = true;
              exp = exp.substring(2);
            }
            var lexer = new Lexer($parseOptions);
            var parser = new Parser(lexer, $filter, $parseOptions);
            parsedExpression = parser.parse(exp);
            if (parsedExpression.constant) {
              parsedExpression.$$watchDelegate = constantWatchDelegate;
            } else if (oneTime) {
              parsedExpression.$$watchDelegate = parsedExpression.literal ?
                  oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;
            } else if (parsedExpression.inputs) {
              parsedExpression.$$watchDelegate = inputsWatchDelegate;
            }
            cache[cacheKey] = parsedExpression;
          }
          return addInterceptor(parsedExpression, interceptorFn);

        case 'function':
          return addInterceptor(exp, interceptorFn);

        default:
          return addInterceptor(noop, interceptorFn);
      }
    }

// Vulnerability class: CWE-74
z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.graph.connectionHandler.isEnabled()})};var ab=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=

// Vulnerability class: CWE-20
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(D){var G=D.getEvent();return null==D.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==D.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(D,

// Vulnerability class: CWE-20
aa[ua+5]);this.lastX=Z;this.lastY=ea}};p.prototype.rect=function(O,R,Y,da){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,R,Y,da,this.getStyle(!0,!0)))};p.prototype.ellipse=function(O,R,Y,da){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+Y/2,R+da/2,Y,da,this.getStyle(!0,!0)))};p.prototype.roundrect=function(O,R,Y,da,ha,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,

// Vulnerability class: CWE-20
E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft="6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor="default";var W=E.hideCurrentMenu;E.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var V=E.descriptorChanged;E.descriptorChanged=function(){V.apply(this,arguments);var ca=E.getCurrentFile();if(null!=
ca&&null!=ca.getTitle()){var ba=ca.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);S.setAttribute("title",ca.getTitle()+(null!=ba?" ("+ba+")":""))}else S.removeAttribute("title")};E.setStatusText(E.editor.getStatus());S.appendChild(E.statusContainer);E.buttonContainer=document.createElement("div");E.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";

// Vulnerability class: CWE-20
var J=A.div.querySelector(".geCommentEditTxtArea"),E=A.div.querySelector(".geCommentEditBtns");A.comment.content=J.value;J.parentNode.removeChild(J);E.parentNode.removeChild(E)}catch(H){b.handleError(H)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function S(U){if(null!=U){U.sort(function(W,V){return new Date(W.modifiedDate)-
new Date(V.modifiedDate)});for(var Q=0;Q<U.length;Q++)S(U[Q].replies)}}H.sort(function(U,Q){return new Date(U.modifiedDate)-new Date(Q.modifiedDate)});M.innerHTML="";M.appendChild(n);n.style.display="block";F=H;for(H=0;H<F.length;H++)S(F[H].replies),q(F[H],F,null,0,B);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(M.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?

// Vulnerability class: CWE-20
(new mxCodec(p.ownerDocument)).decode(p)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(p,C,I,T,P,O,R,Y,da,ha,Z,ea,aa,ua){var la=null,Aa=null,Fa=null;ea||null==this.themes||"darkTheme"!=this.defaultThemeName||(la=this.stylesheet,Aa=this.shapeForegroundColor,Fa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=

// Vulnerability class: CWE-20
"center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ba||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function F(ca,ba,ja,ia,ma,qa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing=
"border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow="none",oa.style.padding="6px",oa.style.margin="0px");null!=E.statusContainer?S.insertBefore(oa,E.statusContainer):S.appendChild(oa);null!=qa?(oa.style.backgroundImage="url("+qa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",
oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(oa,"click",function(na){"disabled"!=oa.getAttribute("disabled")&&ba(na);mxEvent.consume(na)});null==ja&&(oa.style.marginRight="4px");null!=ia&&oa.setAttribute("title",ia);null!=ma&&(ca=function(){ma.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor=
"default")},ma.addListener("stateChanged",ca),H.addListener("enabledChanged",ca),ca());return oa}function G(ca,ba,ja){ja=document.createElement("div");ja.className="geMenuItem";ja.style.display="inline-block";ja.style.verticalAlign="top";ja.style.marginRight="6px";ja.style.padding="0 4px 0 4px";ja.style.height="30px";ja.style.position="relative";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.boxShadow="none");for(var ia=0;ia<ca.length;ia++)null!=ca[ia]&&("1"==urlParams.sketch&&(ca[ia].style.padding=

// Vulnerability class: CWE-20
m?this.getFileData(!0,null,null,null,g,x):null,A,null==this.pages||0==this.pages.length,L)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,g,c||1,e,k,null,null,q,v,z,M,n)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,q,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var A=

// Vulnerability class: CWE-20
function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,k,m,q,v,x){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(k,m,q)),"image/svg+xml");

// Vulnerability class: CWE-20
null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));z&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,q,v,x,A,z,L,M){this.getBasenames();var n={};""!=
m&&m!=mxConstants.NONE&&(n.highlight=m);"auto"!==k&&(n.target=k);z||(n.lightbox=!1);n.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(n.zoom=g/100);g=[];v&&(g.push("pages"),n.resize=!0,null!=this.pages&&null!=this.currentPage&&(n.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),n.resize=!0);x&&g.push("layers");A&&g.push("tags");0<g.length&&(z&&g.push("lightbox"),n.toolbar=g.join(" "));null!=L&&0<L.length&&(n.edit=L);null!=c?n.url=c:n.xml=this.getFileData(!0,
null,null,null,null,!v);e='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(n))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";M(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,k){var m=document.createElement("div");m.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(q);var v=document.createElement("div");v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var x=document.createElement("input");

// Vulnerability class: CWE-20
typeof fa.getAttribute&&null!=fa.getAttribute("title")&&sa.push({img:fa.getAttribute("img"),libs:fa.getAttribute("libs"),clibs:fa.getAttribute("clibs"),title:fa.getAttribute("title")}),fa=fa.nextSibling;F(sa)}});var ra=function(fa,ca,ba){la.style.display="";Ea.stop();W=!1;if(V)V=!1;else if(ca)aa.innerHTML=ca;else{ba=ba||{};ca=0;for(var ja in ba)ca+=ba[ja].length;0==fa.length&&0==ca?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(fa,!1,O,0==ca?null:ba)}};J(P);var wa=null;mxEvent.addListener(Oa,
"keyup",S);mxEvent.addListener(Oa,"search",S);mxEvent.addListener(Oa,"input",S);mxEvent.addListener(Ba,"click",function(fa){y(!1,!1)});m&&mxEvent.addListener(Ka,"click",function(fa){y(!1,!0)});q&&mxEvent.addListener(Q.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(fa){y(!0)});mxEvent.addListener(Q.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();x||b.hideDialog(!0)})};TemplatesDialog.tagsList={};

// Vulnerability class: CWE-20