mcanoglu/cwe-class-group huggingface dataset:
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==
na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,
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
link: function(scope, element, attrs) {

          var width = 120;
          var height = 39;

          var div = $('<div class="terminal">A</div>').css({
            position: 'absolute',
            left: -1000,
            top: -1000,
            display: 'block',
            padding: 0,
            margin: 0,
            'font-family': 'monospace'
          }).appendTo($('body'));

          var charWidth = div.width();
          var charHeight = div.height();

          div.remove();

          // compensate for internal horizontal padding
          var cssWidth = width * charWidth + 20;
          // Add an extra line for the status bar and divider
          var cssHeight = (height * charHeight) + charHeight + 2;

          log.debug("desired console size in characters, width: ", width, " height: ", height);
          log.debug("console size in pixels, width: ", cssWidth, " height: ", cssHeight);
          log.debug("character size in pixels, width: ", charWidth, " height: ", charHeight);

          element.css({
            width: cssWidth,
            height: cssHeight,
            'min-width': cssWidth,
            'min-height': cssHeight
          });

          gogo.Terminal(element.get(0), width, height);

          scope.$on("$destroy", function(e) {
            document.onkeypress = null;
            document.onkeydown = null;
          });

        }

// Vulnerability class: CWE-287
(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function K(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=

// Vulnerability class: CWE-20
object: function() {
    var properties = [], property;
    if (this.peekToken().text !== '}') {
      do {
        if (this.peek('}')) {
          // Support trailing commas per ES5.1.
          break;
        }
        property = {type: AST.Property, kind: 'init'};
        if (this.peek().constant) {
          property.key = this.constant();
          property.computed = false;
          this.consume(':');
          property.value = this.expression();
        } else if (this.peek().identifier) {
          property.key = this.identifier();
          property.computed = false;
          if (this.peek(':')) {
            this.consume(':');
            property.value = this.expression();
          } else {
            property.value = property.key;
          }
        } else if (this.peek('[')) {
          this.consume('[');
          property.key = this.expression();
          this.consume(']');
          property.computed = true;
          this.consume(':');
          property.value = this.expression();
        } else {
          this.throwError('invalid key', this.peek());
        }
        properties.push(property);
      } while (this.expect(','));
    }
    this.consume('}');

    return {type: AST.ObjectExpression, properties: properties };
  },

// Vulnerability class: CWE-74
ka.size,ra,sa)):"readOnly"==va?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ta,sa.style.width="96px",sa.style.borderWidth="0px",wa.appendChild(sa)):(wa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ta)),mxEvent.addListener(wa,"click",mxUtils.bind(Z,function(){function ca(){var ja=ba.value;ja=0==ja.length&&"string"!=va?0:ja;ka.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",va="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=ka.min&&ja<
ka.min?ja=ka.min:null!=ka.max&&ja>ka.max&&(ja=ka.max);ja=encodeURIComponent(("int"==va?parseInt(ja):ja)+"");T(za,ja,ka)}var ba=document.createElement("input");P(wa,ba,!0);ba.value=decodeURIComponent(ta);ba.className="gePropEditor";"int"!=va&&"float"!=va||ka.allowAuto||(ba.type="number",ba.step="int"==va?"1":"any",null!=ka.min&&(ba.min=parseFloat(ka.min)),null!=ka.max&&(ba.max=parseFloat(ka.max)));p.appendChild(ba);mxEvent.addListener(ba,"keypress",function(ja){13==ja.keyCode&&ca()});ba.focus();mxEvent.addListener(ba,

// Vulnerability class: CWE-20
q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,A,z){c1=x>>2;c2=(x&3)<<4|A>>4;c3=(A&15)<<2|z>>6;c4=z&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":

// Vulnerability class: CWE-20
mxEvent.getSource(D);null!=G;){if(G==x||G==y){D.stopPropagation();D.preventDefault();break}G=G.parentNode}});var L=function(D){return function(G,P,K,F,H,S,V,M,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(U){d(U,P,K,F,H,S,V,"fixed",mxEvent.isAltDown(D)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,
mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,P,K,F,H,S,V,"fixed",mxEvent.isAltDown(D)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(d(G,P,K,F,H,S,V,"fixed",mxEvent.isAltDown(D)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);

// Vulnerability class: CWE-20
peekMultichar: function() {
    var ch = this.text.charAt(this.index);
    var peek = this.peek();
    if (!peek) {
      return ch;
    }
    var cp1 = ch.charCodeAt(0);
    var cp2 = peek.charCodeAt(0);
    if (cp1 >= 0xD800 && cp1 <= 0xDBFF && cp2 >= 0xDC00 && cp2 <= 0xDFFF) {
      return ch + peek;
    }
    return ch;
  },

// Vulnerability class: CWE-74
URI.parseUserinfo = function(string, parts) {
    // extract username:password
    var firstBackSlash = string.indexOf('\\');
    var firstSlash = string.indexOf('/');
    var slash = firstBackSlash === -1 ? firstSlash : (firstSlash !== -1 ? Math.min(firstBackSlash, firstSlash): firstSlash)
    var pos = string.lastIndexOf('@', firstSlash > -1 ? firstSlash : string.length - 1);
    var t;

    // authority@ must come before /path or \path
    if (pos > -1 && (slash === -1 || pos < slash)) {
      t = string.substring(0, pos).split(':');
      parts.username = t[0] ? URI.decode(t[0]) : null;
      t.shift();
      parts.password = t[0] ? URI.decode(t.join(':')) : null;
      string = string.substring(pos + 1);
    } else {
      parts.username = null;
      parts.password = null;
    }

    return string;
  };

// Vulnerability class: CWE-20
DrawioFileSync.prototype.merge=function(b,f,l,d,u,t){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var c=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(c,this.ui.pages):null;var e=this.file.isRealtime()?this.ui.diffPages(c,this.file.ownPages):null;c=this.ui.applyPatches(c,b);var g=null==f?null:this.ui.getHashValueForPages(c);
this.file.setShadowPages(c);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",e,"checksum",f,"current",g,"valid",f==g,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(D),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,D,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(c)]);return}null==this.patchRealtime(b,null,e)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);this.file.backupPatch=null;null!=d&&d(!0)}catch(x){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
null!=u&&u(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(D),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var q=this.file.getCurrentUser(),v=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(A){}}};

// Vulnerability class: CWE-20
if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?c(null,null,0,0,0,0,X[Y]):c(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);E=!0}else if("mxfile"==V.documentElement.nodeName){var da=V.documentElement.getElementsByTagName("diagram");for(Y=0;Y<da.length;Y++){X=mxUtils.getTextContent(da[Y]);T=b.stringToCells(Graph.decompress(X));var ha=b.editor.graph.getBoundingBoxFromGeometry(T);c(null,null,0,0,0,0,{xml:X,w:ha.width,h:ha.height})}E=!0}}catch(Z){}E||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}

// Vulnerability class: CWE-20
document.createElement("tr");la.className="gePropHeader";var Aa=document.createElement("th");Aa.className="gePropHeaderCell";var Fa=document.createElement("img");Fa.src=Sidebar.prototype.expandedImage;Fa.style.verticalAlign="middle";Aa.appendChild(Fa);mxUtils.write(Aa,mxResources.get("property"));la.style.cursor="pointer";var xa=function(){var za=ua.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Fa.src=Sidebar.prototype.collapsedImage;var ta="none";for(var ka=p.childNodes.length-
1;0<=ka;ka--)try{var pa=p.childNodes[ka],sa=pa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||p.removeChild(pa)}catch(ya){}}else Fa.src=Sidebar.prototype.expandedImage,ta="";for(ka=0;ka<za.length;ka++)za[ka].style.display=ta};mxEvent.addListener(la,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;xa()});la.appendChild(Aa);Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.innerHTML=mxResources.get("value");la.appendChild(Aa);ua.appendChild(la);var Da=

// Vulnerability class: CWE-20
g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),q=0;q<k;++q){for(var v=1024*q,x=Math.min(v+1024,g),A=Array(x-v),z=0;v<x;++z,++v)A[z]=c[v].charCodeAt(0);m[q]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,q,v,x){q=null!=q?q:!1;v=null!=v?v:"vsdx"!=

// Vulnerability class: CWE-20
W?(mxUtils.setPrefixedStyle(M.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(M.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(M,W){function U(){if(null==y[u]){var Y=t[u];null==Y&&(Y=p%x.length,t[u]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[u]={cursor:document.createElement("div"),color:ba,selection:{}};I[W]=u;E=y[u].cursor;E.style.pointerEvents=
"none";E.style.position="absolute";E.style.display="none";E.style.opacity="0.9";E.style.zIndex=5E3;var ea=document.createElement("img");mxUtils.setPrefixedStyle(ea.style,"transform","rotate(-45deg)translateX(-14px)");ea.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);ea.style.width="10px";E.appendChild(ea);ea=document.createElement("div");ea.style.backgroundColor=ba;ea.style.color=Y;ea.style.fontSize="9pt";ea.style.padding=
"3px 7px";ea.style.marginTop="8px";ea.style.borderRadius="10px";ea.style.maxWidth="100px";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.whiteSpace="nowrap";mxUtils.write(ea,X);E.appendChild(ea);b.diagramContainer.appendChild(E)}else E=y[u].cursor;J=y[u].selection}if(!P){M=JSON.parse(M);K&&"cursor"!=M.type&&EditorUi.debug("P2PCollab: msg received",[M]);if(null!=W){if(M.from==z||B[M.from]>=M.id){EditorUi.debug("P2PCollab: Dropped Message",M,z,B[M.from]);return}B[M.from]=M.id}var X=

// Vulnerability class: CWE-20
u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,J)));null==u||"mxGraphModel"==u.nodeName||E&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,E){var J=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<J.length?(u=Graph.decompress(J,null,E),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),
T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var E=mxUtils.getTextContent(u),J=null;0<E.length?J=Graph.decompress(E):null!=u.firstChild&&(J=mxUtils.getXml(u.firstChild));return J};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var E=u.indexOf("EmbeddedFile");if(-1<E){var J=u.indexOf("stream",E)+9;if(0<u.substring(E,J).indexOf("application#2Fvnd.jgraph.mxfile"))return E=

// Vulnerability class: CWE-20
'unary+': function(argument, context) {
    return function(scope, locals, assign, inputs) {
      var arg = argument(scope, locals, assign, inputs);
      if (isDefined(arg)) {
        arg = +arg;
      } else {
        arg = 0;
      }
      return context ? {value: arg} : arg;
    };
  },

// Vulnerability class: CWE-74
ua([])},N?null:n)):K(N)),ba=ha,ea=N}function S(ha){null!=xa&&clearTimeout(xa);13==ha.keyCode?H(Na.value):xa=setTimeout(function(){H(Na.value)},1E3)}var V='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+

