code
stringlengths
12
2.05k
label_name
stringclasses
5 values
label
int64
0
4
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft= "8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){d=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW, 0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
Base
1
"#ffffff")),Da=mxUtils.setStyle(Da,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_STROKECOLOR,"#000000")),Da=mxUtils.setStyle(Da,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Fa[Ea])&&(Da=mxUtils.setStyle(Da,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Fa[Ea],Da)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";
Class
2
constructor(options) { this.name = "default"; this.optsSettings = options.settings; this.View = options.view; this.request = options.request; this.renditionQueue = options.queue; this.q = new Queue(this); this.settings = extend(this.settings || {}, { infinite: true, hidden: false, width: undefined, height: undefined, axis: undefined, writingMode: undefined, flow: "scrolled", ignoreClass: "", fullsize: undefined }); extend(this.settings, options.settings || {}); this.viewSettings = { ignoreClass: this.settings.ignoreClass, axis: this.settings.axis, flow: this.settings.flow, layout: this.layout, method: this.settings.method, // srcdoc, blobUrl, write width: 0, height: 0, forceEvenPages: true }; this.rendered = false; }
Base
1
moveup = function(hash) { var self = $('#'+hash2id(hash)), tgt = self.parent(), prev = tgt.prev('div'), cls = 'ui-state-hover', ctm = fm.getUI('contextmenu'); menuTimer && clearTimeout(menuTimer); if (prev.length) { ctm.find(':first').data('placesHash', hash); self.addClass(cls); tgt.insertBefore(prev); prev = tgt.prev('div'); menuTimer = setTimeout(function() { self.removeClass(cls); if (ctm.find(':first').data('placesHash') === hash) { ctm.hide().empty(); } }, 1500); } if(!prev.length) { self.removeClass(cls); ctm.hide().empty(); } },
Base
1
return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor== 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)};
Class
2
function usercheck_init_noacess(i) { var obj = document.getElementById('ajax_output'); obj.innerHTML = ''; if (i.value.length < 1) return; var err = new Array(); if (i.value.match(/[^A-Za-z0-9_]/)) err[err.length] = 'Username can only contain letters, numbers and underscores'; if (i.value.length < 3) err[err.length] = 'Username Too Short'; if (err != '') { obj.style.color = '#ff0000'; obj.innerHTML = err.join('<br />'); return; } var pqr = i.value; if (i.value.length >= 3) ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_noacess, usercheck_error); }
Base
1
M.scrollCellToVisible(M.getSelectionCell())}}}else{J=function(U){var Q=H[U];null==Q&&(Q=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),Q.vertex=!0,H[U]=Q,y.push(Q));return Q};var H={};y=[];for(F=0;F<z.length;F++)if(";"!=z[F].charAt(0)){var S=z[F].split("->");2<=S.length&&(N=J(S[0]),E=J(S[S.length-1]),S=new mxCell(2<S.length?S[1]:"",new mxGeometry),S.edge=!0,N.insertEdge(S,!0),E.insertEdge(S,!1),y.push(S))}if(0<y.length){z=document.createElement("div");z.style.visibility="hidden";
Class
2
showDetailedConfig: function (grid, rowIndex) { var data = grid.getStore().getAt(rowIndex); var type = data.data.type; var definition = data.data.definition; if (definition) { definition = Ext.util.JSON.decode(definition); definition.name = data.data.name; } else { definition = { name: data.data.name }; } definition.fieldtype = type; var keyDefinitionWindow = new pimcore.object.classificationstore.keyDefinitionWindow( definition, data.id, this); keyDefinitionWindow.show(); },
Base
1
App.prototype.fileCreated=function(b,f,l,d,u){var t=window.location.pathname;null!=f&&0<f.length&&(t+="?libs="+f);null!=u&&0<u.length&&(t+="?clibs="+u);t=this.getUrl(t);b.getMode()!=App.MODE_DEVICE&&(t+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var c=window.location.protocol+"//"+window.location.hostname+t,e=D,g=null;null!=D&&/\.svg$/i.test(b.getTitle())&& (g=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(g.container),e=this.decodeNodeIntoGraph(e,g));b.setData(this.createFileData(D,g,b,c));null!=g&&g.container.parentNode.removeChild(g.container);var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){k();var q=this.getCurrentFile();null==l&&null!=q&&(l=!q.isModified()&&null==q.getMode());var v=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);l&&b.addAllSavedStatus(); null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var A=[],z=u.split(";"),L=0;L<z.length;L++)A.push(decodeURIComponent(z[L]));this.loadLibraries(A)}}),x=mxUtils.bind(this,function(){l||null==q||!q.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(), null==b.getMode())),null!=d&&d(),window.openWindow(t,null,x))});b.constructor==LocalFile?m():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(q){k();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
Class
2
done = function(data) { data.warning && self.error(data.warning); cmd == 'open' && open($.extend(true, {}, data)); // fire some event to update cache/ui data.removed && data.removed.length && self.remove(data); data.added && data.added.length && self.add(data); data.changed && data.changed.length && self.change(data); // fire event with command name self.trigger(cmd, data); // force update content data.sync && self.sync(); },
Base
1
Wa,Xa,K,Ga,Ja,Ia,Ha);c.stroke()};Ea.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Ea.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Ea.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Ea.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
Base
1
this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){K.apply(this, arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,S){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
Class
2
RuleEngine.prototype.toJSON = function() { var rules = this.rules; if (rules instanceof Array) { rules = rules.map(function(rule) { rule.condition = rule.condition.toString(); rule.consequence = rule.consequence.toString(); return rule; }); } else if (typeof(rules) != "undefined") { rules.condition = rules.condition.toString(); rules.consequence = rules.consequence.toString(); } return rules; };
Base
1
"checked"),O.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(J){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,C);l.addListener(mxEvent.CELLS_RESIZED,C);var X=l.graphHandler.mouseUp,u=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){u.apply(this,arguments);k.style.backgroundColor=""};l.dblClick=
Class
2
'binary&&': function(left, right, context) { return function(scope, locals, assign, inputs) { var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs); return context ? {value: arg} : arg; }; },
Class
2
S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Pa){null!=S&&S(Pa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta= va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"==
Class
2
getItemHtml: function (value) { var translatedValue = this.translatedOptions[value] || value; var html = '' + '<div class="list-group-item link-with-role form-inline" data-value="' + value + '">' + '<div class="pull-left" style="width: 92%; display: inline-block;">' + '<input data-name="translatedValue" data-value="' + value + '" class="role form-control input-sm" value="'+translatedValue+'">' + '</div>' + '<div style="width: 8%; display: inline-block; vertical-align: top;">' + '<a href="javascript:" class="pull-right" data-value="' + value + '" data-action="removeValue"><span class="fas fa-times"></a>' + '</div><br style="clear: both;" />' + '</div>'; return html; },
Base
1
context.after = function(fn){ suites[0].afterAll(fn); };
Base
1
mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor= a;this.node.style.borderColor=b;a=document.createElement("img");a.setAttribute("border","0");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");a.style.filter!=b&&(a.style.filter=b);"image"== a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}mxUtils.extend(mxLabel,mxRectangleShape);
Base
1
function(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={}); for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;/*
Base
1
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=
Base
1
this.convertImages(ea.getSvg(null,null,aa,ua,null,R,null,null,null,ha,null,Aa,Fa,xa),mxUtils.bind(this,function(Ba){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var Ia=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ka,0,0);p(Ea,Ba)},0):(za.drawImage(Ka,0,0),p(Ea,Ba))},Ea=document.createElement("canvas"),Ca=parseInt(Ba.getAttribute("width")),Ma=parseInt(Ba.getAttribute("height"));Y=null!=Y?Y:1;null!=C&&(Y=O?Math.min(1,Math.min(3*C/(4*Ma),C/Ca)):C/Ca);Y=this.getMaxCanvasScale(Ca,
Class
2
k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,"readwrite");m.oncomplete=e;m.onerror=g;for(var q=0;q<k.length;q++)m.objectStore(k[q]).delete(c[q])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var q=m.transaction([k],"readonly").objectStore(k).get(c);q.onsuccess=function(){e(q.result)};
Class
2
1E3<=F&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=F||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var M=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=M.apply(this,arguments);
Base
1
"4px";pa.style.margin="2px";pa.style.border="1px solid black";pa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){pa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function R(za,ta,ka,pa,sa,ya,va){null!=ta&&(ta=ta.split(","), aa.push({name:za,values:ta,type:ka,defVal:pa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:va}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ra){for(var wa=ya,fa=0;null!=wa.nextSibling;)if(wa.nextSibling.getAttribute("data-pName")==za)wa=wa.nextSibling,fa++;else break;var ca={type:ka,parentRow:ya,index:fa,isDeletable:!0,defVal:pa,countProperty:sa};fa=ha(za,"",ca,0==fa%2,va);T(za,pa,ca);wa.parentNode.insertBefore(fa,wa.nextSibling);mxEvent.consume(ra)}));btn.style.height="16px";btn.style.width= "25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,pa,sa,ya,va){if(0<sa){var ra=Array(sa);ta=null!=ta?ta.split(","):[];for(var wa=0;wa<sa;wa++)ra[wa]=null!=ta[wa]?ta[wa]:null!=pa?pa:"";aa.push({name:za,values:ra,type:ka,defVal:pa,parentRow:ya,flipBkg:va,size:sa})}return document.createElement("div")}function da(za,ta,ka){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==ta;mxEvent.addListener(pa,"change",function(){T(za,pa.checked?"1":"0",ka)});return pa}function ha(za,
Class
2
function iterateMustacheNode (node) { const list = $(node).contents().toArray() list.forEach(item => { if (item.type === 'text') { const rawText = $(item).text() if (rawText.indexOf('{{') >= 0 && rawText.indexOf('}}') > 1) { $(item).parent().attr('v-pre', true) } } else { iterateMustacheNode(item) } }) }
Base
1
let cb = function() { let sent = 0; if (++returned === total) { expect(pool._connections.length).to.be.above(1); pool._connections.forEach(function(conn) { expect(conn.messages).to.be.above(1); sent += conn.messages; }); expect(sent).to.be.equal(total); pool.close(); return done(); } };
Base
1
function onSuccess(info) { sshstream.removeListener('CHANNEL_OPEN_FAILURE:' + localChan, onFailure); sshstream.removeListener('CHANNEL_CLOSE:' + localChan, onFailure); var chaninfo = { type: type, incoming: { id: localChan, window: initWindow, packetSize: maxPacket, state: 'open' }, outgoing: { id: info.sender, window: info.window, packetSize: info.packetSize, state: 'open' } }; cb(undefined, new Channel(chaninfo, self)); }
Base
1
create = function(dir, hash) { return $(tpl.replace(/\{id\}/, hash2id(dir? dir.hash : hash)) .replace(/\{name\}/, fm.escape(dir? dir.name : hash)) .replace(/\{cssclass\}/, dir? (fm.UA.Touch ? 'elfinder-touch ' : '')+fm.perms2class(dir) : '') .replace(/\{permissions\}/, (dir && (!dir.read || !dir.write))? ptpl : '') .replace(/\{title\}/, (dir && dir.path)? fm.escape(dir.path) : '') .replace(/\{symlink\}/, '') .replace(/\{style\}/, '')); },
Base
1
addExtension({ zipFile }) { checkAuthentication(this) const regex = /^data:.+\/(.+);base64,(.*)$/ const matches = zipFile.match(regex) const data = matches[2] let zip if (data) { zip = new AdmZip(Buffer.from(data, 'base64')) } else { return new Meteor.Error('Invalid extension upload.') } const newExtension = {} for (const zipEntry of zip.getEntries()) { if (zipEntry.entryName === 'extension.json') { const extensionDetails = JSON.parse(zipEntry.getData().toString('utf-8')) extensionDetails.userId = this.userId extensionDetails.isActive = true Object.assign(newExtension, extensionDetails) } if (zipEntry.entryName === 'client.js') { newExtension.client = zipEntry.getData().toString('utf-8') } if (zipEntry.entryName === 'server.js') { newExtension.server = zipEntry.getData().toString('utf-8') } } if (!Extensions.findOne({ name: newExtension.name })) { Extensions.insert(newExtension) return 'notifications.success' } return new Meteor.Error('Extension has been added before.') },
Class
2
getValidator: function (field) { let listOfValidators = [], fieldData = field.data(), fieldInfo = fieldData.fieldinfo; if (typeof fieldInfo === 'string') { fieldInfo = JSON.parse(fieldInfo); } let dataValidator = 'validator', moduleEle = field.closest('form').find('[name="module"]'); if (Vtiger_Base_Validator_Js.moduleName === false && moduleEle.length > 0) { Vtiger_Base_Validator_Js.moduleName = moduleEle.val(); } let fieldInstance = Vtiger_Field_Js.getInstance(fieldInfo), validatorsOfType = Vtiger_Base_Validator_Js.getValidatorsFromFieldType(fieldInstance), key, value; for (key in validatorsOfType) { //IE for loop fix if (!validatorsOfType.hasOwnProperty(key)) { continue; } value = validatorsOfType[key]; if (value !== '') { listOfValidators.push({ name: value }); } } if (fieldData.hasOwnProperty(dataValidator)) { let specialValidators = fieldData[dataValidator]; for (key in specialValidators) { //IE for loop fix if (!specialValidators.hasOwnProperty(key)) { continue; } let specialValidator = specialValidators[key], tempSpecialValidator = jQuery.extend({}, specialValidator), validatorOfNames = Vtiger_Base_Validator_Js.getValidatorClassName(specialValidator.name); if (validatorOfNames !== '') { tempSpecialValidator.name = validatorOfNames; if (!jQuery.isEmptyObject(tempSpecialValidator)) { listOfValidators.push(tempSpecialValidator); } } } } return listOfValidators; },
Class
2
function removeHidden(files) { return files.filter(function(file){ return '.' != file[0]; }); }
Base
1
folderId:Q,siteId:R});ja="/drives/"+R+(Q?"/items/"+Q:"/root")+"/children";break;case "search":N=S;M=[{driveId:N,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));ja=N?"/drives/"+N+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==Q?M=[{driveId:N}]:M.push({name:Y,driveId:N,folderId:Q}),ja=(N?"/drives/"+N:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}fa||(ja+=(0<ja.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl"); f(ja,function(ra){if(Z){clearTimeout(aa);ra=ra.value||[];for(var Ca=x||fa?ra:[],za=0;!fa&&!x&&za<ra.length;za++){var Ga=ra[za],Na=Ga.file?Ga.file.mimeType:null;(Ga.folder||"text/html"==Na||"text/xml"==Na||"application/xml"==Na||"image/png"==Na||/\.svg$/.test(Ga.name)||/\.html$/.test(Ga.name)||/\.xml$/.test(Ga.name)||/\.png$/.test(Ga.name)||/\.drawio$/.test(Ga.name)||/\.drawiolib$/.test(Ga.name))&&Ca.push(Ga)}ea(Ca)}},function(ra){if(Z){clearTimeout(aa);var Ca=null;try{Ca=JSON.parse(ra.responseText).error.message}catch(za){}d(mxResources.get("errorFetchingFolder", null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));V=!1;P.stop()}})}}function L(N){J.className=J.className.replace("odCatSelected","");J=N;J.className+=" odCatSelected"}function C(N){V||(T=null,z("search",null,null,null,N))}var D="";null==e&&(e=I,D='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var N=null;try{N=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return N});null==n&&(n=function(N){if(null!=N){var Q=m()||{};delete N["@microsoft.graph.downloadUrl"];
Base
1
g&&g(q)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(J){var E=new mxCellOverlay(J.image||m.warningImage,J.tooltip,J.align,J.valign,J.offset);E.addListener(mxEvent.CLICK,function(H,S){k.alert(J.tooltip)});return E}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,q=m.getModel();q.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var x=q.getCell(c.getAttribute("id"));
Class
2
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"!= m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(q);isLocalStorage&&m++;var A=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(z,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var M=new EmbedDialog(this,c);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var n=window.open("about:blank");null==n?mxUtils.popup(c,!0):(n.document.write("<pre>"+mxUtils.htmlEntities(c, !1)+"</pre>"),n.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,z,g,k,null,x):null!=z&&0<z.length&&this.pickFolder(L,mxUtils.bind(this,function(y){try{this.exportFile(c,z,g,k,L,y)}catch(K){this.handleError(K)}}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,v,null,1<m,A,c,g,k);q=this.isServices(m)?m>A?390:280:160;this.showDialog(e.container,420,q,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
Class
2
z=this.graph.getLinkForCell(this.state.cell);B=this.graph.getLinksForState(this.state);this.updateLinkHint(z,B);if(null!=z||null!=B&&0<B.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding= "6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var B=document.createElement("img");B.setAttribute("src",Editor.editImage);B.setAttribute("title", mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";Editor.isDarkMode()&&(B.style.filter="invert(100%)");this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(M){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(M)}));var E=B.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt", [mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(M){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(M)}))}if(null!=z)for(B=0;B<z.length;B++){var G=document.createElement("div");G.style.marginTop=null!=t||0<B?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(M){}};
Base
1
Tine.Addressbook.ContactGridPanel.countryRenderer = function(data) { data = Locale.getTranslationData('CountryList', data); return data; };
Base
1
updateState: function(rfb, state, oldstate) { var msg; document.documentElement.classList.remove("noVNC_connecting"); document.documentElement.classList.remove("noVNC_connected"); document.documentElement.classList.remove("noVNC_disconnecting"); switch (state) { case 'connecting': document.getElementById("noVNC_transition_text").innerHTML = _("Connecting..."); document.documentElement.classList.add("noVNC_connecting"); break; case 'connected': UI.connected = true; document.documentElement.classList.add("noVNC_connected"); if (rfb && rfb.get_encrypt()) { msg = _("Connected (encrypted) to ") + UI.desktopName; } else { msg = _("Connected (unencrypted) to ") + UI.desktopName; } UI.showStatus(msg); break; case 'disconnecting': UI.connected = false; document.getElementById("noVNC_transition_text").innerHTML = _("Disconnecting..."); document.documentElement.classList.add("noVNC_disconnecting"); break; case 'disconnected': UI.showStatus(_("Disconnected")); break; default: msg = "Invalid UI state"; Util.Error(msg); UI.showStatus(msg, 'error'); break; } UI.updateVisualState(); },
Base
1
function(P,K){0<D.getSelectionCount()?(C.appendChild(G),G.innerHTML="Selected: "+D.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left= parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(D){mxEvent.getSource(D)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(da,ca,la){var ia=F.menus.get(da),ma=M.addMenu(mxResources.get(da),
Base
1
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Base
1
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
Class
2
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow|| "width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML= a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}};
Base
1
mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(z&&b.hideDialog(),M=!x.model.contains(A),!z||M||L!=q){L=Graph.compress(L);x.getModel().beginUpdate();try{if(M){var n=b.editor.graph.getFreeInsertPoint();A.geometry.x=n.x;A.geometry.y=n.y;x.addCell(A)}x.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+L+")",[A])}catch(y){throw y;}finally{x.getModel().endUpdate()}M&&(x.setSelectionCell(A),x.scrollCellToVisible(A))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,
Base
1
[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(V,M){var W=null!=M&&y.isTreeEdge(M);W&&0>mxUtils.indexOf(S,M)&&S.push(M);(null==M||W)&&0>mxUtils.indexOf(S,V)&&S.push(V);return null==M||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", "Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H); this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){K.apply(this,
Base
1
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Base
1
function addMenu(id, small, img) { var menu = ui.menus.get(id); var elt = menuObj.addMenu(mxResources.get(id), mxUtils.bind(this, function() { // Allows extensions of menu.functid menu.funct.apply(this, arguments); }), before); elt.className = (urlParams['sketch'] == '1') ? 'geToolbarButton' : 'geMenuItem'; elt.style.display = 'inline-block'; elt.style.boxSizing = 'border-box'; elt.style.top = '6px'; elt.style.marginRight = '6px'; elt.style.height = '30px'; elt.style.paddingTop = '6px'; elt.style.paddingBottom = '6px'; elt.style.cursor = 'pointer'; elt.setAttribute('title', mxResources.get(id)); ui.menus.menuCreated(menu, elt, 'geMenuItem'); if (img != null) { elt.style.backgroundImage = 'url(' + img + ')'; elt.style.backgroundPosition = 'center center'; elt.style.backgroundRepeat = 'no-repeat'; elt.style.backgroundSize = '24px 24px'; elt.style.width = '34px'; elt.innerHTML = ''; } else if (!small) { elt.style.backgroundImage = 'url(' + mxWindow.prototype.normalizeImage + ')'; elt.style.backgroundPosition = 'right 6px center'; elt.style.backgroundRepeat = 'no-repeat'; elt.style.paddingRight = '22px'; } return elt; };
Base
1
0;P<Q.length;P++)Q[P].parentNode.removeChild(Q[P]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(P=0;P<Q.length;P++)O.removeChild(Q[P]);for(P=0;P<F.length;P++)if(F[P]==I){F.splice(P,1);break}M.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(P){l(X);b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(P){function Q(){var S= P.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ba=V(I).replies,da=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=da;for(var ja=ba[Z].querySelectorAll(".geCommentAction"),ea=0;ea<ja.length;ea++)ja[ea]!=S.parentNode&&(ja[ea].style.display=Y);B||(ba[Z].style.display="none")}v()}I.isResolved?U(mxResources.get("reOpened")+
Base
1
function makeParentPath (dir) { return correctMkdir(path.dirname(dir)) }
Class
2
new Menu(mxUtils.bind(this,function(Q,W){for(var V=0;V<S.length;V++)"-"==S[V]?Q.addSeparator(W):U(Q,W,mxResources.get(S[V])+"...",S[V])})))};EditorUi.prototype.installFormatToolbar=function(B){var F=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";F.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, function(N,J){0<F.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+F.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var y=!1;EditorUi.prototype.initFormatWindow=function(){if(!y&&null!=this.formatWindow){y=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
Class
2
setup: function () { var data = this.model.get('data') || {}; this.userId = data.userId; this.messageData['entityType'] = Espo.Utils.upperCaseFirst((this.translate(data.entityType, 'scopeNames') || '').toLowerCase()); if (data.personEntityId) { this.messageData['from'] = '<a href="#' + data.personEntityType + '/view/' + data.personEntityId + '">' + data.personEntityName + '</a>'; } else { this.messageData['from'] = data.fromString || this.translate('empty address'); } this.emailId = data.emailId; this.emailName = data.emailName; this.createMessage(); }
Base
1
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!=
Base
1
function(A,z,L,M,n){q.apply(this,arguments);m()};t.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};t.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(t.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(A){t.clearCellOverlays();
Class
2
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Base
1
'binary<': function(left, right, context) { return function(scope, locals, assign, inputs) { var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs); return context ? {value: arg} : arg; }; },
Class
2
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){}}};
Base
1
gogo.Terminal = function(div, width, height, authHeader) { return new this.Terminal_ctor(div, width, height, authHeader); }
Compound
4
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
Class
2
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, 1),!1));return c};bb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Za.prototype.getConstraints=
Base
1
return scope.$watch(function expressionInputsWatch(scope) { var changed = false; for (var i = 0, ii = inputExpressions.length; i < ii; i++) { var newInputValue = inputExpressions[i](scope); if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) { oldInputValues[i] = newInputValue; oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue); } } if (changed) { lastResult = parsedExpression(scope, undefined, undefined, oldInputValues); } return lastResult; }, listener, objectEquality, prettyPrintExpression);
Class
2
Ya.height,Ua.y-Ya.y-Ya.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Ya){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Ua=T.getCellAt(Ya.getGraphX(),Ya.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Ua,Ya)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Ta){var za=T.view.getState(Ma[Ta]),wa=T.getCellGeometry(Ma[Ta]),
Class
2
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=
Class
2
function Md(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nekaj sekund":"nekaj sekundami";case"m":return b?"ena minuta":"eno minuto";case"mm":return e+=1===a?b?"minuta":"minuto":2===a?b||d?"minuti":"minutama":5>a?b||d?"minute":"minutami":b||d?"minut":"minutami";case"h":return b?"ena ura":"eno uro";case"hh":return e+=1===a?b?"ura":"uro":2===a?b||d?"uri":"urama":5>a?b||d?"ure":"urami":b||d?"ur":"urami";case"d":return b||d?"en dan":"enim dnem";case"dd":return e+=1===a?b||d?"dan":"dnem":2===a?b||d?"dni":"dnevoma":b||d?"dni":"dnevi";case"M":return b||d?"en mesec":"enim mesecem";case"MM":return e+=1===a?b||d?"mesec":"mesecem":2===a?b||d?"meseca":"mesecema":5>a?b||d?"mesece":"meseci":b||d?"mesecev":"meseci";case"y":return b||d?"eno leto":"enim letom";case"yy":return e+=1===a?b||d?"leto":"letom":2===a?b||d?"leti":"letoma":5>a?b||d?"leta":"leti":b||d?"let":"leti"}}function Nd(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"leS":-1!==a.indexOf("jar")?b.slice(0,-3)+"waQ":-1!==a.indexOf("DIS")?b.slice(0,-3)+"nem":b+" pIq"}function Od(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"Hu’":-1!==a.indexOf("jar")?b.slice(0,-3)+"wen":-1!==a.indexOf("DIS")?b.slice(0,-3)+"ben":b+" ret"}function Pd(a,b,c,d){var e=Qd(a);switch(c){case"mm":return e+" tup";case"hh":return e+" rep";case"dd":return e+" jaj";case"MM":return e+" jar";case"yy":return e+" DIS"}}function Qd(a){var b=Math.floor(a%1e3/100),c=Math.floor(a%100/10),d=a%10,e="";return b>0&&(e+=Sg[b]+"vatlh"),c>0&&(e+=(""!==e?" ":"")+Sg[c]+"maH"),d>0&&(e+=(""!==e?" ":"")+Sg[d]),""===e?"pagh":e}function Rd(a,b,c,d){var e={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[a+" míuts",""+a+" míuts"],h:["'n þora","'iensa þora"],hh:[a+" þoras",""+a+" þoras"],d:["'n ziua","'iensa ziua"],dd:[a+" ziuas",""+a+" ziuas"],M:["'n mes","'iens mes"],MM:[a+" mesen",""+a+" mesen"],y:["'n ar","'iens ar"],yy:[a+" ars",""+a+" ars"]};return d?e[c][0]:b?e[c][0]:e[c][1]}
Base
1
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
Class
2
exports.database.prototype.findKeys = function (key, notKey, callback) { var query="SELECT `key` FROM `store` WHERE `key` LIKE ?" , params=[] ; //desired keys are key, e.g. pad:% key=key.replace(/\*/g,'%'); params.push(key); if(notKey!=null && notKey != undefined){ //not desired keys are notKey, e.g. %:%:% notKey=notKey.replace(/\*/g,'%'); query+=" AND `key` NOT LIKE ?" params.push(notKey); } this.db.query(query, params, function(err,results) { var value = []; if(!err && results.length > 0) { results.forEach(function(val){ value.push(val.key); }); } callback(err,value); }); this.schedulePing(); }
Pillar
3
function Client() { if (!(this instanceof Client)) return new Client(); EventEmitter.call(this); this.config = { host: undefined, port: undefined, localAddress: undefined, localPort: undefined, forceIPv4: undefined, forceIPv6: undefined, keepaliveCountMax: undefined, keepaliveInterval: undefined, readyTimeout: undefined, username: undefined, password: undefined, privateKey: undefined, tryKeyboard: undefined, agent: undefined, allowAgentFwd: undefined, authHandler: undefined, hostHashAlgo: undefined, hostHashCb: undefined, strictVendor: undefined, debug: undefined }; this._readyTimeout = undefined; this._channels = undefined; this._callbacks = undefined; this._forwarding = undefined; this._forwardingUnix = undefined; this._acceptX11 = undefined; this._agentFwdEnabled = undefined; this._curChan = undefined; this._remoteVer = undefined; this._sshstream = undefined; this._sock = undefined; this._resetKA = undefined; }
Base
1
this.menus.addPopupMenuEditItems=function(D,G,P){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=g.getExportVariables;g.getExportVariables=function(){var D=I.apply(this,arguments),G=d.getCurrentFile();null!=
Base
1
function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var q=!0,v=window.setTimeout(mxUtils.bind(this,function(){q=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);
Class
2
return na}function C(){function oa(pa,na){var Ka=mxResources.get(pa);null==Ka&&(Ka=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ka.length&&(Ka=Ka.substring(0,18)+"&hellip;");return Ka+" ("+na.length+")"}function sa(pa,na,Ka){mxEvent.addListener(na,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ka?za[pa][Ka]:Ca[pa],W=null,O(!1))})}Fa&&(Fa=!1,mxEvent.addListener(Z,"scroll",function(pa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
Base
1
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
Base
1
$scope.clone = function(foreignSource) { var availableForeignSources = []; angular.forEach($scope.requisitionsData.requisitions, function(r) { if (r.foreignSource !== foreignSource) { availableForeignSources.push(r.foreignSource); } }); var modalInstance = $uibModal.open({ backdrop: 'static', keyboard: false, controller: 'CloneForeignSourceController', templateUrl: cloneForeignsourceView, resolve: { foreignSource: function() { return foreignSource; }, availableForeignSources: function() { return availableForeignSources; } } }); modalInstance.result.then(function(targetForeignSource) { bootbox.confirm('This action will override the existing foreign source definition for the requisition named ' + targetForeignSource + ', using ' + foreignSource + ' as a template. Are you sure you want to continue ? This cannot be undone.', function(ok) { if (!ok) { return; } RequisitionsService.startTiming(); RequisitionsService.cloneForeignSourceDefinition(foreignSource, targetForeignSource).then( function() { // success growl.success('The foreign source definition for ' + foreignSource + ' has been cloned to ' + targetForeignSource); }, $scope.errorHandler ); }); }); };
Base
1
setup: function () { var data = this.model.get('data'); this.assignedUserId = data.assignedUserId || null; this.assignedUserName = data.assignedUserName || null; this.messageData['assignee'] = '<a href="#User/view/' + data.assignedUserId + '">' + data.assignedUserName + '</a>'; if (this.isUserStream) { if (this.assignedUserId) { if (this.assignedUserId == this.model.get('createdById')) { this.messageName += 'Self'; } else { if (this.assignedUserId == this.getUser().id) { this.messageName += 'You'; } } } else { this.messageName += 'Void'; } } else { if (this.assignedUserId) { if (this.assignedUserId == this.model.get('createdById')) { this.messageName += 'Self'; } } else { this.messageName += 'Void'; } } this.createMessage(); },
Base
1
stream.end('Hello World HTTP\n'); break; } case '/invalid': res.writeHead(500, { 'Content-Type': 'text/plain' }); res.end('Hello World HTTP\n'); break; case '/auth': res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end(Buffer.from(req.headers.authorization.split(' ').pop(), 'base64')); break; case '/cookie': res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end(req.headers.cookie); break; case '/ua': res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end(req.headers['user-agent']); break; case '/post': { let body = []; req.on('readable', function() { let chunk; while ((chunk = req.read()) !== null) { body.push(chunk); } }); req.on('end', function() { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end(Buffer.concat(body)); }); break; } default: res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World HTTP\n'); }
Base
1
function updateLabel() { label.innerHTML = ''; label.style.cursor = 'pointer'; label.style.whiteSpace = 'nowrap'; label.style.textOverflow = 'ellipsis'; mxUtils.write(label, (entry.title != null && entry.title.length > 0) ? entry.title : mxResources.get('untitled')); if (entry.title == null || entry.title.length == 0) { label.style.color = '#d0d0d0'; } else { label.style.color = ''; } };
Base
1
n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var D=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(D,G)},z);P&&t.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
Class
2
formatResult: function (circle) { return circle.name; },
Base
1
"dblclick",function(La){n();mxEvent.consume(La)})}else if(!ja&&null!=pa&&0<pa.length){var Na=function(La){U.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";S.spin(Z);ma(pa,function(Ta,Ua){S.stop();null!=Ta&&(y(na,Ta,sa,null,null,ia,Ua),La&&n())})};ra=ba||TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png";na.style.backgroundImage="url("+ra+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!=
Base
1
let send = function() { if (i++ >= total) { return; } sendMessage(cb); setImmediate(send); };
Base
1
M.push(D);A.appendChild(D);var E=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";u(oa?-1:1);null==W&&(W=La);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,wa,ua){H=0;S.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML=""; Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];C()}else O(!0)};oa?q(J.value,sa):p(sa)};p&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),A.appendChild(D),M.push(D));if(q){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(D);var J=document.createElement("input");J.style.marginRight="10px";J.style.marginLeft="10px";J.style.width="220px";mxEvent.addListener(J,"keypress",function(oa){13==
Base
1
function compile(src) { var cached; if (typeof src !== "string") { throw new TypeError("src must be a string, instead saw '" + typeof src + "'"); } if (!compile.cache) { return parser.parse(src); } cached = compile.cache[src]; if (!cached) { cached = compile.cache[src] = parser.parse(src); } return cached; }
Class
2
attributeDisplayType(attributeValue) { if (this.isAttributeNumber(attributeValue)) { return 'number'; } if (this.isAttributeLink(attributeValue)) { return 'link'; } return 'text'; },
Base
1
App.Actions.DB.update_db_username_hint = function(elm, hint) { if (hint.trim() == '') { $(elm).parent().find('.hint').html(''); } $(elm).parent().find('.hint').text(GLOBAL.DB_USER_PREFIX + hint); }
Base
1
onRcptTo: function(address, session, callback) { if (!/@valid.recipient/.test(address.address)) { return callback(new Error('Only [email protected] is allowed to receive mail')); } if (/[\x80-\uFFFF]/.test(address.address) && !session.smtpUtf8) { return callback(new Error('Trying to use Unicode address without declaring SMTPUTF8 first')); } return callback(); // Accept the address },
Base
1
z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, function(){return this.graph.connectionHandler.isEnabled()})};var ab=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=
Class
2
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,m){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,m));return b};
Class
2
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();
Base
1
F.setGraphEnabled;F.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(ka.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}X.appendChild(S);X.appendChild(F.diagramContainer);K.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&X.appendChild(F.tabContainer);
Class
2
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=
Base
1
b.options_ul.find("li:first").addClass("fc_activeSearchOption"),b.options_ul.slideUp(300),a("#fc_searchOption").remove()}function d(){var d=b.options_ul.find(".fc_activeSearchOption").prop("id"),h=f.val();c(h);a('<div id="fc_searchOption" class="fc_br_all fc_border fc_gradient1 fc_gradient_hover"><span class="fc_br_left fc_gradient_blue">'+d+"</span><strong>"+h+"</strong></div>").prependTo("#fc_search_tree");a("#fc_searchOption").click(function(){c("");f.show().val("").focus()})}var f=a(this);f.val("").hide();
Base
1
z=this.graph.getLinkForCell(this.state.cell);B=this.graph.getLinksForState(this.state);this.updateLinkHint(z,B);if(null!=z||null!=B&&0<B.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding= "6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var B=document.createElement("img");B.setAttribute("src",Editor.editImage);B.setAttribute("title", mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";Editor.isDarkMode()&&(B.style.filter="invert(100%)");this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(M){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(M)}));var E=B.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt", [mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(M){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(M)}))}if(null!=z)for(B=0;B<z.length;B++){var G=document.createElement("div");G.style.marginTop=null!=t||0<B?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(M){}};
Base
1
this.setPersistentToken(JSON.stringify(n),!n.remember));e();return}}catch(v){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(e,f,c){var m=mxUtils.bind(this,function(n){var v=!0,d=window.setTimeout(mxUtils.bind(this,function(){v=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(g){window.clearTimeout(d);v&&(200<=g.getStatus()&&299>=g.getStatus()||404==g.getStatus()?(null== this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(g)):n||401!==g.getStatus()&&400!==g.getStatus()?c(this.parseRequestText(g)):this.authenticate(function(){m(!0)},c,n))}),mxUtils.bind(this,function(g){window.clearTimeout(d);v&&c(g)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){m(!0)},c):m(!1)};OneDriveClient.prototype.checkToken=function(e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,this.emptyFn):e()};OneDriveClient.prototype.getItemRef=
Class
2
EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(q){if(mxUtils.isEmptyObject(q.files))g();else{var v=0,x,A=!1;q.forEach(function(z,L){z=L.name.toLowerCase();"diagram/diagram.xml"==z?(A=!0,L.async("string").then(function(M){0==M.indexOf("<mxfile ")?e(M):g()})):0==z.indexOf("versions/")&&(z=parseInt(z.substr(9)),z>v&&(v=z,x=L))});0<v?x.async("string").then(function(z){(new XMLHttpRequest).upload&& k.isRemoteFileFormat(z,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(z,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,q,v,x,A,z,L,M){z=null!=
Class
2
protocol : $('<select/>').change(function(){ var protocol = this.value; content.find('.elfinder-netmount-tr').hide(); content.find('.elfinder-netmount-tr-'+protocol).show(); if (typeof o[protocol].select == 'function') { o[protocol].select(fm); } }) },
Base
1
InputToolTip.prototype.createDom = function() { var element = this.makeElement('div'); this._element = element; element.addClass('input-tool-tip'); element.html(gettext('search or ask your question')); this.decorate(element); };
Base
1
m,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ea.innerHTML="";for(var ka=0;ka<pa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,pa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+pa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=pa.length; ea.appendChild(ja)}var pa=this.drive.getUsersList(),O=document.createElement("div"),X=document.createElement("span");X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");O.appendChild(X);var ea=document.createElement("select");ea.style.width="200px";Y();mxEvent.addListener(ea,"change",mxUtils.bind(this,function(){var ka=ea.value,ja=pa.length!=ka;ja&&this.drive.setUser(pa[ka]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(pa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,
Base
1
E.appendChild(R);Q.appendChild(E);this.container=Q};var W=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat= this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else W.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible= !this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var u=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
Class
2
setViewTitle: function(date, view, data) { switch (view) { case 'day': return this.setTitle(date.toString('D')); case 'week': var dates = this.viewDates(date, view); return this.setTitle(dates[0].toString(Kronolith.conf.date_format) + ' - ' + dates[1].toString(Kronolith.conf.date_format)); case 'month': return this.setTitle(date.toString('MMMM yyyy')); case 'year': return this.setTitle(date.toString('yyyy')); case 'agenda': var dates = this.viewDates(date, view); return this.setTitle(Kronolith.text.agenda + ' ' + dates[0].toString(Kronolith.conf.date_format) + ' - ' + dates[1].toString(Kronolith.conf.date_format)); case 'search': return this.setTitle(Kronolith.text.searching.interpolate({ term: data })); } },
Base
1
elFinder.prototype.commands.up = function() { this.alwaysEnabled = true; this.updateOnSelect = false; this.shortcuts = [{ pattern : 'ctrl+up' }]; this.getstate = function() { return this.fm.cwd().phash ? 0 : -1; } this.exec = function() { return this.fm.cwd().phash ? this.fm.exec('open', this.fm.cwd().phash) : $.Deferred().reject(); } }
Base
1
Runnable.prototype.timeout = function(ms){ if (0 == arguments.length) return this._timeout; if ('string' == typeof ms) ms = milliseconds(ms); debug('timeout %d', ms); this._timeout = ms; if (this.timer) this.resetTimeout(); return this; };
Base
1
this.handleError(K)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
Base
1
function compare (a, b) { try { // may throw if they have different length, can't convert to Buffer, etc... return crypto.timingSafeEqual(Buffer.from(a), Buffer.from(b)) } catch { return false } }
Base
1