code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
A=!1,C=null,F=function(D,O,Q){if(!A){var R="null"==d?null:d;A=!0;D=/(^#?[a-zA-Z0-9]*$)/.test(D)?D:R;R=null!=D&&D!=mxConstants.NONE?D:R;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==R?n:R;C.innerHTML="";C.appendChild(P);null!=D&&D!=mxConstants.NONE&&1<D.length&&"string"===typeof D&&(R="#"==D.charAt(0)?D.substring(1).toUpperCase():D,R=ColorDialog.prototype.colorNames[R],C.setAttribute("title",
null!=R?R+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=D&&D!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=e&&e("null"==D?null:D);x=D;O||(Q||k||b()!=x)&&f("null"==x?null:x,x);A=!1}},K=document.createElement("input");K.setAttribute("type","color");K.style.visibility="hidden";K.style.width="0px";K.style.height="0px";K.style.border= | Base | 1 |
function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
callback && callback()
} | Base | 1 |
g.addClass("fc_inactive_element hidden").slideUp(0).removeClass("fc_active_element")):g.slideDown(0).addClass("fc_active_element").removeClass("hidden fc_inactive_element");c.click(function(){c.prop("checked")&&"show"==e?g.removeClass("hidden").slideUp(0).slideDown(b.toggle_speed,function(){g.addClass("fc_active_element").removeClass("fc_inactive_element")}):g.slideUp(b.toggle_speed,function(){g.addClass("fc_inactive_element hidden").removeClass("fc_active_element")})})}})}})(jQuery);(function(a){a.fn.resize_elements=function(b){var c={sidebar:a("#fc_sidebar"),sidebar_content:a("#fc_sidebar_content"),main_content:a("#fc_main_content"),leftside:a("#fc_sidebar, #fc_content_container"),rightside:a("#fc_content_container, #fc_content_footer"),rightcontent:a("#fc_content_container"),overview_list:a("#fc_list_overview"),side_add:a("#fc_add_page"),media:a("#fc_media_browser"),bottomright:130,bottomleft:79};b=a.extend(c,b);return this.each(function(){var c=a(this);c.resize(function(){var d=
parseInt(c.height(),10),f=parseInt(c.width(),10),g=parseInt(b.sidebar.width(),10);b.main_content.css({maxHeight:d-b.bottomright+"px"});b.media.css({maxHeight:d-b.bottomright+"px"});b.leftside.height(d-b.bottomright+30);b.sidebar.height(d-b.bottomright+48);b.rightcontent.height(d-b.bottomleft);b.rightside.width(f-g);b.sidebar_content.height(d-b.bottomright+26);f=0<a("#fc_list_add").size()?58:30;b.overview_list.css({maxHeight:d-b.bottomright-f+"px"});b.side_add.css({left:g+"px",height:d-b.bottomright+
51+"px"})}).resize()})}})(jQuery);(function(a){a.fn.fc_show_popup=function(b){b=a.extend({functionOpen:!1},b);return this.each(function(){var b=a(this),e=match_class_prefix("form_",b),d=a("#"+e);b.unbind().click(function(){d.find(".fc_valid, .fc_invalid").removeClass("fc_invalid fc_valid");var b=d.find('input[name="form_title"]').val();buttonsOpts=[];0<d.find(".fc_confirm_bar").size()&&(d.find(".fc_confirm_bar input").each(function(){var b=a(this);if(b.hasClass("hidden"))var c=function(){},e="hidden";else"reset"==b.prop("type")?(c= | Base | 1 |
Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Pa=U.actions.get("undo"),Za=U.actions.get("redo"),z=X("",Pa.funct,null,mxResources.get("undo")+" ("+Pa.shortcut+")",Pa,Editor.undoImage),L=X("",Za.funct,null,mxResources.get("redo")+" ("+Za.shortcut+")",Za,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Ea=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Ea?" ["+Ea+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca); | 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(), | Class | 2 |
wp.updates.keydown = function( event ) {
if ( 27 === event.keyCode ) {
wp.updates.requestForCredentialsModalCancel();
} else if ( 9 === event.keyCode ) {
// #upgrade button must always be the last focusable element in the dialog.
if ( event.target.id === 'upgrade' && ! event.shiftKey ) {
$( '#hostname' ).focus();
event.preventDefault();
} else if ( event.target.id === 'hostname' && event.shiftKey ) {
$( '#upgrade' ).focus();
event.preventDefault();
}
}
}; | Compound | 4 |
p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||na?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
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 |
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(C){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=C?C:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),
this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);B.apply(this,arguments)};var I=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(C){I.apply(this,arguments);if(C){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; | Base | 1 |
arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=d.createImageForPageLink(D.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched", | Class | 2 |
document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",T);N.setAttribute("as","font");N.setAttribute("crossorigin","");E.parentNode.insertBefore(N,E)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!= | Class | 2 |
context.suite = function(title, fn){
var suite = Suite.create(suites[0], title);
suites.unshift(suite);
fn.call(suite);
suites.shift();
return suite;
}; | Base | 1 |
[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, | 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"== | Base | 1 |
$scope.deleteNode = function(node) {
bootbox.confirm('Are you sure you want to remove the node ' + node.nodeLabel + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteNode(node).then(
function() { // success
var index = -1;
for(var i = 0; i < $scope.filteredNodes.length; i++) {
if ($scope.filteredNodes[i].foreignId === node.foreignId) {
index = i;
}
}
if (index > -1) {
$scope.filteredNodes.splice(index,1);
}
growl.success('The node ' + node.nodeLabel + ' has been deleted.');
},
$scope.errorHandler
);
}
});
}; | Base | 1 |
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|callto|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})}; | Base | 1 |
function isFile(obj) {
return toString.call(obj) === '[object File]';
} | Class | 2 |
var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var K=O.getElementsByTagName("div"),F=0,H=0;H<K.length;H++)"none"!=K[H].style.display&&K[H].parentNode==O&&F++;t.style.display=0==F?"block":"none"}function d(K,F,H,S){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";M.style.display="block"}A={div:F,comment:K,saveCallback:H,deleteOnCancel:S};var M=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= | Class | 2 |
DotObject.prototype.transform = function (recipe, obj, tgt) {
obj = obj || {}
tgt = tgt || {}
Object.keys(recipe).forEach(function (key) {
this.set(recipe[key], this.pick(key, obj), tgt)
}.bind(this))
return tgt
} | Class | 2 |
Suite.prototype.clone = function(){
var suite = new Suite(this.title);
debug('clone');
suite.ctx = this.ctx;
suite.timeout(this.timeout());
suite.slow(this.slow());
suite.bail(this.bail());
return suite;
}; | Base | 1 |
var J=A.div.querySelector(".geCommentEditTxtArea"),E=A.div.querySelector(".geCommentEditBtns");A.comment.content=J.value;J.parentNode.removeChild(J);E.parentNode.removeChild(E)}catch(H){b.handleError(H)}M.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function S(U){if(null!=U){U.sort(function(W,V){return new Date(W.modifiedDate)-
new Date(V.modifiedDate)});for(var Q=0;Q<U.length;Q++)S(U[Q].replies)}}H.sort(function(U,Q){return new Date(U.modifiedDate)-new Date(Q.modifiedDate)});M.innerHTML="";M.appendChild(n);n.style.display="block";F=H;for(H=0;H<F.length;H++)S(F[H].replies),q(F[H],F,null,0,B);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(M.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(H){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message? | Class | 2 |
KeyboardAuthContext.prototype.prompt = function(prompts, title, instructions,
cb) {
if (!Array.isArray(prompts))
prompts = [ prompts ];
if (typeof title === 'function') {
cb = title;
title = instructions = undefined;
} else if (typeof instructions === 'function') {
cb = instructions;
instructions = undefined;
}
for (var i = 0; i < prompts.length; ++i) {
if (typeof prompts[i] === 'string') {
prompts[i] = {
prompt: prompts[i],
echo: true
};
}
}
this._cb = cb;
this._initialResponse = true;
this._stream.once('USERAUTH_INFO_RESPONSE', this._onInfoResponse);
return this._stream.authInfoReq(title, instructions, prompts);
}; | Base | 1 |
Ua)}La=0};za.positionChanged=function(){};za.reset=function(){La=0};z.push(za)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles= | Class | 2 |
function onFailure(info) {
sshstream.removeListener('CHANNEL_OPEN_CONFIRMATION:' + localChan,
onSuccess);
sshstream.removeListener('CHANNEL_OPEN_FAILURE:' + localChan, onFailure);
sshstream.removeListener('CHANNEL_CLOSE:' + localChan, onFailure);
delete self._channels[localChan];
var err;
if (info instanceof Error)
err = info;
else if (typeof info === 'object' && info !== null) {
err = new Error('(SSH) Channel open failure: ' + info.description);
err.reason = info.reason;
err.lang = info.lang;
} else {
err = new Error('(SSH) Channel open failure: '
+ 'server closed channel unexpectedly');
err.reason = err.lang = '';
}
cb(err);
} | Base | 1 |
typeof fa.getAttribute&&null!=fa.getAttribute("title")&&sa.push({img:fa.getAttribute("img"),libs:fa.getAttribute("libs"),clibs:fa.getAttribute("clibs"),title:fa.getAttribute("title")}),fa=fa.nextSibling;F(sa)}});var ra=function(fa,ca,ba){la.style.display="";Ea.stop();W=!1;if(V)V=!1;else if(ca)aa.innerHTML=ca;else{ba=ba||{};ca=0;for(var ja in ba)ca+=ba[ja].length;0==fa.length&&0==ca?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(fa,!1,O,0==ca?null:ba)}};J(P);var wa=null;mxEvent.addListener(Oa, | Class | 2 |
b[c]:""!==c?Q(c)(b):b}function pb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ha(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,O(a))},g=null!==
a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?ua(f,g):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ha(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex; | Base | 1 |
mxEvent.consume(ua))},Za=U.actions.get("zoomIn"),cb=U.actions.get("zoomOut"),Ja=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){Ja=function(){ra.style.display=null!=U.pages&&("0"!=
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 |
null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,na=zb.x,$a=zb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=($a*Ga-na*Ha)/(K*$a-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*$a);ib?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+$a*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+$a*Ga),v.push(db)),
db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];F.prototype.getConstraints= | Class | 2 |
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!=
da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);S.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else S.removeAttribute("title")};F.setStatusText(F.editor.getStatus());S.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;"; | Class | 2 |
i.onload = function () {
/* Remove preview */
imgPreview.getElement().setHtml('');
/* Set attributes */
if (orgWidth == null || orgHeight == null) {
t.setValueOf('tab-properties', 'width', this.width);
t.setValueOf('tab-properties', 'height', this.height);
imgScal = 1;
if (this.height > 0 && this.width > 0) imgScal = this.width / this.height;
if (imgScal <= 0) imgScal = 1;
} else {
orgWidth = null;
orgHeight = null;
}
this.id = editor.id + 'previewimage';
this.setAttribute('style', 'max-width:400px;max-height:100px;');
this.setAttribute('alt', '');
/* Insert preview image */
try {
var p = imgPreview.getElement().$;
if (p) p.appendChild(this);
} catch (e) {}
}; | Base | 1 |
mxResources.get("dragImagesHere"));f.appendChild(y);var A={},B=null,I=null,O=null;e=function(D){"true"!=mxEvent.getSource(D).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(D))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var t=new mxUrlConverter,z=!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(D){y.style.cursor="";for(var G= | Base | 1 |
function(){d.find('input[type="reset"]').click();d.dialog("close")},e="reset"):(c=function(){d.submit()},e="submit");buttonsOpts.push({text:b.val(),click:c,"class":e})}),d.find(".fc_confirm_bar").hide());d.dialog({create:function(b,c){a(".ui-widget-header").removeClass("ui-corner-all").addClass("ui-corner-top")},open:function(a,b){"undefined"!=typeof functionOpen&&!1!==functionOpen&&functionOpen.call(this)},modal:!0,closeOnEscape:!0,title:b,minWidth:600,minHeight:400,buttons:buttonsOpts})})})}})(jQuery);function toTimeString(a){return(new Date(1E3*a)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0]}function TimeStringToSecs(a){a=a.split(":");return 3600*+a[0]+60*+a[1]+ +a[2]} | Base | 1 |
function identity($) {return $;} | Class | 2 |
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(A,
B){null!=B.shortcut&&900>d&&!mxClient.IS_IOS?A.firstChild.nextSibling.setAttribute("title",B.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var A=this.userElement;A.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+A.style.display;A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.userImage+")";A.style.backgroundPosition="center center"; | Base | 1 |
object: function() {
var properties = [], property;
if (this.peekToken().text !== '}') {
do {
if (this.peek('}')) {
// Support trailing commas per ES5.1.
break;
}
property = {type: AST.Property, kind: 'init'};
if (this.peek().constant) {
property.key = this.constant();
property.computed = false;
this.consume(':');
property.value = this.expression();
} else if (this.peek().identifier) {
property.key = this.identifier();
property.computed = false;
if (this.peek(':')) {
this.consume(':');
property.value = this.expression();
} else {
property.value = property.key;
}
} else if (this.peek('[')) {
this.consume('[');
property.key = this.expression();
this.consume(']');
property.computed = true;
this.consume(':');
property.value = this.expression();
} else {
this.throwError('invalid key', this.peek());
}
properties.push(property);
} while (this.expect(','));
}
this.consume('}');
return {type: AST.ObjectExpression, properties: properties };
}, | Class | 2 |
(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,za,wa){for(var Ea=[],Da=0;Da<Ta.length;Da++){var La=
Ta[Da];Ea.push(null==La?null:new mxPoint((ua+La.x+za)*ia,(ya+La.y+wa)*ia))}return Ea},M=this,T=this.graph,ca=T.model,ia=T.view.scale,ma=this.state,pa=this.selectionBorder,ua=this.state.origin.x+T.view.translate.x,ya=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Fa=T.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ca.getChildCells(Fa[0].cell,!0),Oa=T.getTableLines(this.state.cell,!1,!0),Qa=T.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this, | Class | 2 |
labels: templateInstance.topTasks.get().map((task) => task._id), | Base | 1 |
ConversationSchema.findOneAndUpdate({ _id: cId }, { updatedAt: new Date() }, { new: false }, function (
err,
convo
) {
if (err) return done(err)
if (convo === null || convo === undefined) {
return done('Invalid Conversation: ' + convo)
}
return done(null, convo)
})
}, | Class | 2 |
if(null!=d&&d==c)return a}for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},getFunctionName:function(a){var b=null;null!=a&&(null!=a.name?b=a.name:(b=mxUtils.trim(a.toString()),/^function\s/.test(b)&&(b=mxUtils.ltrim(b.substring(9)),a=b.indexOf("("),0<a&&(b=b.substring(0,a)))));return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},forEach:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)b(a[c]);
return a},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null==a||isNaN(a.nodeType)||null!=b&&a.nodeName.toLowerCase()!=b.toLowerCase()?!1:null==c||a.getAttribute(c)==d},isAncestorNode:function(a,b){for(;null!=b;){if(b==a)return!0;b=b.parentNode}return!1},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;var c=[];for(a= | 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()|| | Class | 2 |
Progress.prototype.font = function(family){
this._font = family;
return this;
}; | Base | 1 |
mxResources.get("dragImagesHere"));l.appendChild(x);var A={},z=null,L=null,M=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=M&&(M(),M=null,mxEvent.consume(F))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var n=new mxUrlConverter,y=!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(F){x.style.cursor="";for(var G= | Base | 1 |
N||null!=T.pageId&&T.pageId==N){U();for(N=0;N<T.removed.length;N++){var Q=T.removed[N];if(null!=Q){var R=J[Q];delete J[Q];null!=R&&R.destroy()}}for(N=0;N<T.added.length;N++)Q=T.added[N],null!=Q&&(R=l.model.getCell(Q),null!=R&&(J[Q]=l.highlightCell(R,y[u].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",M))}}function d(M,W){if(!K&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:W,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){V("sendSignal",
{to:M,from:z,signal:X})});U.on("error",function(X){delete L[M];EditorUi.debug("P2PCollab: p2p socket error",X);!P&&W&&U.destroyed&&O[M]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",M),d(M,!0))});U.on("connect",function(){delete L[M];null==C[M]||C[M].destroyed?(C[M]=U,O[M]=!0,EditorUi.debug("P2PCollab: p2p socket connected",M)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",M))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
M),k(I[M]),delete C[M])});U.on("data",v);return L[M]=U}}function g(M,W){k(W||I[M]);null!=M&&(delete I[M],O[M]=!1)}function k(M){var W=y[M];if(null!=W){var U=W.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=W.cursor&&null!=W.cursor.parentNode&&W.cursor.parentNode.removeChild(W.cursor);clearTimeout(W.inactiveTO);delete y[M]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "), | 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 e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,A=!0,B=!1,I={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(K){g=K};this.setAutoClose=function(K){k=K};this.setAutoInsert= | 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 |
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; | Class | 2 |
c,b){var e=function(h,f,l){var p=function(n){n&&(this.res=n)};p.prototype=h;p.prototype.constructor=p;h=new p(l);for(var k in f||{})l=f[k],h[k]=l.slice?l.slice():l;return h},g={res:e(c.res,b.res)};g.formatter=e(c.formatter,b.formatter,g.res);g.parser=e(c.parser,b.parser,g.res);t[a]=g};d.compile=function(a){for(var c=/\[([^\[\]]*|\[[^\[\]]*\])*\]|([A-Za-z])\2+|\.{3}|./g,b,e=[a];b=c.exec(a);)e[e.length]=b[0];return e};d.format=function(a,c,b){c="string"===typeof c?d.compile(c):c;a=d.addMinutes(a,b? | Class | 2 |
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==
na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,
Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;
ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ca;Ca=!0;ba.src="/images/aui-wait.gif";fa.isExt?e(fa,oa,function(){A(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ia(fa.url,oa)}}function n(fa,ca,ba){if(null!=C){for(var ja=C.className.split(" "),ia=0;ia<ja.length;ia++)if(-1<ja[ia].indexOf("Active")){ja.splice(ia,1);break}C.className=ja.join(" ")}null!=fa?(C=fa,C.className+=" "+ca,I=ba,Ba.className="geTempDlgCreateBtn"):(I=C=null,Ba.className= | Class | 2 |
O.push(B);z.appendChild(B);var D=function(ea){ya.style.display="none";ka.style.display="none";Z.style.left="30px";n(ea?-1:1);null==V&&(V=Pa);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var ta=function(xa,wa,ua){J=0;R.stop();Pa=xa;ua=ua||{};var va=0,ha;for(ha in ua)va+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==xa.length&&0==va)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<va){ya.style.display="";Z.style.left="160px";ya.innerHTML="";
Ma=0;sa={"draw.io":xa};for(ha in ua)sa[ha]=ua[ha];A()}else N(!0)};ea?p(I.value,ta):m(ta)};m&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){D()}),z.appendChild(B),O.push(B));if(p){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(B);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(ea){13== | Base | 1 |
!0,!0):m(!1,k)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var k=new FileReader;k.onload=mxUtils.bind(this,function(){this.parseFileData(k.result,e,g)});k.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var k=new XMLHttpRequest;k.open("POST",OPEN_URL);k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.onreadystatechange=function(){e(k)};k.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,q,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),A=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,q))try{var z=Math.max(x/m,A/m);if(1<z){var L=Math.round(x/z),M=Math.round(A/z),n=document.createElement("canvas");n.width=L;n.height=M;n.getContext("2d").drawImage(c,0,0,L,M);var y= | Base | 1 |
function parsepath(path) {
var arr = path.split('.');
var builder = [];
var all = [];
for (var i = 0; i < arr.length; i++) {
var p = arr[i];
var index = p.indexOf('[');
if (index === -1) {
if (p.indexOf('-') === -1) {
all.push(p);
builder.push(all.join('.'));
} else {
var a = all.splice(all.length - 1);
all.push(a + '[\'' + p + '\']');
builder.push(all.join('.'));
}
} else {
if (p.indexOf('-') === -1) {
all.push(p.substring(0, index));
builder.push(all.join('.'));
all.splice(all.length - 1);
all.push(p);
builder.push(all.join('.'));
} else {
all.push('[\'' + p.substring(0, index) + '\']');
builder.push(all.join(''));
all.push(p.substring(index));
builder.push(all.join(''));
}
}
}
return builder;
} | Base | 1 |
(va.appendChild(Z),va.appendChild(fa),ba.appendChild(va));return{div:ba,refresh:aa}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var E in Graph.customFontElements){var J=Graph.customFontElements[E];u.push({name:J.name,url:J.url})}return u};Graph.prototype.setFont=function(u,E){Graph.addFont(u,E);document.execCommand("fontname",!1,u);if(null!=E){var J=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(u,E);for(var T=0;T<J.length;T++)J[T].getAttribute("face")==
u&&J[T].getAttribute("data-font-src")!=E&&J[T].setAttribute("data-font-src",E)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var E in u)this.globalVars[E]= | Class | 2 |
function add (args, where, cb) {
// this is hot code. almost everything passes through here.
// the args can be any of:
// ['url']
// ['pkg', 'version']
// ['pkg@version']
// ['pkg', 'url']
// This is tricky, because urls can contain @
// Also, in some cases we get [name, null] rather
// that just a single argument.
var usage = 'Usage:\n' +
' npm cache add <tarball-url>\n' +
' npm cache add <pkg>@<ver>\n' +
' npm cache add <tarball>\n' +
' npm cache add <folder>\n'
var spec
log.silly('cache add', 'args', args)
if (args[1] === undefined) args[1] = null
// at this point the args length must ==2
if (args[1] !== null) {
spec = args[0] + '@' + args[1]
} else if (args.length === 2) {
spec = args[0]
}
log.verbose('cache add', 'spec', spec)
if (!spec) return cb(usage)
adding++
cb = afterAdd(cb)
realizePackageSpecifier(spec, where, function (err, p) {
if (err) return cb(err)
log.silly('cache add', 'parsed spec', p)
switch (p.type) {
case 'local':
case 'directory':
addLocal(p, null, cb)
break
case 'remote':
// get auth, if possible
mapToRegistry(spec, npm.config, function (err, uri, auth) {
if (err) return cb(err)
addRemoteTarball(p.spec, { name: p.name }, null, auth, cb)
})
break
case 'git':
case 'hosted':
addRemoteGit(p.rawSpec, cb)
break
default:
if (p.name) return addNamed(p.name, p.spec, null, cb)
cb(new Error("couldn't figure out how to install " + spec))
}
})
} | Class | 2 |
mxEvent.getClientX(za);I.popupMenuHandler.hideMenu();mxEvent.consume(za)});mxEvent.addGestureListeners(document.body,null,function(za){var wa=!1;null!=Ma&&(U.diagramContainer.style.width=Math.max(20,Qa+mxEvent.getClientX(za)-Ma)+"px",wa=!0);null!=Oa&&(U.diagramContainer.style.height=Math.max(20,Ta+mxEvent.getClientY(za)-Oa)+"px",wa=!0);wa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
"*"),Z(),U.refresh())},function(za){null==Ma&&null==Oa||mxEvent.consume(za);Oa=Ma=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";P.style.visibility="hidden";W.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}}; | 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 Qa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Qa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.graph.connectionHandler.isEnabled()})};var Ta=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= | Base | 1 |
function flexibleAddSighting(clicked, type, attribute_id, event_id, value, page, placement) {
var $clicked = $(clicked);
var hoverbroken = false;
$clicked.off('mouseleave.temp').on('mouseleave.temp', function() {
hoverbroken = true;
});
setTimeout(function() {
$clicked.off('mouseleave.temp');
if ($clicked.is(":hover") && !hoverbroken) {
var html = '<div>'
+ '<button class="btn btn-primary" onclick="addSighting(\'' + type + '\', \'' + attribute_id + '\', \'' + event_id + '\', \'' + page + '\')">This attribute</button>'
+ '<button class="btn btn-primary" style="margin-left:5px;" onclick="fetchAddSightingForm(\'' + type + '\', \'' + attribute_id + '\', \'' + page + '\', true)">Global value</button>'
+ '</div>';
openPopover(clicked, html, true, placement);
}
}, 1000);
} | Base | 1 |
this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),y,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; | Base | 1 |
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,k,m,q,v){q=null!=q?q:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var x=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=x+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(A){}try{v||null==window.console||console.error(q,c,e,g,k,m)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport= | Base | 1 |
AnsiUp.prototype.escape_txt_for_html = function (txt) {
return txt.replace(/[&<>]/gm, function (str) {
if (str === "&")
return "&";
if (str === "<")
return "<";
if (str === ">")
return ">";
});
}; | Base | 1 |
_removeCurrentsFromItems: function() {
var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
this.items = $.grep(this.items, function (item) {
for (var j=0; j < list.length; j++) {
if(list[j] === item.item[0]) {
return false;
}
}
return true;
});
}, | Base | 1 |
var formatValue = function (name, value) {
if (name == 'user_host') {
return value.replace(/(\[.*?\])+/g, '');
}
return value;
}; | 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 |
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 |
var doSynchronize = function(requisition, rescanExisting) {
RequisitionsService.startTiming();
RequisitionsService.synchronizeRequisition(requisition.foreignSource, rescanExisting).then(
function() { // success
growl.success('The import operation has been started for ' + requisition.foreignSource + ' (rescanExisting? ' + rescanExisting + ')<br/>Use <b>refresh</b> to update the deployed statistics');
requisition.setDeployed(true);
},
errorHandler
);
}; | Base | 1 |
G&&(D.filename=G.getTitle());D.pagecount=null!=d.pages?d.pages.length:1;D.page=null!=d.currentPage?d.currentPage.getName():"";D.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return D};var O=g.getGlobalVariable;g.getGlobalVariable=function(D){var G=d.getCurrentFile();return"filename"==D&&null!=G?G.getTitle():"page"==D&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==D?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
"pagecount"==D?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var t=g.labelLinkClicked;g.labelLinkClicked=function(D,G,P){var K=G.getAttribute("href");if(null==K||!g.isCustomLink(K)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!g.isEnabled()||null!=D&&g.isCellLocked(D.cell))g.customLinkClicked(K),g.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var D=d.defaultFilename,G=d.getCurrentFile();null!=G&&(D=null!=G.getTitle()? | Base | 1 |
function(){k.checked&&(null==g||g.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===q.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",
y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");x.innerHTML="";x.appendChild(y)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic")); | Base | 1 |
size : function(file1, file2) {
var size1 = parseInt(file1.size) || 0,
size2 = parseInt(file2.size) || 0;
return size1 == size2 ? 0 : size1 > size2 ? 1 : -1;
}, | Base | 1 |
function toKeyValue(obj) {
var parts = [];
forEach(obj, function(value, key) {
if (isArray(value)) {
forEach(value, function(arrayValue) {
parts.push(encodeUriQuery(key, true) +
(arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
});
} else {
parts.push(encodeUriQuery(key, true) +
(value === true ? '' : '=' + encodeUriQuery(value, true)));
}
});
return parts.length ? parts.join('&') : '';
} | Class | 2 |
EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas"); | Class | 2 |
"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",D=document.createElement("div"),D.style.position="absolute",D.style.width="420px",D.style.top="58%",D.style.textAlign="center",D.style.fontSize="18px",D.style.color="#a0c3ff",mxUtils.write(D,mxResources.get("dragImagesHere")),k.appendChild(D));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,u,t,D){function c(n,y,K){K=mxUtils.button("",K);
K.className="geBtn";K.setAttribute("title",y);y=document.createElement("img");y.style.height="26px";y.style.width="26px";y.setAttribute("src",n);K.style.minWidth="42px";K.style.verticalAlign="middle";K.appendChild(y);M.appendChild(K)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow= | Base | 1 |
NewListFromSelection.prototype.convertToAddToList = function (listId, dialogState) {
var that = this;
var addToList = this.massActionsManager.massActionObjects['addToList'];
var newListName = this.dialogElem$.find ('.new-list-name');
var listName = $(newListName).val ();
addToList.addListOption (listId, listName);
addToList.setListId (listId);
addToList.progressBar = this.progressBar;
addToList.recordCount = this.recordCount;
dialogState.superExecuteParams.listId = listId;
dialogState.superExecuteParams.massAction = addToList.massActionName;
return addToList;
}; | Class | 2 |
mxActor);Za.prototype.arrowWidth=.3;Za.prototype.arrowSize=.2;Za.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Za);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ | Base | 1 |
eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)"); | Class | 2 |
Graph.prototype.openLink=function(a,c,f){var e=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=c?c:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e}; | Base | 1 |
function(K){l=K};this.setAutoScroll=function(K){p=K};this.setOpenFill=function(K){q=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){B=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){O=K};this.setBrushSize=function(K){I.size=K};this.getBrushSize=function(){return I.size};var t=function(K){y=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | Class | 2 |
notNull: function(expression) {
return expression + '!=null';
}, | Class | 2 |
S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!= | Class | 2 |
function loadMoreMessages () {
if (!$enabled || $loading) return false
if (_.isUndefined($convoId)) return false
$loading = true
$spinner.removeClass('uk-hidden')
// Load Messages
$.ajax({
url: '/api/v1/messages/conversation/' + $convoId + '?page=' + $nextPage
})
.done(function (data) {
$spinner.addClass('uk-hidden')
var messages = data.messages
if (_.size(messages) < 1) {
$enabled = false
$loading = false
return false
}
var html = ''
_.each(messages, function (m) {
var h = buildMessageHTML(m)
if (h.length > 0) html += h
})
var stage = $('<div></div>')
.appendTo('body')
.addClass('stage')
.css({
opacity: 0,
visibility: 'hidden',
position: 'absolute',
top: '-9999em',
left: '-9999em'
})
.append(html)
var height = $(stage).outerHeight()
$(stage).remove()
$messagesWrapper.prepend(html)
UIKit.$html.trigger('changed.uk.dom')
$messageScroller.scrollTop(height, true)
$nextPage = $nextPage + 1
$loading = false
})
.error(function (err) {
console.log(err)
})
} | Class | 2 |
v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(q);k=m.getAllConnectionConstraints(x);for(var A=0;null!=k&&A<k.length;A++){var z=m.getConnectionPoint(x,k[A]);t(z.x-3,z.y-3)}m.fit(8);m.center();A=mxUtils.button("",function(){m.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF? | Class | 2 |
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,
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x); | Class | 2 |
Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.tooltipMouseDown=null;Sidebar.prototype.refresh=function(){this.graph.stylesheet.styles=mxUtils.clone(this.editorUi.editor.graph.stylesheet.styles);this.container.innerHTML="";this.palettes={};this.init()}; | 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 |
Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),E=0;do var J=this.model.getChildAt(this.model.root,E);while(E++<u&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+ | 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 |
document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",T);N.setAttribute("as","font");N.setAttribute("crossorigin","");E.parentNode.insertBefore(N,E)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=
u?u:Editor.GUID_LENGTH;for(var E=[],J=0;J<u;J++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u): | Class | 2 |
c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var q=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds();
g=e+(" "+(g+"-"+k+"-"+q+"-"+v+"-"+x+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var k=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null); | Class | 2 |
p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()||
null==n||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),e.className="geBtn",q.appendChild(e));g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});g.className="geBtn";d&&(g.style.display="none");b.editor.cancelFirst&&q.appendChild(g);m=mxUtils.button(m||mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,
null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,A){x=mxUtils.button(x,function(B){y(B)});null!=A&&x.setAttribute("title",A);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function A(ha){Fa.innerHTML=mxUtils.htmlEntities(ha);Fa.style.display="block"; | Class | 2 |
ignore_cert_errors: $("#ignore_cert_errors").prop("checked"),
headers: headers,
}
}
btnHtml = $("#sendTestModalSubmit").html()
$("#sendTestModalSubmit").html('<i class="fa fa-spinner fa-spin"></i> Sending')
// Send the test email
api.send_test_email(test_email_request)
.success(function (data) {
$("#sendTestEmailModal\\.flashes").empty().append("<div style=\"text-align:center\" class=\"alert alert-success\">\
<i class=\"fa fa-check-circle\"></i> Email Sent!</div>")
$("#sendTestModalSubmit").html(btnHtml)
})
.error(function (data) {
$("#sendTestEmailModal\\.flashes").empty().append("<div style=\"text-align:center\" class=\"alert alert-danger\">\
<i class=\"fa fa-exclamation-circle\"></i> " + data.responseJSON.message + "</div>")
$("#sendTestModalSubmit").html(btnHtml)
})
} | Base | 1 |
$scope.initialize = function(customHandler) {
var value = $cookies.get('requisitions_page_size');
if (value) {
$scope.pageSize = value;
}
growl.success('Retrieving requisition ' + $scope.foreignSource + '...');
RequisitionsService.getRequisition($scope.foreignSource).then(
function(requisition) { // success
$scope.requisition = requisition;
$scope.filteredNodes = requisition.nodes;
$scope.updateFilteredNodes();
if (customHandler) {
customHandler();
}
},
$scope.errorHandler
);
}; | Base | 1 |
function AnsiUp() {
this.VERSION = "4.0.3";
this.setup_palettes();
this._use_classes = false;
this._escape_for_html = true;
this.bold = false;
this.fg = this.bg = null;
this._buffer = '';
this._url_whitelist = { 'http': 1, 'https': 1 };
} | Base | 1 |
ua.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c, | Base | 1 |
var _doRequest = function(client, socket) {
if(socket.isConnected()) {
// already connected
socket.options.request.connectTime = +new Date();
socket.connected({
type: 'connect',
id: socket.id
});
} else {
// connect
socket.options.request.connectTime = +new Date();
socket.connect({
host: client.url.host,
port: client.url.port,
policyPort: client.policyPort,
policyUrl: client.policyUrl
});
}
}; | Base | 1 |
"url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var ua=!1,la=mxUtils.bind(this,function(){P.innerHTML="";if(!ua){var ca=function(ia,ma,qa){ia=F("",ia.funct,null,ma,ia,qa);ia.style.width="40px";ia.style.opacity="0.7";return ba(ia,null,"pointer")},ba=function(ia,ma,qa){null!=ma&&ia.setAttribute("title",ma);ia.style.cursor=null!=qa?qa:"default";ia.style.margin="2px 0px";P.appendChild(ia);mxUtils.br(P);
return ia};ba(E.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ba(E.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", | Class | 2 |
html: "Unable to login to <b>" + $("#imaphost").val() + "</b>.",
type: "error",
showCancelButton: true,
cancelButtonText: "Close",
confirmButtonText: "More Info",
confirmButtonColor: "#428bca",
allowOutsideClick: false,
}).then(function(result) {
if (result.value) {
Swal.fire({
title: "Error:",
text: data.message,
})
}
})
}
})
.fail(function() {
Swal.fire({
title: "Failed!",
text: "An unecpected error occured.",
type: "error",
})
})
.always(function() {
//Re-enable inputs and change button text
$("#imaphost").attr("disabled", false);
$("#imapport").attr("disabled", false);
$("#imapusername").attr("disabled", false);
$("#imappassword").attr("disabled", false);
$("#use_imap").attr("disabled", false);
$("#use_tls").attr("disabled", false);
$("#folder").attr("disabled", false);
$("#restrictdomain").attr("disabled", false);
$('#deletecampaign').attr("disabled", false);
$('#lastlogin').attr("disabled", false);
$('#imapfreq').attr("disabled", false);
$("#validateimap").attr("disabled", false);
$("#validateimap").html(oldHTML);
});
}); //end testclick | Base | 1 |
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")}, | Base | 1 |
global.onerror = function(err, url, line){
fn(new Error(err + ' (' + url + ':' + line + ')'));
return true;
}; | Base | 1 |
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var k=
this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerHTML="")}; | 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()|| | Class | 2 |
var isValidKey = function (key) {
return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';
}; | Variant | 0 |
function route(method, path, middleware, routeHandler, resultHandler, transactional = true) {
router[method](path, ...middleware, (req, res, next) => {
const start = Date.now();
try {
cls.namespace.bindEmitter(req);
cls.namespace.bindEmitter(res);
const result = cls.init(() => {
cls.set('componentId', req.headers['trilium-component-id']);
cls.set('localNowDateTime', req.headers['trilium-local-now-datetime']);
cls.set('hoistedNoteId', req.headers['trilium-hoisted-note-id'] || 'root');
const cb = () => routeHandler(req, res, next);
return transactional ? sql.transactional(cb) : cb();
});
if (resultHandler) {
if (result && result.then) {
result
.then(actualResult => {
const responseLength = resultHandler(req, res, actualResult);
log.request(req, res, Date.now() - start, responseLength);
})
.catch(e => {
log.error(`${method} ${path} threw exception: ` + e.stack);
res.status(500).send(e.message);
});
}
else {
const responseLength = resultHandler(req, res, result);
log.request(req, res, Date.now() - start, responseLength);
}
}
}
catch (e) {
log.error(`${method} ${path} threw exception: ` + e.stack);
res.status(500).send(e.message);
}
});
} | Base | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.