// Vulnerability class: CWE-20
function equals(o1, o2) {
  if (o1 === o2) return true;
  if (o1 === null || o2 === null) return false;
  // eslint-disable-next-line no-self-compare
  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
  if (t1 === t2 && t1 === 'object') {
    if (isArray(o1)) {
      if (!isArray(o2)) return false;
      if ((length = o1.length) === o2.length) {
        for (key = 0; key < length; key++) {
          if (!equals(o1[key], o2[key])) return false;
        }
        return true;
      }
    } else if (isDate(o1)) {
      if (!isDate(o2)) return false;
      return equals(o1.getTime(), o2.getTime());
    } else if (isRegExp(o1)) {
      if (!isRegExp(o2)) return false;
      return o1.toString() === o2.toString();
    } else {
      if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
        isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
      keySet = createMap();
      for (key in o1) {
        if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
        if (!equals(o1[key], o2[key])) return false;
        keySet[key] = true;
      }
      for (key in o2) {
        if (!(key in keySet) &&
            key.charAt(0) !== '$' &&
            isDefined(o2[key]) &&
            !isFunction(o2[key])) return false;
      }
      return true;
    }
  }
  return false;
}

// Vulnerability class: CWE-74
function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(q){c[EditorUi.DIFF_INSERT][e].data=q.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var k in c[EditorUi.DIFF_UPDATE]){var m=c[EditorUi.DIFF_UPDATE][k];null!=m.name&&
(m.name=this.anonymizeString(m.name));null!=m.cells&&(e=mxUtils.bind(this,function(q){var v=m.cells[q];if(null!=v){for(var x in v)null!=v[x].value&&(v[x].value="["+v[x].value.length+"]"),null!=v[x].xmlValue&&(v[x].xmlValue="["+v[x].xmlValue.length+"]"),null!=v[x].style&&(v[x].style="["+v[x].style.length+"]"),mxUtils.isEmptyObject(v[x])&&delete v[x];mxUtils.isEmptyObject(v)&&delete m.cells[q]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(m.cells)&&delete m.cells);mxUtils.isEmptyObject(m)&&
delete c[EditorUi.DIFF_UPDATE][k]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");

// Vulnerability class: CWE-20
Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,D.clientY);null!=D&&D.parentNode!=
x;)D=D.parentNode;var G=null;if(null!=D){var P=x.firstChild;for(G=0;null!=P&&P!=D;)P=P.nextSibling,G++}return G}function d(D,G,P,K,F,H,S,V,M){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==D&&null!=S||null==A[D]){var W=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));Q.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};x.style.backgroundImage=

