mcanoglu/cwe-class-group huggingface dataset:
DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(N,Q){Q=Q||document;return Q.querySelector(N)}function A(N,Q,R){if(null==N["@microsoft.graph.downloadUrl"])if(null==N.parentReference)R();else{c(N.id,N.parentReference.driveId,function(ea){A(ea,Q,R)},R);return}var Y=new XMLHttpRequest;Y.open("GET",N["@microsoft.graph.downloadUrl"]);var ba=N.file?"image/png"==N.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}R()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function B(){p&&null!=F?K.exportToCanvas(function(N){N=EditorUi.prototype.createImageDataUri(N,null,"png");v(H,N);n(H)},400,

// Vulnerability class: CWE-20
"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(A=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(L,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+x+";base64,"+L+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),

// Vulnerability class: CWE-20
function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(A);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,u,E){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
for(var J=0;J<X.length;J++)if("label"!=X[J].nodeName){var T=mxUtils.trim(X[J].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=T.indexOf(u)||!E&&T.substring(0,u.length)===u)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&L.value?(S.removeAttribute("disabled"),V.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));L.value&&z.value?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")}function g(U,

// Vulnerability class: CWE-20
t.toDataURL();if(z.length<g.length){var L=document.createElement("canvas");L.width=I;L.height=O;var C=L.toDataURL();z!==C&&(g=z,y=I,A=O)}}}catch(D){}k(g,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=

// Vulnerability class: CWE-20
R=0;R<N.length;R++)if(null==E||null!=E[N[R]])Q[N[R]]=!0,J.push(N[R]);E=Q}else return[]}return J};Graph.prototype.getTagsForCells=function(u){for(var E=[],J={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==J[N[Q]]&&(J[N[Q]]=!0,E.push(N[Q]))}}return E};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate();

