code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
arrayDeclaration: function() {
var elements = [];
if (this.peekToken().text !== ']') {
do {
if (this.peek(']')) {
// Support trailing commas per ES5.1.
break;
}
elements.push(this.expression());
} while (this.expect(','));
}
this.consume(']');
return { type: AST.ArrayExpression, elements: elements };
}, | Class | 2 |
P.message?P.message:mxResources.get("disconnected")));mxEvent.consume(F)}));G.setAttribute("title",D);C.style.paddingRight="4px";C.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var C=this.shareButton;C.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+
Editor.shareImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var C=document.createElement("div"); | Class | 2 |
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 |
var create_tag_title = function(description, owner, tagset, link_owner) {
var title = "";
if (owner) {
title += "<b>Owner:</b> " + owner + "<br />";
}
if (link_owner) {
title += "<b>Linked by:</b> " + link_owner + "<br />";
}
if (description) {
title += "<b>Description:</b> " + description + "<br />";
}
if (tagset) {
title += "<b>Tag set:</b> " + tagset + "<br />";
}
return title;
}; | Base | 1 |
filter = function(files) {
var o = self.options;
files = $.map(files, function(file) {
return file.mime != 'directory' || o.folders ? file : null;
});
return o.multiple || files.length == 1 ? files : [];
}; | Base | 1 |
NyanCat.prototype.appendRainbow = function(){
var segment = this.tick ? '_' : '-';
var rainbowified = this.rainbowify(segment);
for (var index = 0; index < this.numberOfLines; index++) {
var trajectory = this.trajectories[index];
if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift();
trajectory.push(rainbowified);
}
}; | Base | 1 |
var update_selected_labels = function() {
var count = 0;
$(".ui-selected", div_all_tags).not(".filtered").each(function() {
var $this = $(this);
if ($this.hasClass('alltags-tagset')) {
count += $this.nextUntil(":not(.alltags-childtag)").not(
".filtered, .ui-selected").length;
} else {
count++;
}
});
$("#id_tags_selected").text(count ? count + " selected" : "");
var tagset = get_selected_tagset();
if (tagset) {
$("#id_selected_tag_set").html(
"Add a new tag in <span class='tagset-title'>" +
tagset.text() + "</span> tag set and select it immediately:");
} else {
$("#id_selected_tag_set").text(
"Add a new tag and select it immediately:");
}
}; | Base | 1 |
, fn = fn || function(){}; | Base | 1 |
function filterLeaks(ok, globals) {
return filter(globals, function(key){
// Firefox and Chrome exposes iframes as index inside the window object
if (/^d+/.test(key)) return false;
// in firefox
// if runner runs in an iframe, this iframe's window.getInterface method not init at first
// it is assigned in some seconds
if (global.navigator && /^getInterface/.test(key)) return false;
// an iframe could be approached by window[iframeIndex]
// in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak
if (global.navigator && /^\d+/.test(key)) return false;
// Opera and IE expose global variables for HTML element IDs (issue #243)
if (/^mocha-/.test(key)) return false;
var matched = filter(ok, function(ok){
if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]);
return key == ok;
});
return matched.length == 0 && (!global.navigator || 'onerror' !== key);
});
} | Base | 1 |
A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};Ea.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.moveTo(K,0):xa&&!na?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Ea.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Ea.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,$a,ib,db,Ga){if("fold"== | Class | 2 |
"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(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(aa,ca,na){var la=F.menus.get(aa),qa=J.addMenu(mxResources.get(aa),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),W);qa.className=
"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";qa.style.display="inline-block";qa.style.boxSizing="border-box";qa.style.top="6px";qa.style.marginRight="6px";qa.style.height="30px";qa.style.paddingTop="6px";qa.style.paddingBottom="6px";qa.style.cursor="pointer";qa.setAttribute("title",mxResources.get(aa));F.menus.menuCreated(la,qa,"geMenuItem");null!=na?(qa.style.backgroundImage="url("+na+")",qa.style.backgroundPosition="center center",qa.style.backgroundRepeat="no-repeat",qa.style.backgroundSize=
"24px 24px",qa.style.width="34px",qa.innerHTML=""):ca||(qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",qa.style.backgroundPosition="right 6px center",qa.style.backgroundRepeat="no-repeat",qa.style.paddingRight="22px");return qa}function C(aa,ca,na,la,qa,ta){var ka=document.createElement("a");ka.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ka.style.display="inline-block";ka.style.boxSizing="border-box";ka.style.height="30px";ka.style.padding="6px";ka.style.position= | Base | 1 |
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; | Class | 2 |
AspectDialog.prototype.createPageItem = function(pageId, pageName, pageNode)
{
var $listItem = document.createElement('div');
$listItem.className = 'geAspectDlgListItem';
$listItem.setAttribute('data-page-id', pageId)
$listItem.innerHTML = '<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">' + mxUtils.htmlEntities(pageName) + '</div>';
this.pagesContainer.appendChild($listItem);
var graph = this.createViewer($listItem.childNodes[0], pageNode);
var onClick = mxUtils.bind(this, function()
{
if (this.selectedItem != null)
{
this.selectedItem.className = 'geAspectDlgListItem';
}
this.selectedItem = $listItem;
this.selectedPage = pageId;
$listItem.className += ' geAspectDlgListItemSelected';
this.layersContainer.innerHTML = '';
this.selectedLayers = {};
this.okBtn.setAttribute('disabled', 'disabled');
var graphModel = graph.model;
var layers = graphModel.getChildCells(graphModel.getRoot());
for (var i = 0; i < layers.length; i++)
{
this.createLayerItem(layers[i], pageId, graph, pageNode);
}
});
mxEvent.addListener($listItem, 'click', onClick);
if(this.aspect.pageId == pageId)
{
onClick();
}
}; | Base | 1 |
F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var W=F.hideCurrentMenu;F.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var da=F.getCurrentFile();if(null!= | Base | 1 |
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints= | Class | 2 |
function fileCompletion (root, req, depth, cb) {
if (typeof cb !== 'function') {
cb = depth
depth = Infinity
}
correctMkdir(root, function (er) {
if (er) return cb(er)
// can be either exactly the req, or a descendent
var pattern = root + '/{' + req + ',' + req + '/**/*}'
var opts = { mark: true, dot: true, maxDepth: depth }
glob(pattern, opts, function (er, files) {
if (er) return cb(er)
return cb(null, (files || []).map(function (f) {
return f.substr(root.length + 1).replace(/^\/|\/$/g, '')
}))
})
})
} | Class | 2 |
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})}; | Base | 1 |
function embedVimeoIframe(e){
var elem = e.currentTarget;
var id = elem.getAttribute('data-vimeo');
var vimeoParams = elem.getAttribute('data-vimeoparams') || '';
if(vimeoParams && !regAmp.test(vimeoParams)){
vimeoParams = '&'+ vimeoParams;
}
e.preventDefault();
elem.innerHTML = '<iframe src="' + (vimeoIframe.replace(regId, id)) + vimeoParams +'" ' +
'frameborder="0" allowfullscreen="" width="640" height="390"></iframe>'
;
elem.removeEventListener('click', embedVimeoIframe);
} | Base | 1 |
SessionManager.prototype.logIn = function(req, user, cb) {
var self = this;
this._serializeUser(user, req, function(err, obj) {
if (err) {
return cb(err);
}
// TODO: Error if session isn't available here.
if (!req.session) {
req.session = {};
}
if (!req.session[self._key]) {
req.session[self._key] = {};
}
req.session[self._key].user = obj;
cb();
});
} | Compound | 4 |
xa=E.actions.get("zoomOut"),Da=E.actions.get("resetView");p=E.actions.get("fullscreen");var Ba=E.actions.get("undo"),Ka=E.actions.get("redo"),Oa=F("",Ba.funct,null,mxResources.get("undo")+" ("+Ba.shortcut+")",Ba,Editor.undoImage),Ia=F("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Ea=F("",p.funct,null,mxResources.get("fullscreen"),p,Editor.fullscreenImage);if(null!=T){C=function(){ta.style.display=null!=E.pages&&("0"!=urlParams.pages||1<E.pages.length||Editor.pagesVisible)?
"inline-block":"none"};Da=function(){ta.innerHTML="";if(null!=E.currentPage){mxUtils.write(ta,E.currentPage.getName());var ca=null!=E.pages?E.pages.length:1,ba=E.getPageIndex(E.currentPage);ba=null!=ba?ba+1:1;var ja=E.currentPage.getId();ta.setAttribute("title",E.currentPage.getName()+" ("+ba+"/"+ca+")"+(null!=ja?" ["+ja+"]":""))}};Ea.parentNode.removeChild(Ea);var Ca=E.actions.get("delete"),Ma=F("",Ca.funct,null,mxResources.get("delete"),Ca,Editor.trashImage);Ma.style.opacity="0.1";O.appendChild(Ma); | Base | 1 |
this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):J.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=Q.marginTop||0;R.marginBottom= | Base | 1 |
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable()&&!b.invalidChecksum;e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?
window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))}; | Base | 1 |
function Router (opts) {
if (!(this instanceof Router)) {
return new Router(opts)
}
opts = opts || {}
if (opts.defaultRoute) {
assert(typeof opts.defaultRoute === 'function', 'The default route must be a function')
this.defaultRoute = opts.defaultRoute
} else {
this.defaultRoute = null
}
if (opts.onBadUrl) {
assert(typeof opts.onBadUrl === 'function', 'The bad url handler must be a function')
this.onBadUrl = opts.onBadUrl
} else {
this.onBadUrl = null
}
this.caseSensitive = opts.caseSensitive === undefined ? true : opts.caseSensitive
this.ignoreTrailingSlash = opts.ignoreTrailingSlash || false
this.maxParamLength = opts.maxParamLength || 100
this.allowUnsafeRegex = opts.allowUnsafeRegex || false
this.versioning = opts.versioning || acceptVersionStrategy
this.trees = {}
this.routes = []
} | Base | 1 |
this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,q,v,x,A,z,L,M,n){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var y=this.editor.graph.isSelectionEmpty();g=null!=g?g:y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K,
m?this.getFileData(!0,null,null,null,g,x):null,A,null==this.pages||0==this.pages.length,L)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,g,c||1,e,k,null,null,q,v,z,M,n)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,q,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var A= | 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 |
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m= | Base | 1 |
function getInterval(time, todayText, yesterdayText, x1DayAgoText, x2DaysAgoText, x5DaysAgoText, now) {
now = now || Date.now();
if (!time) return '';
if (typeof time === 'string' || typeof time === 'number') {
time = new Date(time);
}
var interval = now.getTime() - time.getTime();
var days = Math.floor(interval / (24 * 3600000));
if (days === 0) {
if (now.getDate() === time.getDate()) {
return todayText;
} else {
return yesterdayText;
}
} else if (days === 1) {
if (now.getDate() - time.getDate() === 1) {
return yesterdayText;
} else {
return x2DaysAgoText.replace('%d', days + 1);
}
} else {
var t = days % 10;
var tt = days % 100;
// 2, 3, 4, 22, 23, 24, 32, 33, 34, 111, ...x2, x3, h4
if ((tt < 10 || tt > 20) && t >= 2 && t <= 4) {
return x2DaysAgoText.replace('%d', days);
} else
// 1, 21, 31, 41, 121....
if ((tt < 10 || tt > 20) && t === 1) {
return x1DayAgoText.replace('%d', days);
} else {
return x5DaysAgoText.replace('%d', days);
}
}
} | Base | 1 |
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 |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
eslint: {
all: ['index.js', 'lib/**/*.js', 'test/**/*.js', 'examples/**/*.js', 'Gruntfile.js']
},
mochaTest: {
all: {
options: {
reporter: 'spec'
},
src: ['test/**/*-test.js']
}
}
});
// Load the plugin(s)
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-mocha-test');
// Tasks
grunt.registerTask('default', ['eslint', 'mochaTest']);
}; | Base | 1 |
function(){return null!=q?q.readyState:3};this.getLastError=function(){return S};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,W){},mouseMove:function(M,W){var U,X=-1;return function(){clearTimeout(U);var u=this,E=arguments,J=function(){U=null;X=Date.now();M.apply(u,E)};Date.now()-X>W?J():U=setTimeout(J,W)}}(function(M,W){m(W)},200),mouseUp:function(M,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()|| | Base | 1 |
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerHTML=""}; | Base | 1 |
exports.set = function (obj, path, val) {
var segs = path.split('.');
var attr = segs.pop();
var src = obj;
for (var i = 0; i < segs.length; i++) {
var seg = segs[i];
obj[seg] = obj[seg] || {};
obj = obj[seg];
}
obj[attr] = val;
return src;
}; | Base | 1 |
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 |
function(){g({message:JSON.parse(n.result).Message})},n.readAsText(L.response))}catch(y){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)}); | Base | 1 |
J.height,Y.y+Y.height)-Math.max(J.y,Y.y))/E))}}N?X=0:M=0;for(Q=0;Q<T.length;Q++)if(R=y.model.getTerminal(T[Q],!1),U==d(R)&&(Y=y.view.getState(R),R!=H&&null!=Y&&(N&&S!=Y.getCenterX()<u.getCenterX()||!N&&S!=Y.getCenterY()<u.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(ea,Z){var fa=null!=Z&&y.isTreeEdge(Z);fa&&ba.push(Z);(null==Z||fa)&&ba.push(ea);return null==Z||fa});y.moveCells(ba,(S?1:-1)*M,(S?1:-1)*X)}}}return y.addCells(W,V)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate(); | Class | 2 |
"",ja=0;ja<k.length;ja++)ea=document.createElement("option"),mxUtils.write(ea,k[ja].getAttribute("name")||mxResources.get("pageWithNumber",[ja+1])),ea.setAttribute("value",ja),ja==l&&ea.setAttribute("selected","selected"),J.appendChild(ea);V=function(){try{var Da=parseInt(J.value);l=g=Da;ma(k[Da])}catch(Ca){J.value=g,b.handleError(Ca)}}}else Aa(ha);ja=S.lastModifyingUserName;null!=ja&&20<ja.length&&(ja=ja.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ja?ja+" ":"")+Y.toLocaleDateString()+ | Base | 1 |
App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
if (hint.trim() == '') {
$(elm).parent().find('.hint').html('');
}
hint = hint.replace(/[^\w\d]/gi, '');
$(elm).parent().find('.v-ftp-user').val(hint);
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
} | Base | 1 |
function return_error(a,b){"undefined"!=typeof a&&a.slideUp(1200,function(){a.remove()});0===$(".fc_popup").size()&&$("#fc_admin_header").prepend('<div class="fc_popup" />');if("undefined"==typeof b||""==b)b="Unknown error";$(".fc_popup").html(b);var c=set_popup_title();$(".fc_popup").dialog({modal:!0,show:"fade",closeOnEscape:!0,title:c,buttons:[{text:"Ok",click:function(){$(".fc_popup").dialog("destroy")},"class":"submit"}]})} | Base | 1 |
Mocha.prototype.loadFiles = function(fn){
var self = this;
var suite = this.suite;
var pending = this.files.length;
this.files.forEach(function(file){
file = path.resolve(file);
suite.emit('pre-require', global, file, self);
suite.emit('require', require(file), file, self);
suite.emit('post-require', global, file, self);
--pending || (fn && fn());
});
}; | Base | 1 |
function main(){
//Try using pkg-config, but if it fails and it is on Windows, try the fallback
exec("pkg-config " + opencv + " " + flag, function(error, stdout, stderr){
if(error){
if(process.platform === "win32"){
fallback();
}
else{
throw new Error("ERROR: failed to run: pkg-config", opencv, flag);
}
}
else{
console.log(stdout);
}
});
} | Base | 1 |
function isUndefined(value) {return typeof value === 'undefined';} | Class | 2 |
this.trigger('resize', {width : node.width(), height : node.height()});
} | Base | 1 |
urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,ya=U.getPageIndex(U.currentPage);ya=null!=ya?ya+1:1;var Na=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+ya+"/"+ua+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),ha=X("",ca.funct,null,mxResources.get("delete"),ca, | Base | 1 |
mxEvent.consume(H))}}catch(Q){v.handleError(Q)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var F=x.connectVertex;x.connectVertex=function(H,S,U,Q,W,V,X){var p=x.getIncomingTreeEdges(H);if(d(H)){var C=c(H),I=C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return C==S||0==p.length?k(H,S):I==T?g(H):e(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};x.getSubtree=function(H){var S=
[H];!u(H)&&!d(H)||D(H)||x.traverse(H,!0,function(U,Q){var W=null!=Q&&x.isTreeEdge(Q);W&&0>mxUtils.indexOf(S,Q)&&S.push(Q);(null==Q||W)&&0>mxUtils.indexOf(S,U)&&S.push(U);return null==Q||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(u(this.state.cell)||d(this.state.cell))&&!D(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title", | Class | 2 |
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))}; | Base | 1 |
(ma=ka[ja],null==ma&&(ma={},ka[ja]=ma),ja=ma[ba],null==ja&&(ja=[],ma[ba]=ja),ja.push(ia))}fa=fa.nextSibling}G(ta,pa,va)}})}function J(fa){D&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),V=!1,W=!0,ua.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,D(ra,function(){A(mxResources.get("cannotLoad"));ra([])},fa?null:t))}function E(fa){if(""==fa)null!=p&&(p.click(),p=null);else{if(null==TemplatesDialog.tagsList[d]){var ca={};for(Ja in ta)for(var ba=ta[Ja],ja=0;ja<ba.length;ja++){var ia= | Base | 1 |
function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,E){var J=null;null!=u.editor.graph.getModel().getParent(E)?J=E.getId():null!=u.currentPage&&(J=u.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh; | Base | 1 |
[H],"{1} ago"));E.setAttribute("title",J.toLocaleDateString()+" "+J.toLocaleTimeString())}function g(J){var E=document.createElement("img");E.className="geCommentBusyImg";E.src=IMAGE_PATH+"/spin.gif";J.appendChild(E);J.busyImg=E}function k(J){J.style.border="1px solid red";J.removeChild(J.busyImg)}function m(J){J.style.border="";J.removeChild(J.busyImg)}function q(J,E,H,S,U){function Q(P,O,R){var Y=document.createElement("li");Y.className="geCommentAction";var da=document.createElement("a");da.className=
"geCommentActionLnk";mxUtils.write(da,P);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,J);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function P(Y){O.push(R);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)R=R.nextSibling,P(Y.replies[da])}var O=[],R=X;P(J);return{pdiv:R,replies:O}}function V(P,O,R,Y,da){function ha(){g(ua);J.addReply(aa,function(la){aa.id=la;J.replies.push(aa);m(ua);R&&R()},function(la){Z();k(ua); | Base | 1 |
l.style.verticalAlign="middle";l.className="geBtn";M.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&M.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(n){if(n.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=n.docs;var y=n.docs[0].url;"application/mxe"==n.docs[0].mimeType||null!=n.docs[0].mimeType&&
"application/vnd.jgraph."==n.docs[0].mimeType.substring(0,23)?y="https://www.draw.io/#G"+n.docs[0].id:"application/vnd.google-apps.folder"==n.docs[0].mimeType&&(y="https://drive.google.com/#folders/"+n.docs[0].id);k.value=y;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, | Base | 1 |
Client.prototype.shell = function(wndopts, opts, cb) {
if (!this._sock
|| !this._sock.writable
|| !this._sshstream
|| !this._sshstream.writable)
throw new Error('Not connected');
// start an interactive terminal/shell session
var self = this;
if (typeof wndopts === 'function') {
cb = wndopts;
wndopts = opts = undefined;
} else if (typeof opts === 'function') {
cb = opts;
opts = undefined;
}
if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) {
opts = wndopts;
wndopts = undefined;
}
return openChannel(this, 'session', function(err, chan) {
if (err)
return cb(err);
var todo = [];
function reqCb(err) {
if (err) {
chan.close();
return cb(err);
}
if (todo.length)
todo.shift()();
}
if (self.config.allowAgentFwd === true
|| (opts
&& opts.agentForward === true
&& self.config.agent !== undefined)) {
todo.push(function() { reqAgentFwd(chan, reqCb); });
}
if (wndopts !== false)
todo.push(function() { reqPty(chan, wndopts, reqCb); });
if (typeof opts === 'object' && opts !== null) {
if (typeof opts.env === 'object' && opts.env !== null)
reqEnv(chan, opts.env);
if ((typeof opts.x11 === 'object' && opts.x11 !== null)
|| opts.x11 === 'number'
|| opts.x11 === true) {
todo.push(function() { reqX11(chan, opts.x11, reqCb); });
}
}
todo.push(function() { reqShell(chan, cb); });
todo.shift()();
});
}; | Base | 1 |
forEach: function(path, cb, thisArg) {
forEach(Array.isArray(path) ? path : split(path), cb, thisArg)
} | Base | 1 |
javascript: function () {
var str, j = i, e;
if (input.charAt(j) === '~') { j++; e = true; } // Escaped strings
if (input.charAt(j) !== '`') { return; }
if (env.javascriptEnabled !== undefined && !env.javascriptEnabled) {
error("You are using JavaScript, which has been disabled.");
}
if (e) { $char('~'); }
str = $re(/^`([^`]*)`/);
if (str) {
return new(tree.JavaScript)(str[1], i, e);
}
} | Class | 2 |
function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(L){var M=mxEvent.getSource(L);M!=v&&M!=x?(null!=g&&g(),A(),mxEvent.consume(L)):z()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(z,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= | Base | 1 |
function(){b.spinner.stop();if(null==b.linkPicker){var n=b.drive.createLinkPicker();b.linkPicker=n.setCallback(function(y){LinkDialog.filePicked(y)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(n){k.value=n[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), | Class | 2 |
helper : function(e) {
var dir = $(e.target).parent();
dir.children().removeClass('ui-state-hover');
return $('<div class="ui-widget elfinder-place-drag elfinder-'+fm.direction+'"/>')
.append($('<div class="elfinder-navbar"/>').show().append(dir.clone()));
}, | Base | 1 |
{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});d.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new d.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,g,p=0,q=function(d,e){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
l=0;for(h=e.length;l<h;l++)if(c=e[l],b.isArray(c))q(d,c);else{g=f="";switch(c){case "ellipsis":f="…";g="disabled";break;case "first":f=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":f=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":f=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":f=k.sLast;g=c+(j<n-1?"":" disabled");break;default:f=c+1,g=j===c?"active":""}f&&(i=b("<li>",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#",
"aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(f)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(e.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};d.TableTools&&(b.extend(!0,d.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu", | Base | 1 |
function(){};var E=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){E.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,100,100,100),q= | Class | 2 |
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)} | Class | 2 |
O.style.overflow="hidden";O.style.textAlign="center";var R=null;null!=F?(R={data:F,w:E,h:H,title:Q},null!=U&&(R.aspect=U),A[F]=I,k.push(R)):null!=S&&(S.aspect="fixed",k.push(S),R=S);mxEvent.addListener(O,"keydown",function(Z){13==Z.keyCode&&null!=M&&(M(),M=null,mxEvent.consume(Z))});W();C.appendChild(O);mxEvent.addListener(O,"mousedown",function(Z){"true"!=O.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=
new FilenameDialog(b,R.title||"",mxResources.get("ok"),function(aa){null!=aa&&(R.title=aa,W())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(Z)}else if("true"!=O.getAttribute("contentEditable")){null!=M&&(M(),M=null);if(null==R.title||0==R.title.length)O.innerHTML="";O.style.textOverflow="";O.style.whiteSpace="";O.style.cursor="text";O.style.color="";O.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(O.style,"user-select","text");
O.focus();document.execCommand("selectAll",!1,null);M=function(){O.removeAttribute("contentEditable");O.style.cursor="pointer";R.title=O.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(O,"click",T);mxEvent.addListener(C,"dblclick",T);v.appendChild(C);mxEvent.addListener(C,"dragstart",function(Z){null==F&&null!=S&&(P.style.visibility="hidden",O.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",S.xml);z=D(Z);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style, | Class | 2 |
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style, | Class | 2 |
"url("+Editor.plusImage+")",ta.setAttribute("title",mxResources.get("insert")),ta.style.width="24px",Na=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=J){var Ra=function(za){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(za)||mxEvent.isShiftDown(za)?U.actions.get("customZoom").funct():U.actions.get("smartFit").funct()},ab=U.actions.get("zoomIn"), | Base | 1 |
OAuthServer.prototype.validateAccessToken = function(username, accessToken) {
if (!this.users[username] || this.users[username].accessToken !== accessToken || this.users[username].expiresIn < Date.now()) {
return false;
} else {
return true;
}
}; | Base | 1 |
exports.slug = function(str){
return str
.toLowerCase()
.replace(/ +/g, '-')
.replace(/[^-\w]/g, '');
}; | Base | 1 |
function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(), | Base | 1 |
toMathMLclass: function (attr) {
var CLASS = []; if (this["class"]) {CLASS.push(this["class"])}
if (this.isa(MML.TeXAtom) && SETTINGS.texHints) {
var TEXCLASS = ["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];
if (TEXCLASS) {
CLASS.push("MJX-TeXAtom-"+TEXCLASS)
if (TEXCLASS === "OP" && !this.movablelimits) CLASS.push("MJX-fixedlimits");
}
}
if (this.mathvariant && this.toMathMLvariants[this.mathvariant])
{CLASS.push("MJX"+this.mathvariant)}
if (this.variantForm) {CLASS.push("MJX-variant")}
if (CLASS.length) {attr.unshift('class="'+CLASS.join(" ")+'"')}
}, | Base | 1 |
(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); | Base | 1 |
this.init = function()
{
function parseGraphModel(dataNode)
{
if (dataNode != null)
{
var bg = dataNode.getAttribute('background');
if (bg == null || bg == '' || bg == mxConstants.NONE)
{
bg = Editor.isDarkMode() ? 'transparent' : '#ffffff';
}
container.style.backgroundColor = bg;
var codec = new mxCodec(dataNode.ownerDocument);
codec.decode(dataNode, graph.getModel());
graph.maxFitScale = 1;
graph.fit(8);
graph.center();
}
return dataNode;
};
function parseDiagram(diagramNode)
{
if (diagramNode != null)
{
diagramNode = parseGraphModel(Editor.parseDiagramNode(diagramNode));
}
return diagramNode;
};
mxEvent.addListener(pageSelect, 'change', function(evt)
{
currentPage = parseInt(pageSelect.value);
parseDiagram(diagrams[currentPage]);
mxEvent.consume(evt);
});
if (node.nodeName == 'mxfile')
{
// Workaround for "invalid calling object" error in IE
var tmp = node.getElementsByTagName('diagram');
diagrams = [];
for (var i = 0; i < tmp.length; i++)
{
diagrams.push(tmp[i]);
}
if (diagrams.length > 0)
{
parseDiagram(diagrams[currentPage]);
}
pageSelect.innerHTML = '';
if (diagrams.length > 1)
{
pageSelect.style.display = '';
for (var i = 0; i < diagrams.length; i++)
{
var pageOption = document.createElement('option');
mxUtils.write(pageOption, diagrams[i].getAttribute('name') ||
mxResources.get('pageWithNumber', [i + 1]));
pageOption.setAttribute('value', i);
if (i == currentPage)
{
pageOption.setAttribute('selected', 'selected');
}
pageSelect.appendChild(pageOption);
}
}
else
{
pageSelect.style.display = 'none';
}
}
else
{
parseGraphModel(node);
}
}; | Base | 1 |
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style, | Class | 2 |
function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(n);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[n,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var v=function(n){if(null!=n)for(var y=0;y<n.length;y++)if(!x[n[y]])throw Error(mxResources.get("invalidInput")+
' "'+n[y])+'"';return!0},x={},A;for(A in App.pluginRegistry)x[App.pluginRegistry[A]]=!0;var z=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=z&&v(z.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(z));if(null!=z.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var M=JSON.parse(L);for(A in z.merge)M[A]=z.merge[A];z=M}catch(n){window.location.hash="",alert(n)}else z=z.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&& | Base | 1 |
fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}E(fa)}}else null!=J&&(0==Z.getStatus()?J({message:mxResources.get("accessDenied")},Z):J({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=J&&J({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){N&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=J&&J(Z)}}; | Base | 1 |
mxEvent.consume(H))}}catch(M){x.handleError(M)}mxEvent.isConsumed(H)||C.apply(this,arguments)};var D=y.connectVertex;y.connectVertex=function(H,S,V,M,W,U,X){var u=y.getIncomingTreeEdges(H);if(c(H)){var E=d(H),J=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return E==S||0==u.length?l(H,S):J==T?k(H):g(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return D.apply(this,arguments)};y.getSubtree=function(H){var S=
[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", | Base | 1 |
this.startDrawing=function(){n(!0)};this.isDrawing=function(){return x};var y=mxUtils.bind(this,function(J){if(d){var E=c.length,H=A&&0<D.length&&null!=c&&2>c.length;H||D.push.apply(D,c);c=[];D.push(null);u.push(d);d=null;(H||k)&&this.stopDrawing();k&&2<=E&&this.startDrawing();mxEvent.consume(J)}}),K=new mxCell;K.edge=!0;var B=function(){var J=b.getCurrentCellStyle(K);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"== | Class | 2 |
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))}; | Base | 1 |
DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(N,Q){Q=Q||document;return Q.querySelector(N)}function A(N,Q,R){if(null==N["@microsoft.graph.downloadUrl"])if(null==N.parentReference)R();else{c(N.id,N.parentReference.driveId,function(ea){A(ea,Q,R)},R);return}var Y=new XMLHttpRequest;Y.open("GET",N["@microsoft.graph.downloadUrl"]);var ba=N.file?"image/png"==N.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}R()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function B(){p&&null!=F?K.exportToCanvas(function(N){N=EditorUi.prototype.createImageDataUri(N,null,"png");v(H,N);n(H)},400, | Base | 1 |
filterPrefix: function() {
var parts = [];
var self = this;
forEach(this.state.filters, function(id, filter) {
parts.push(id + '=$filter(' + self.escape(filter) + ')');
});
if (parts.length) return 'var ' + parts.join(',') + ';';
return '';
}, | Class | 2 |
null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerHTML="";else{var k=
mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(k));mxUtils.setTextContent(c,encodeURIComponent(m));e?(g.removeCells(k,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))), | Base | 1 |
_normalizeAddress(address) {
address = (address || '').toString().trim();
let lastAt = address.lastIndexOf('@');
if (lastAt < 0) {
// Bare username
return address;
}
let user = address.substr(0, lastAt);
let domain = address.substr(lastAt + 1);
// Usernames are not touched and are kept as is even if these include unicode
// Domains are punycoded by default
// 'jõgeva.ee' will be converted to 'xn--jgeva-dua.ee'
// non-unicode domains are left as is
return user + '@' + punycode.toASCII(domain.toLowerCase());
} | Class | 2 |
ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ja.isResolved?"none":"",va=ia(ja).replies,Ba=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Ba;for(var Da=va[sa].querySelectorAll(".geCommentAction"),
Aa=0;Aa<Da.length;Aa++)Da[Aa]!=Z.parentNode&&(Da[Aa].style.display=na);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});ta.appendChild(u);null!=J?da.insertBefore(ta,J.nextSibling):da.appendChild(ta);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)u=ja.replies[J],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,ta,H.saveCallback, | Base | 1 |
function writeCommentDate(comment, dateDiv)
{
dateDiv.innerHTML = '';
var ts = new Date(comment.modifiedDate);
var str = editorUi.timeSince(ts);
if (str == null)
{
str = mxResources.get('lessThanAMinute');
}
mxUtils.write(dateDiv, mxResources.get('timeAgo', [str], '{1} ago'));
dateDiv.setAttribute('title', ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString());
}; | Base | 1 |
DotObject.prototype.pick = function (path, obj, remove, reindexArray) {
var i
var keys
var val
var key
var cp
keys = parsePath(path, this.separator)
for (i = 0; i < keys.length; i++) {
key = parseKey(keys[i], obj)
if (obj && typeof obj === 'object' && key in obj) {
if (i === (keys.length - 1)) {
if (remove) {
val = obj[key]
if (reindexArray && Array.isArray(obj)) {
obj.splice(key, 1)
} else {
delete obj[key]
}
if (Array.isArray(obj)) {
cp = keys.slice(0, -1).join('.')
if (this.cleanup.indexOf(cp) === -1) {
this.cleanup.push(cp)
}
}
return val
} else {
return obj[key]
}
} else {
obj = obj[key]
}
} else {
return undefined
}
}
if (remove && Array.isArray(obj)) {
obj = obj.filter(function (n) { return n !== undefined })
}
return obj
} | Class | 2 |
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 nextChannel(self) {
// get the next available channel number
// optimized path
if (self._curChan < MAX_CHANNEL)
return ++self._curChan;
// slower lookup path
for (var i = 0, channels = self._channels; i < MAX_CHANNEL; ++i)
if (!channels[i])
return i;
return false;
} | Base | 1 |
"top center";ea.style.backgroundRepeat="no-repeat";ea.setAttribute("title","Minimize");var ha=!1,ma=mxUtils.bind(this,function(){T.innerHTML="";if(!ha){var aa=function(la,qa,ta){la=C("",la.funct,null,qa,la,ta);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,qa,ta){null!=qa&&la.setAttribute("title",qa);la.style.cursor=null!=ta?ta:"default";la.style.margin="2px 0px";T.appendChild(la);mxUtils.br(T);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;", | Base | 1 |
function Runner(suite) {
var self = this;
this._globals = [];
this._abort = false;
this.suite = suite;
this.total = suite.total();
this.failures = 0;
this.on('test end', function(test){ self.checkGlobals(test); });
this.on('hook end', function(hook){ self.checkGlobals(hook); });
this.grep(/.*/);
this.globals(this.globalProps().concat(extraGlobals()));
} | Base | 1 |
c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Qa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c, | Class | 2 |
"plantUmlData",JSON.stringify({data:F,format:K.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(D,G,P){var K=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("mermaid")+":",K.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,K.config,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image", | Class | 2 |
[H];!u(H)&&!d(H)||D(H)||x.traverse(H,!0,function(U,Q){var W=null!=Q&&x.isTreeEdge(Q);W&&0>mxUtils.indexOf(S,Q)&&S.push(Q);(null==Q||W)&&0>mxUtils.indexOf(S,U)&&S.push(U);return null==Q||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(u(this.state.cell)||d(this.state.cell))&&!D(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;v.hoverIcons.reset();mxEvent.consume(H)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this, | Class | 2 |
__create_table() {
if (this.table_title !== undefined) {
var label = document.createElement('label');
label.innerHTML = this.table_title;
this.container.appendChild(label);
}
this.form = document.createElement('form');
this.table = document.createElement('table');
this.table.classList.add("table", "table-bordered", "action-table");
if (this.classes !== undefined) {
for (var i in this.classes) {
this.table.classList.add(this.classes[i]);
}
}
this.thead = document.createElement('thead');
this.tbody = document.createElement('tbody');
var trHead = document.createElement('tr');
for (var col of this.header) {
var th = document.createElement('th');
th.innerHTML = col;
trHead.appendChild(th);
}
this.thead.appendChild(trHead);
this.__add_control_row();
for (var row of this.data) {
this.__add_row(row);
}
this.table.appendChild(this.thead);
this.table.appendChild(this.tbody);
this.form.appendChild(this.table);
this.container.appendChild(this.form);
} | Base | 1 |
n.toDataURL();if(y.length<e.length){var K=document.createElement("canvas");K.width=L;K.height=M;var B=K.toDataURL();y!==B&&(e=y,x=L,A=M)}}}catch(F){}g(e,x,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode= | Base | 1 |
u.appendChild(E));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u, | Base | 1 |
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 |
Array.prototype.remove = function () {
var what;
var a = arguments;
var L = a.length;
var ax;
while (L && this.length) {
what = a[--L];
while ((ax = this.indexOf(what)) !== -1) {
this.splice(ax, 1);
}
}
return this;
}; | Base | 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=
"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")}, | Base | 1 |
T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,E,J){if(null!=E&&null!=E[J]){for(var T=[],N=0;N<E[J].length;N++)if("*"==E[J][N])T.push(E[J][N]);else{var Q=u[E[J][N]];null!=Q?""!=Q&&T.push(Q):T.push(E[J][N])}E[J]=T}};Graph.prototype.getCellsForAction=function(u,E){E=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,E));if(null!=u.excludeCells){for(var J=[],T=0;T<E.length;T++)0>u.excludeCells.indexOf(E[T].id)&&J.push(E[T]);
E=J}return E};Graph.prototype.getCellsById=function(u){var E=[];if(null!=u)for(var J=0;J<u.length;J++)if("*"==u[J]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[J]);null!=N&&E.push(N)}return E};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length|| | Base | 1 |
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= | Class | 2 |
d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ma(a){return D(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ea(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=
Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Na(a,e)}}function Ka(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,o,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],u=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a){if(c===k|| | Base | 1 |
P)this.editPlantUmlData(D,G,P);else if(P=this.graph.getAttributeForCell(D,"mermaidData"),null!=P)this.editMermaidData(D,G,P);else{var K=g.getCellStyle(D);"1"==mxUtils.getValue(K,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this, | Class | 2 |
renderer:"foundation"});a.ext.renderer.pageButton.foundation=function(b,j,q,r,g,k){var l=new a.Api(b),s=b.oClasses,h=b.oLanguage.oPaginate,t=b.oLanguage.oAria.paginate||{},e,f,p=function(a,m){var i,n,o,c,j=function(a){a.preventDefault();!d(a.currentTarget).hasClass("unavailable")&&l.page()!=a.data.action&&l.page(a.data.action).draw("page")};i=0;for(n=m.length;i<n;i++)if(c=m[i],d.isArray(c))p(a,c);else{f=e="";switch(c){case "ellipsis":e="…";f="unavailable";break;case "first":e=h.sFirst;f=c+
(0<g?"":" unavailable");break;case "previous":e=h.sPrevious;f=c+(0<g?"":" unavailable");break;case "next":e=h.sNext;f=c+(g<k-1?"":" unavailable");break;case "last":e=h.sLast;f=c+(g<k-1?"":" unavailable");break;default:e=c+1,f=g===c?"current":""}e&&(o=d("<li>",{"class":s.sPageButton+" "+f,"aria-controls":b.sTableId,"aria-label":t[c],tabindex:b.iTabIndex,id:0===q&&"string"===typeof c?b.sTableId+"_"+c:null}).append(d("<a>",{href:"#"}).html(e)).appendTo(a),b.oApi._fnBindAction(o,{action:c},j))}};p(d(j).empty().html('<ul class="pagination"/>').children("ul"), | Base | 1 |
D=C.createElement("output");C.appendChild(D);C=new mxXmlCanvas2D(D);C.translate(Math.floor((1-z.x)/L),Math.floor((1-z.y)/L));C.scale(1/L);var G=0,P=C.save;C.save=function(){G++;P.apply(this,arguments)};var K=C.restore;C.restore=function(){G--;K.apply(this,arguments)};var F=t.drawShape;t.drawShape=function(H){mxLog.debug("entering shape",H,G);F.apply(this,arguments);mxLog.debug("leaving shape",H,G)};t.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(D));mxLog.debug("stateCounter", | Class | 2 |
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"]; | Class | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.