// Vulnerability class: CWE-20
function deleteConversation (convoId) {
        $.ajax({
          url: '/api/v1/messages/conversation/' + convoId,
          method: 'DELETE',
          success: function (response) {
            if (response.success) {
              // Check if on conversation
              var $convo = $('#message-content[data-conversation-id="' + response.conversation._id + '"]')
              if ($convo.length > 0) {
                History.pushState(null, null, '/messages', false)
              } else {
                var $convoLI = $('#convo-list').find('li[data-conversation-id="' + response.conversation._id + '"]')
                if ($convoLI.length > 0) {
                  $convoLI.remove()
                }
              }

              $.event.trigger('$trudesk:chat:conversation:deleted', {
                conversation: response.conversation
              })

              helpers.UI.showSnackbar('Conversation Deleted.', false)
            }
          },
          error: function (error) {
            console.log(error)
          }
        })
      }

// Vulnerability class: CWE-662
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==K&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var P=mxUtils.bind(this,function(){var K=this.window.getX(),F=this.window.getY();this.window.setLocation(K,F)});mxEvent.addListener(window,"resize",P);this.destroy=function(){mxEvent.removeListener(window,"resize",P);this.window.destroy()}},ConfirmDialog=function(b,e,f,

// Vulnerability class: CWE-20
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=
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function y(fa,ca){if(null!=I){var ba=function(oa){qa.isExternal?e(qa,function(na){ja(na,oa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?ja(na.getText(),oa):ia()})):ja(b.emptyDiagramXml,oa)},ja=function(oa,na){x||b.hideDialog(!0);f(oa,na,qa,ca)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){I=qa;Ba.className="geTempDlgCreateBtn";ca&&(Ka.className="geTempDlgOpenBtn")},

// Vulnerability class: CWE-20
function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(x.style.border="1px solid black",
x.style.backgroundColor=q):(x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");v.innerHTML="";v.appendChild(x)}mxUtils.write(c,mxResources.get("links")+":");var k=document.createElement("select");k.style.width="100px";k.style.padding="0px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));

// Vulnerability class: CWE-20
function deleteAdlist() {
  var tr = $(this).closest("tr");
  var id = tr.attr("data-id");
  var address = tr.find("#address_" + id).text();

  utils.disableAll();
  utils.showAlert("info", "", "Deleting adlist...", address);
  $.ajax({
    url: "scripts/pi-hole/php/groups.php",
    method: "post",
    dataType: "json",
    data: { action: "delete_adlist", id: id, token: token },
    success: function (response) {
      utils.enableAll();
      if (response.success) {
        utils.showAlert("success", "far fa-trash-alt", "Successfully deleted adlist ", address);
        table.row(tr).remove().draw(false).ajax.reload(null, false);
      } else {
        utils.showAlert("error", "", "Error while deleting adlist with ID " + id, response.message);
      }
    },
    error: function (jqXHR, exception) {
      utils.enableAll();
      utils.showAlert("error", "", "Error while deleting adlist with ID " + id, jqXHR.responseText);
      console.log(exception); // eslint-disable-line no-console
    }
  });
}

// Vulnerability class: CWE-862
this.defaultFilename,!0);q.getHash=function(){return k};this.fileLoaded(q);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=null!=c.interval?parseInt(c.interval):6E4,A=null,z=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(n){M===this.currentPage&&(200<=

// Vulnerability class: CWE-20
function minErr(module, ErrorConstructor) {
  ErrorConstructor = ErrorConstructor || Error;
  return function() {
    var SKIP_INDEXES = 2;

    var templateArgs = arguments,
      code = templateArgs[0],
      message = '[' + (module ? module + ':' : '') + code + '] ',
      template = templateArgs[1],
      paramPrefix, i;

    message += template.replace(/\{\d+\}/g, function(match) {
      var index = +match.slice(1, -1),
        shiftedIndex = index + SKIP_INDEXES;

      if (shiftedIndex < templateArgs.length) {
        return toDebugString(templateArgs[shiftedIndex]);
      }

      return match;
    });

    message += '\nhttp://errors.angularjs.org/"NG_VERSION_FULL"/' +
      (module ? module + '/' : '') + code;

    for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
      message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
        encodeURIComponent(toDebugString(templateArgs[i]));
    }

    return new ErrorConstructor(message);
  };
}

// Vulnerability class: CWE-74
(T=mxUtils.getTextContent(N[0]),T=Graph.decompress(T,null,J),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||E||(N=null,"diagram"==u.nodeName?N=u:"mxfile"==
u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,J)));null==u||"mxGraphModel"==u.nodeName||E&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,E){var J=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<J.length?(u=Graph.decompress(J,null,E),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),

// Vulnerability class: CWE-20
function add (args, where, cb) {
  // this is hot code.  almost everything passes through here.
  // the args can be any of:
  // ['url']
  // ['pkg', 'version']
  // ['pkg@version']
  // ['pkg', 'url']
  // This is tricky, because urls can contain @
  // Also, in some cases we get [name, null] rather
  // that just a single argument.

  var usage = 'Usage:\n' +
              '    npm cache add <tarball-url>\n' +
              '    npm cache add <pkg>@<ver>\n' +
              '    npm cache add <tarball>\n' +
              '    npm cache add <folder>\n'
  var spec

  log.silly('cache add', 'args', args)

  if (args[1] === undefined) args[1] = null

  // at this point the args length must ==2
  if (args[1] !== null) {
    spec = args[0] + '@' + args[1]
  } else if (args.length === 2) {
    spec = args[0]
  }

  log.verbose('cache add', 'spec', spec)

  if (!spec) return cb(usage)

  adding++
  cb = afterAdd(cb)

  realizePackageSpecifier(spec, where, function (err, p) {
    if (err) return cb(err)

    log.silly('cache add', 'parsed spec', p)

    switch (p.type) {
      case 'local':
      case 'directory':
        addLocal(p, null, cb)
        break
      case 'remote':
        // get auth, if possible
        mapToRegistry(spec, npm.config, function (err, uri, auth) {
          if (err) return cb(err)

          addRemoteTarball(p.spec, { name: p.name }, null, auth, cb)
        })
        break
      case 'git':
      case 'hosted':
        addRemoteGit(p.rawSpec, cb)
        break
      default:
        if (p.name) return addNamed(p.name, p.spec, null, cb)

        cb(new Error("couldn't figure out how to install " + spec))
    }
  })
}

// Vulnerability class: CWE-200
window.location.hash=null!=x?x.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),