// Vulnerability class: CWE-20
document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=qa;ma.appendChild(pa);Ca.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ka(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ka,200)}Z=!0;var Ia=M.querySelector(".geTemplatesList");Ia.style.display="block";Ba.style.width="";Na.style.display="";Na.value="";ba=null;Ka()});fa.style.display=ha.length<=ca?"none":""}function G(ha,da,ca){function la(Qa,Ya){var Ma=
mxResources.get(Qa);null==Ma&&(Ma=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=Ma+" ("+Ya.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"&hellip;");return{lbl:Ma+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function ia(Qa,Ya,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){X!=Ma&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(ra.style.display="none",Ha.style.minHeight="100%"),X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",

// Vulnerability class: CWE-20
this.convertImages(fa.getSvg(null,null,aa,va,null,R,null,null,null,ea,null,Ba,Ha,ra),mxUtils.bind(this,function(za){try{var Ga=new Image;Ga.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){Aa.drawImage(Ga,0,0);u(Ea,za)},0):(Aa.drawImage(Ga,0,0),u(Ea,za))},Ea=document.createElement("canvas"),Da=parseInt(za.getAttribute("width")),La=parseInt(za.getAttribute("height"));Y=null!=Y?Y:1;null!=E&&(Y=Q?Math.min(1,Math.min(3*E/(4*La),E/Da)):E/Da);Y=this.getMaxCanvasScale(Da,

// Vulnerability class: CWE-20
function(K){l=K};this.setAutoScroll=function(K){p=K};this.setOpenFill=function(K){q=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){B=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){O=K};this.setBrushSize=function(K){I.size=K};this.getBrushSize=function(){return I.size};var t=function(K){y=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};

// Vulnerability class: CWE-20
f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&R.headRevisionId==I&&EditorUi.debug("DriveClient: Remote Etag Changed","local",W,
"remote",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),q(Q,R)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(R){x(R)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==W)U(E);else{var J=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){J=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(N){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(N){window.clearTimeout(T);

// Vulnerability class: CWE-20
V+";"),O.setAttributeForCell(U,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{O.getModel().endUpdate()}null!=U&&(O.setSelectionCell(U),O.scrollCellToVisible(U))},function(V){b.handleError(V)}));else if("table"==y){y=null;for(var z=[],L=0,C={},D=0;D<B.length;D++){var G=mxUtils.trim(B[D]);if("primary key"==G.substring(0,11).toLowerCase()){var P=G.match(/\((.+)\)/);P&&P[1]&&(C[P[1]]=!0);B.splice(D,1)}else 0<G.toLowerCase().indexOf("primary key")&&(C[G.split(" ")[0]]=

// Vulnerability class: CWE-20
arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",

// 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,
y){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();A.id=x;null!=y&&A.setAttribute("name",y);k&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);l&&A.setAttribute("disabled","disabled");q&&(d.appendChild(A),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return A};EditorUi.prototype.addEditButton=function(d,

// Vulnerability class: CWE-20
(H.geometry.height-U[1].geometry.height)/2:(N.y+N.height)/R-Q.y+-J.y+10);return y.addCells(U,V)}finally{y.model.endUpdate()}}function p(H,S,V){H=y.getOutgoingTreeEdges(H);V=y.view.getState(V);var M=[];if(null!=V&&null!=H){for(var W=0;W<H.length;W++){var U=y.view.getState(y.model.getTerminal(H[W],!1));null!=U&&(!S&&Math.min(U.x+U.width,V.x+V.width)>=Math.max(U.x,V.x)||S&&Math.min(U.y+U.height,V.y+V.height)>=Math.max(U.y,V.y))&&M.push(U)}M.sort(function(X,u){return S?X.x+X.width-u.x-u.width:X.y+X.height-
u.y-u.height})}return M}function q(H,S){var V=d(H),M=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==M&&V!=S?x.actions.get("selectParent").funct():V==S?(S=y.getOutgoingTreeEdges(H),null!=S&&0<S.length&&y.setSelectionCell(y.model.getTerminal(S[0],!1))):(V=y.getIncomingTreeEdges(H),null!=V&&0<V.length&&(M=p(y.model.getTerminal(V[0],!0),M,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(M,H),0<=H&&(H+=S==mxConstants.DIRECTION_NORTH||

// Vulnerability class: CWE-20
ca.model.setRoot(na.root)}ma=wa(ca,ma,pa!=ia);ca!=N&&ca.container.parentNode.removeChild(ca.container)}}else ma=wa(N);null==ma?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(N.shapeForegroundColor=ha,N.shapeBackgroundColor=da,N.stylesheet=
xa,N.refresh())}}var N=u.editor.graph,Q=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,E||mxResources.get("print"));Q.appendChild(R);var Y=1,ba=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ea=document.createElement("input");ea.style.cssText="margin-right:8px;margin-bottom:8px;";ea.setAttribute("value","all");ea.setAttribute("type",

// Vulnerability class: CWE-20
"plantUmlData",JSON.stringify({data:F,format:K.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(D,G,P){var K=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("mermaid")+":",K.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,K.config,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",

// Vulnerability class: CWE-20
function(C){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=C?C:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),
this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);B.apply(this,arguments)};var I=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(C){I.apply(this,arguments);if(C){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;

// Vulnerability class: CWE-20
function(t){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var A=function(t,z,L,C,D){t=Math.round(t);z=Math.round(z);L=Math.round(L);C=Math.round(C);x.beginPath();x.moveTo(t+.5,z+.5);x.lineTo(L+.5,C+.5);x.stroke();D&&(f?(x.save(),x.translate(t,z),
x.rotate(-Math.PI/2),x.fillText(D,0,0),x.restore()):x.fillText(D,t,z))},B=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var t=y.view.scale,z=y.view.getBackgroundPageBounds(),L=y.view.translate,C=y.pageVisible;L=C?g+(f?z.y-y.container.scrollTop:z.x-y.container.scrollLeft):g+(f?L.y*t-y.container.scrollTop:L.x*t-y.container.scrollLeft);var D=0;C&&(D=y.getPageLayout(),D=f?D.y*y.pageFormat.height:

// Vulnerability class: CWE-20
H,[D]);var M=g.model.getGeometry(D);null!=M&&(M=M.clone(),M.width=Math.max(M.width,S),M.height=Math.max(M.height,V),g.cellsResized([D],[M],!1));g.setAttributeForCell(D,"mermaidData",JSON.stringify({data:F,config:K.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(D,G){try{var P=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=
P)this.editPlantUmlData(D,G,P);else if(P=this.graph.getAttributeForCell(D,"mermaidData"),null!=P)this.editMermaidData(D,G,P);else{var K=g.getCellStyle(D);"1"==mxUtils.getValue(K,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this,

// Vulnerability class: CWE-20
6)},function(L){for(var C=0;C<L.length;C++)L[C]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var z=c.parentNode,L=null;mxEvent.addListener(z,
"dragleave",function(C){null!=L&&(L.parentNode.removeChild(L),L=null);C.stopPropagation();C.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(C){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=b.highlightElement(z));C.stopPropagation();C.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(C){null!=L&&(L.parentNode.removeChild(L),L=null);if(0<C.dataTransfer.files.length)B(C.dataTransfer.files);else if(0<=mxUtils.indexOf(C.dataTransfer.types,
"text/uri-list")){var D=C.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)&&(g.value=decodeURIComponent(D),A())}C.stopPropagation();C.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var I=document.createElement("input");I.setAttribute("type","text");I.style.width="60px";I.style.marginLeft="8px";I.style.marginRight="16px";

// Vulnerability class: CWE-20
"",fa=0;fa<k.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,k[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==l&&aa.setAttribute("selected","selected"),M.appendChild(aa);W=function(){try{var Ha=parseInt(M.value);l=g=Ha;ja(k[Ha])}catch(ra){M.value=g,b.handleError(ra)}}}else Ba(va);fa=R.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+

// Vulnerability class: CWE-20
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")},

// Vulnerability class: CWE-20
null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=za[wa],null==xa&&(xa={},za[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}S.stop();C()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&&

// Vulnerability class: CWE-20
rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";N.style.display="";N.style.left=F.diagramContainer.offsetLeft-N.offsetWidth-4+"px";N.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=Q.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
F.bottomResizer.style.visibility;S.style.display="none";Q.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Ea.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});u=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+

// Vulnerability class: CWE-20
T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});u.appendChild(N)}}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(R){E.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=

// Vulnerability class: CWE-20
this.startDrawing=function(){n(!0)};this.isDrawing=function(){return x};var y=mxUtils.bind(this,function(J){if(d){var E=c.length,H=A&&0<D.length&&null!=c&&2>c.length;H||D.push.apply(D,c);c=[];D.push(null);u.push(d);d=null;(H||k)&&this.stopDrawing();k&&2<=E&&this.startDrawing();mxEvent.consume(J)}}),K=new mxCell;K.edge=!0;var B=function(){var J=b.getCurrentCellStyle(K);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==

// Vulnerability class: CWE-20
EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
return this.editor.exportToCanvas(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");

// Vulnerability class: CWE-20
EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");

// Vulnerability class: CWE-20
function(){b.spinner.stop();if(null==b.linkPicker){var n=b.drive.createLinkPicker();b.linkPicker=n.setCallback(function(y){LinkDialog.filePicked(y)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(n){k.value=n[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),

// Vulnerability class: CWE-20
q&&k.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(v);q&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:x,error:A});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(z,L){var M={event:"remoteInvokeResponse",
msgMarkers:c.msgMarkers};null!=L?M.error={errResp:L}:null!=z&&(M.resp=z);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var k=c.funtionName,m=this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var q=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){q=!0;break}if(!q){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),
x.push(function(z){g(null,z||"Unkown Error")}),this[k].apply(this,x);else{var A=this[k].apply(this,x);g([A])}}else g(null,"Invalid Call: "+k+" is not found.")}catch(z){g(null,"Invalid Call: An error occurred, "+z.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var k=g.open("database",2);k.onupgradeneeded=function(m){try{var q=k.result;1>m.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});

// Vulnerability class: CWE-20
p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=y.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=

// Vulnerability class: CWE-20
c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(q){return"page"==q?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(q){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var q=this.editor.graph,v=null!=q.themes&&"darkTheme"==q.defaultThemeName,x=null;if(null!=g&&0<g.length)q=this.createTemporaryGraph(v?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,

// Vulnerability class: CWE-20
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],t,D=[],c,e=!1,g=!0,k=!0,m=!0,q=!0,v=[],x=!1,A=!0,z=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},M=!1;this.setClosedPath=function(J){e=J};this.setAutoClose=function(J){g=J};this.setAutoInsert=

// Vulnerability class: CWE-20
f.appendChild(m);f.appendChild(l);k.appendChild(f);var q=c,v,x,A=function(n,y,K,B){var F="data:"==n.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<n.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(n,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=y&&null!=K?Math.max(y/G.width,K/G.height):Math.min(1,Math.min(520/G.width,520/G.height));t&&(n=b.convertDataUri(n));d(n,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,v,x)},
function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(n,null,null,q,v,x)):(n=b.convertDataUri(n),y=null==y?120:y,K=null==K?100:K,b.hideDialog(),d(n,y,K,q,v,x))},z=function(n,y){if(null!=n){var K=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=K?A(n,K.width,K.height,y):A(n,null,null,y)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",

// Vulnerability class: CWE-20
0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,q,v,x){EditorUi.logError("Global: "+(null!=k?k:""),m,q,v,x,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||

// Vulnerability class: CWE-20
""),mxUtils.bind(this,function(x){window.clearTimeout(v);q&&(200<=x.getStatus()&&299>=x.getStatus()?null!=l&&l():d({code:x.getStatus(),message:x.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",g,m.length,"bytes","from",c,"to",e,"etag",this.file.getCurrentEtag(),"checksum",k)}}this.file.setShadowPages(b);this.scheduleCleanup()};

// Vulnerability class: CWE-20
u,t,D,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return A.isVertex(H)&&t(H)}function u(H){var S=
!1;null!=H&&(S="1"==x.getCurrentCellStyle(H).treeMoving);return S}function t(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),S="tree"==(null!=S?S.style:x.getCellStyle(H)).containerType);return S}function D(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),x.view.getState(H),S=null!=(null!=S?S.style:x.getCellStyle(H)).childLayout);return S}function c(H){H=x.view.getState(H);if(null!=H){var S=x.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=x.view.getState(S[0]),null!=S&&(S=S.absolutePoints,

// Vulnerability class: CWE-20
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
F=B.createElement("output");B.appendChild(F);B=new mxXmlCanvas2D(F);B.translate(Math.floor((1-y.x)/K),Math.floor((1-y.y)/K));B.scale(1/K);var G=0,N=B.save;B.save=function(){G++;N.apply(this,arguments)};var J=B.restore;B.restore=function(){G--;J.apply(this,arguments)};var E=n.drawShape;n.drawShape=function(H){mxLog.debug("entering shape",H,G);E.apply(this,arguments);mxLog.debug("leaving shape",H,G)};n.drawState(u.getView().getState(u.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",

// Vulnerability class: CWE-20
PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(z){var L=new Image;L.onload=
function(){try{var M=L.width,n=L.height;if(0==M&&0==n){var y=A.result,K=y.indexOf(","),B=decodeURIComponent(escape(atob(y.substring(K+1)))),F=mxUtils.parseXml(B).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),n=parseFloat(F[0].getAttribute("height")))}g(A.result,M,n)}catch(G){k(G)}};L.src=A.result};A.onerror=function(z){k(z)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();

// Vulnerability class: CWE-20
function(){try{var M=L.width,n=L.height;if(0==M&&0==n){var y=A.result,K=y.indexOf(","),B=decodeURIComponent(escape(atob(y.substring(K+1)))),F=mxUtils.parseXml(B).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),n=parseFloat(F[0].getAttribute("height")))}g(A.result,M,n)}catch(G){k(G)}};L.src=A.result};A.onerror=function(z){k(z)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();

// Vulnerability class: CWE-20
if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,E=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=c.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=E;this.stylesheet=J}return N};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return x.apply(this,arguments)};

// Vulnerability class: CWE-20
Number(L.value),[f[n]])}}finally{l.getModel().endUpdate()}});M.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(n){13==n.keyCode&&M.click()});t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(d),t.appendChild(M)):(t.appendChild(M),t.appendChild(d));u.appendChild(t);this.container=u},LibraryDialog=function(b,f,l,d,u,t){function D(F){for(F=document.elementFromPoint(F.clientX,F.clientY);null!=F&&F.parentNode!=

// Vulnerability class: CWE-20
(ua.appendChild(Z),ua.appendChild(ea),da.appendChild(ua));return{div:da,refresh:aa}};Graph.prototype.getCustomFonts=function(){var p=this.extFonts;p=null!=p?p.slice():[];for(var C in Graph.customFontElements){var I=Graph.customFontElements[C];p.push({name:I.name,url:I.url})}return p};Graph.prototype.setFont=function(p,C){Graph.addFont(p,C);document.execCommand("fontname",!1,p);if(null!=C){var I=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(p,C);for(var T=0;T<I.length;T++)I[T].getAttribute("face")==

// Vulnerability class: CWE-20
f.getCell(x),null!=v&&v!=q&&(q=null));null!=q&&(f.getChildAt(l,c)!=q&&f.add(l,q,c),this.patchCellRecursive(b,f,q,d,u),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=t[k],null!=m&&(delete t[k],g.push({child:f.getCell(m)})),m=D[k],null!=m&&(delete D[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in t)g.push({child:f.getCell(t[k])}),delete t[k];for(k in D)g.push({child:this.getCellForJson(D[k]),insert:!0}),delete D[k]}}};

// Vulnerability class: CWE-20
U;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(H,S,U){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,U))};var M=x.duplicateCells;x.duplicateCells=function(H,S){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),Q=0;Q<U.length;Q++){var W=x.view.getState(U[Q]);if(null!=W&&d(W.cell)){var V=x.getIncomingTreeEdges(W.cell);for(W=0;W<V.length;W++)mxUtils.remove(V[W],H)}}this.model.beginUpdate();try{var X=M.call(this,H,S);if(X.length==H.length)for(Q=0;Q<H.length;Q++)if(d(H[Q])){var p=

// Vulnerability class: CWE-20
this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),y,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};

// Vulnerability class: CWE-20
this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==E.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),ja=E.embedViewport.x+E.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),qa=E.embedViewport.y+E.embedViewport.height;
this.div.style.left=Math.max(E.embedViewport.x,Math.min(ca,ja-ba))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(ia,qa-ma))+"px";this.div.style.height=Math.min(E.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),

// Vulnerability class: CWE-20
U+";"))}),mxUtils.bind(this,function(p){e.setSelectionCells(this.insertTextAt(U,H,S,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),H,S,!0))}}F.stopPropagation();F.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var q=g.items;for(index in q){var v=q[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(A,z,L,M,n,y){c.insertImage(A,n,y)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var z=0;z<A.length;z++)A[z]()});else{var x=
this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",

// Vulnerability class: CWE-20
0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;ua.checked&&(Na.isCellVisible=function(Xa){return Ha.isCellSelected(Xa)});Wa=p.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var ib=Na.writeHead;Na.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
Xa.writeln("}"),Xa.writeln("</style>"));null!=p.editor.fontCss&&(Xa.writeln('<style type="text/css">'),Xa.writeln(p.editor.fontCss),Xa.writeln("</style>"));for(var db=Ha.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+
'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Na.renderPage;Na.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!p.editor.useForeignObjectForMath?!0:p.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Va=P.enableFlowAnimation;

// Vulnerability class: CWE-20
B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,F,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=

// Vulnerability class: CWE-20
DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,q,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,q,v,x)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};

// Vulnerability class: CWE-20
M.checked,n.getLink(),B.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,q,v,x){function A(y){var K=" ",B="";k&&(K=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",B+="cursor:pointer;");c&&(B+="max-width:100%;");var F="";g&&(F=' width="'+Math.round(z.width)+'" height="'+Math.round(z.height)+'"');v('<img src="'+y+'"'+F+(""!=B?' style="'+B+'"':"")+K+"/>")}var z=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(y){var K=k?this.getFileData(!0):null;y=

// Vulnerability class: CWE-20
index:I,defVal:la.defVal,countProperty:la.countProperty,size:la.size},0==I%2,la.flipBkg),C.parentNode.insertBefore(Ka,C.nextSibling),C=Ka;p.appendChild(ua);xa();return p};StyleFormatPanel.prototype.addStyles=function(p){function C(la){mxEvent.addListener(la,"mouseenter",function(){la.style.opacity="1"});mxEvent.addListener(la,"mouseleave",function(){la.style.opacity="0.5"})}var I=this.editorUi,T=I.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";

// Vulnerability class: CWE-20
!1;null!=H&&(S="1"==x.getCurrentCellStyle(H).treeMoving);return S}function t(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),S="tree"==(null!=S?S.style:x.getCellStyle(H)).containerType);return S}function D(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),x.view.getState(H),S=null!=(null!=S?S.style:x.getCellStyle(H)).childLayout);return S}function c(H){H=x.view.getState(H);if(null!=H){var S=x.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=x.view.getState(S[0]),null!=S&&(S=S.absolutePoints,
null!=S&&0<S.length&&(S=S[S.length-1],null!=S)))){if(S.y==H.y&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(S.y==H.y+H.height&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(S.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(H,S){S=null!=S?S:!0;x.model.beginUpdate();try{var U=x.model.getParent(H),Q=x.getIncomingTreeEdges(H),W=x.cloneCells([Q[0],H]);x.model.setTerminal(W[0],x.model.getTerminal(Q[0],

// Vulnerability class: CWE-20
f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x,A,z,L){function M(pa){null!=pa&&(Fa=xa=pa?135:140);pa=!0;if(null!=Ma)for(;H<Ma.length&&(pa||0!=mxUtils.mod(H,30));){var sa=Ma[H++];sa=K(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);pa&&sa.click();pa=!1}}function n(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ha,E.value);else if(d)l||b.hideDialog(),d(O,E.value,da,T);else{var pa=E.value;null!=pa&&

// Vulnerability class: CWE-20
Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;
ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ca;Ca=!0;ba.src="/images/aui-wait.gif";fa.isExt?e(fa,oa,function(){A(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ia(fa.url,oa)}}function n(fa,ca,ba){if(null!=C){for(var ja=C.className.split(" "),ia=0;ia<ja.length;ia++)if(-1<ja[ia].indexOf("Active")){ja.splice(ia,1);break}C.className=ja.join(" ")}null!=fa?(C=fa,C.className+=" "+ca,I=ba,Ba.className="geTempDlgCreateBtn"):(I=C=null,Ba.className=

// Vulnerability class: CWE-20
Oa+="@import url("+Ma+");\n":Ia+='@font-face {\nfont-family: "'+Ca+'";\nsrc: url("'+Ma+'");\n}\n'}Ka.appendChild(Ba.createTextNode(Oa+Ia));xa.getElementsByTagName("defs")[0].appendChild(Ka)}null!=la&&(this.shapeBackgroundColor=Fa,this.shapeForegroundColor=Aa,this.stylesheet=la,this.refresh());return xa};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var p=B.apply(this,arguments);if(this.mathEnabled){var C=p.drawText;p.drawText=function(I,T){if(null!=I.text&&
null!=I.text.value&&I.text.checkBounds()&&(mxUtils.isNode(I.text.value)||I.text.dialect==mxConstants.DIALECT_STRICTHTML)){var P=I.text.getContentNode();if(null!=P){P=P.cloneNode(!0);if(P.getElementsByTagNameNS)for(var O=P.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<O.length;)O[0].parentNode.removeChild(O[0]);null!=P.innerHTML&&(O=I.text.value,I.text.value=P.innerHTML,C.apply(this,arguments),I.text.value=O)}}else C.apply(this,arguments)}}return p};var F=mxCellRenderer.prototype.destroy;

// Vulnerability class: CWE-20