// Vulnerability class: CWE-20
E+J+Y(T^4294967295);N+=u.substring(ba-8,u.length);break}N+=u.substring(ba-8,ba-4+ea);Q(u,ea);Q(u,4)}while(ea);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,E){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=

// Vulnerability class: CWE-20
async function doIt() {
            await test.server.serverCertificateManager.trustCertificate(certificate);
            const issuerCertificateFile = m("CA/public/cacert.pem");
            const issuerCertificateRevocationListFile = m("CA/crl/revocation_list.der");
            const issuerCertificate = readCertificate(issuerCertificateFile);
            const issuerCrl = await readCertificateRevocationList(issuerCertificateRevocationListFile);
            await test.server.serverCertificateManager.addIssuer(issuerCertificate);
            await test.server.serverCertificateManager.addRevocationList(issuerCrl);
            callback();
          }

// Vulnerability class: CWE-400
computedMember: function(left, right, context, create) {
    return function(scope, locals, assign, inputs) {
      var lhs = left(scope, locals, assign, inputs);
      var rhs;
      var value;
      if (lhs != null) {
        rhs = right(scope, locals, assign, inputs);
        rhs = getStringValue(rhs);
        if (create && create !== 1) {
          if (lhs && !(lhs[rhs])) {
            lhs[rhs] = {};
          }
        }
        value = lhs[rhs];
      }
      if (context) {
        return {context: lhs, name: rhs, value: value};
      } else {
        return value;
      }
    };
  },

// Vulnerability class: CWE-74
Da.addListener("stateChanged",function(){La.style.opacity=Da.enabled?"":"0.1"});var Aa=function(){Na.style.display=0<F.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Fa.style.display=Na.style.display;Na.style.opacity=za.enabled?"":"0.1";Fa.style.opacity=Ga.enabled?"":"0.1"};Q.appendChild(Na);Q.appendChild(Fa);za.addListener("stateChanged",Aa);Ga.addListener("stateChanged",Aa);Aa();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft=

// Vulnerability class: CWE-20
function e(F){F.dataTransfer.dropEffect=null!=z?"move":"copy";F.stopPropagation();F.preventDefault()}function g(F){F.stopPropagation();F.preventDefault();y=!1;L=D(F);if(null!=z)null!=L&&L<v.children.length?(k.splice(L>z?L-1:L,0,k.splice(z,1)[0]),v.insertBefore(v.children[z],v.children[L])):(k.push(k.splice(z,1)[0]),v.appendChild(v.children[z]));else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,K(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var G=
decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){c(G,null,0,0,N.width,N.height);v.scrollTop=v.scrollHeight})}F.stopPropagation();F.preventDefault()}var k=[];l=document.createElement("div");l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";l.appendChild(m);mxUtils.write(m,mxResources.get("filename")+

// Vulnerability class: CWE-20
function editClient() {
  var elem = $(this).attr("id");
  var tr = $(this).closest("tr");
  var id = tr.attr("data-id");
  var groups = tr.find("#multiselect_" + id).val();
  var ip = tr.find("#ip_" + id).text();
  var name = tr.find("#name_" + id).text();
  var comment = tr.find("#comment_" + id).val();

  var done = "edited";
  var notDone = "editing";
  switch (elem) {
    case "multiselect_" + id:
      done = "edited groups of";
      notDone = "editing groups of";
      break;
    case "comment_" + id:
      done = "edited comment of";
      notDone = "editing comment of";
      break;
    default:
      alert("bad element or invalid data-id!");
      return;
  }

  if (name.length > 0) {
    ip += " (" + name + ")";
  }

  utils.disableAll();
  utils.showAlert("info", "", "Editing client...", ip);
  $.ajax({
    url: "scripts/pi-hole/php/groups.php",
    method: "post",
    dataType: "json",
    data: {
      action: "edit_client",
      id: id,
      groups: groups,
      token: token,
      comment: comment
    },
    success: function (response) {
      utils.enableAll();
      if (response.success) {
        utils.showAlert("success", "fas fa-pencil-alt", "Successfully " + done + " client", ip);
        table.ajax.reload(null, false);
      } else {
        utils.showAlert(
          "error",
          "Error while " + notDone + " client with ID " + id,
          response.message
        );
      }
    },
    error: function (jqXHR, exception) {
      utils.enableAll();
      utils.showAlert(
        "error",
        "",
        "Error while " + notDone + " client with ID " + id,
        jqXHR.responseText
      );
      console.log(exception); // eslint-disable-line no-console
    }
  });
}

// Vulnerability class: CWE-862
Menus.prototype.createMenubar=function(n){var y=v.apply(this,arguments);if(null!=y&&"1"!=urlParams.noLangIcon){var K=this.get("language");if(null!=K){K=y.addMenu("",K.funct);K.setAttribute("title",mxResources.get("language"));K.style.width="16px";K.style.paddingTop="2px";K.style.paddingLeft="4px";K.style.zIndex="1";K.style.position="absolute";K.style.display="block";K.style.cursor="pointer";K.style.right="17px";"atlas"==uiTheme?(K.style.top="6px",K.style.right="15px"):K.style.top="min"==uiTheme?"2px":
"0px";var B=document.createElement("div");B.style.backgroundImage="url("+Editor.globeImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="19px 19px";B.style.position="absolute";B.style.height="19px";B.style.width="19px";B.style.marginTop="2px";B.style.zIndex="1";K.appendChild(B);mxUtils.setOpacity(K,40);"1"==urlParams.winCtrls&&(K.style.right="95px",K.style.width="19px",K.style.height="19px",K.style.webkitAppRegion="no-drag",B.style.webkitAppRegion=
"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)K.style.opacity="0.85",K.style.filter="invert(100%)";document.body.appendChild(K);y.langIcon=K}}return y}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var n=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(y){if(0<y.length)try{var K=JSON.parse(y);

// Vulnerability class: CWE-20
T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var E=mxUtils.getTextContent(u),J=null;0<E.length?J=Graph.decompress(E):null!=u.firstChild&&(J=mxUtils.getXml(u.firstChild));return J};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var E=u.indexOf("EmbeddedFile");if(-1<E){var J=u.indexOf("stream",E)+9;if(0<u.substring(E,J).indexOf("application#2Fvnd.jgraph.mxfile"))return E=

// Vulnerability class: CWE-20
function(c,e){var g=document.createElement("div"),k=this.editor.graph,m=k.getLinkForCell(e);null!=m&&k.setLinkForCell(e,this.updatePageLink(c,m));if(k.isHtmlLabel(e)){g.innerHTML=k.sanitizeHtml(k.getLabel(e));for(var q=g.getElementsByTagName("a"),v=!1,x=0;x<q.length;x++)m=q[x].getAttribute("href"),null!=m&&(q[x].setAttribute("href",this.updatePageLink(c,m)),v=!0);v&&k.labelChanged(e,g.innerHTML)}for(x=0;x<k.model.getChildCount(e);x++)this.updatePageLinksForCell(c,k.model.getChildAt(e,x))};EditorUi.prototype.updatePageLink=

// Vulnerability class: CWE-20
y.y,n.width/K,n.height/K,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(y){if(0<y.length)try{var K=function(J){function E(I){if(null==C[I]){if(C[I]=!0,null!=U[I]){for(;0<U[I].length;){var T=U[I].pop();E(T)}delete U[I]}}else mxLog.debug(H+": Visited: "+I)}var H=J.parentNode.id,S=J.childNodes;J={};
for(var U={},Q=null,W={},V=0;V<S.length;V++){var X=S[V];if(null!=X.id&&0<X.id.length)if(null==J[X.id]){J[X.id]=X.id;var p=X.getAttribute("parent");null==p?null!=Q?mxLog.debug(H+": Multiple roots: "+X.id):Q=X.id:(null==U[p]&&(U[p]=[]),U[p].push(X.id))}else W[X.id]=X.id}S=Object.keys(W);0<S.length?(S=H+": "+S.length+" Duplicates: "+S.join(", "),mxLog.debug(S+" (see console)")):mxLog.debug(H+": Checked");var C={};null==Q?mxLog.debug(H+": No root"):(E(Q),Object.keys(C).length!=Object.keys(J).length&&
(mxLog.debug(H+": Invalid tree: (see console)"),console.log(H+": Invalid tree",U)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var B=mxUtils.parseXml(y),F=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=F&&0<F.length)try{var G=d.getHashValueForPages(F);mxLog.debug("Checksum: ",G)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var N=B.getElementsByTagName("root");for(y=0;y<N.length;y++)K(N[y]);

// Vulnerability class: CWE-20
q(x)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,k)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var v=Editor.extractGraphModelFromPdf(c);null!=v&&(m=null,k=!0,c=v)}this.spinner.stop();this.openLocalFile(c,e,k,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(k){var m=
new FileReader;m.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,k.name,k,e)}catch(v){this.handleError(v)}});m.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==k.type.substring(0,5)&&"application/pdf"!==k.type||"image/svg"===k.type.substring(0,9)?m.readAsText(k):m.readAsDataURL(k)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,k,m){var q=this.getCurrentFile(),v=mxUtils.bind(this,function(){window.openFile=

// Vulnerability class: CWE-20
function baseExtend(dst, objs, deep) {
  var h = dst.$$hashKey;

  for (var i = 0, ii = objs.length; i < ii; ++i) {
    var obj = objs[i];
    if (!isObject(obj) && !isFunction(obj)) continue;
    var keys = Object.keys(obj);
    for (var j = 0, jj = keys.length; j < jj; j++) {
      var key = keys[j];
      var src = obj[key];

      if (deep && isObject(src)) {
        if (isDate(src)) {
          dst[key] = new Date(src.valueOf());
        } else if (isRegExp(src)) {
          dst[key] = new RegExp(src);
        } else if (src.nodeName) {
          dst[key] = src.cloneNode(true);
        } else if (isElement(src)) {
          dst[key] = src.clone();
        } else {
          if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
          baseExtend(dst[key], [src], true);
        }
      } else {
        dst[key] = src;
      }
    }
  }

  setHashKey(dst, h);
  return dst;
}

// Vulnerability class: CWE-74
"...");mxEvent.addListener(K,"click",function(J){function E(){c(H,S,function(U){g(S);b.addComment(U,function(Q){U.id=Q;F.push(U);m(S)},function(Q){k(S);E();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),S=q(H,F,null,0);E();J.preventDefault();mxEvent.consume(J)});y.appendChild(K)}K=L.cloneNode();K.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';K.setAttribute("title",mxResources.get("showResolved"));

// Vulnerability class: CWE-20
mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(B&&b.hideDialog(),O=!y.model.contains(A),!B||O||I!=q){I=Graph.compress(I);y.getModel().beginUpdate();try{if(O){var t=b.editor.graph.getFreeInsertPoint();A.geometry.x=t.x;A.geometry.y=t.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+I+")",[A])}catch(z){throw z;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,

// Vulnerability class: CWE-20
module.exports.isRepositoryClean = function (callback) {
  cp.exec(gitApp + ' ' + [ 'ls-files', '-m' ].join(' '), gitExtra, function (er, stdout, stderr) {
    // makeCommit parly inspired and taken from NPM version module
    var lines = stdout.trim().split('\n').filter(function (line) {
      var file = path.basename(line.replace(/.{1,2}\s+/, ''));
      return line.trim() && !line.match(/^\?\? /) && !fUtils.isPackageFile(line);
    }).map(function (line) {
      return line.trim()
    });

    if (lines.length) {
      return callback(new Error('Git working directory not clean.\n'+lines.join('\n')));
    }
    return callback();
  });
};

// Vulnerability class: CWE-77
Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=p.apply(this,arguments);
this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,J=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return J.shadowVisible},function(N){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;J.model.execute(Q)},{install:function(N){this.listener=function(){N(J.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||
(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));u.appendChild(T)}return u};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=q.apply(this,arguments);var E=this.editorUi,J=E.editor.graph;if(J.isEnabled()){var T=E.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var N=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(R){E.editor.setAutosave(R);E.editor.autosave&&

// Vulnerability class: CWE-20
DotObject.prototype._cleanup = function (obj) {
  var ret
  var i
  var keys
  var root
  if (this.cleanup.length) {
    for (i = 0; i < this.cleanup.length; i++) {
      keys = this.cleanup[i].split('.')
      root = keys.splice(0, -1).join('.')
      ret = root ? this.pick(root, obj) : obj
      ret = ret[keys[0]].filter(function (v) { return v !== undefined })
      this.set(this.cleanup[i], ret, obj)
    }
    this.cleanup = []
  }
}

// Vulnerability class: CWE-74
0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(v){if(null!=v){var x=v.lastIndexOf(".");0<x&&(v=v.substring(x+1,v.length));null==e[v]&&(e[v]=!0)}}var k=this.editor.graph,m=k.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));k.model.isEdge(c)&&
(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=k.model.getChildCount(c);for(var q=0;q<m;q++)this.addBasenamesForCell(k.model.getChildAt(c,q),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=

// Vulnerability class: CWE-20
(q.parentNode.removeChild(q),q=null)});null!=X&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(X,function(I){C(I,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,W)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(I){4==I.readyState&&(this.spinner.stop(),200<=I.status&&299>=I.status?C(I.responseText,"text/xml"):this.handleError({message:mxResources.get(413==I.status?"drawingTooLarge":"invalidOrMissingFile")},
mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):C(J,E)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(x,"dragleave",function(N){x.style.cursor="";x.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));z.insertBefore(L,z.firstChild);mxEvent.addListener(L,"click",K);mxEvent.addListener(x,

// Vulnerability class: CWE-20
escape: function(value) {
    if (isString(value)) return '\'' + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + '\'';
    if (isNumber(value)) return value.toString();
    if (value === true) return 'true';
    if (value === false) return 'false';
    if (value === null) return 'null';
    if (typeof value === 'undefined') return 'undefined';

    throw $parseMinErr('esc', 'IMPOSSIBLE');
  },

// Vulnerability class: CWE-74