mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
parent
1378ca9844
commit
3a19cf8543
@ -1,107 +0,0 @@
|
||||
/*global define:false */
|
||||
/* bpapp.js */
|
||||
// TODO: Will be moved to module, loader instead of Apache Match voodo is
|
||||
// still missing right now
|
||||
|
||||
define(['jquery', 'icinga/icinga'], function ($, Icinga) {
|
||||
'use strict';
|
||||
|
||||
return {
|
||||
/**
|
||||
* Tell Icinga about our event handlers
|
||||
*/
|
||||
eventHandlers: {
|
||||
'table.businessprocess th.bptitle': {
|
||||
'mouseover': 'titleMouseOver',
|
||||
'mouseout' : 'titleMouseOut'
|
||||
},
|
||||
'table.businessprocess th': {
|
||||
'click': 'titleClicked'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Add 'hovered' class to hovered title elements
|
||||
*
|
||||
* TODO: Skip on tablets
|
||||
*/
|
||||
titleMouseOver: function (event) {
|
||||
event.stopPropagation();
|
||||
var el = $(event.delegateTarget);
|
||||
el.addClass('hovered');
|
||||
},
|
||||
/**
|
||||
* Remove 'hovered' class from hovered title elements
|
||||
*
|
||||
* TODO: Skip on tablets
|
||||
*/
|
||||
titleMouseOut: function (event) {
|
||||
event.stopPropagation();
|
||||
var el = $(event.delegateTarget);
|
||||
el.removeClass('hovered');
|
||||
},
|
||||
/**
|
||||
* Handle clicks on operator or title element
|
||||
*
|
||||
* Title shows subelement, operator unfolds all subelements
|
||||
*/
|
||||
titleClicked: function (event) {
|
||||
event.stopPropagation();
|
||||
var el = $(event.delegateTarget),
|
||||
affected = [];
|
||||
if (el.hasClass('operator')) {
|
||||
affected = el.closest('table').children('tbody')
|
||||
.children('tr.children').children('td').children('table');
|
||||
|
||||
// Only if there are child BPs
|
||||
if (affected.find('th.operator').length < 1) {
|
||||
affected = el.closest('table');
|
||||
}
|
||||
} else {
|
||||
affected = el.closest('table');
|
||||
}
|
||||
affected.each(function (key, el) {
|
||||
var bptable = $(el).closest('table');
|
||||
bptable.toggleClass('collapsed');
|
||||
if (bptable.hasClass('collapsed')) {
|
||||
bptable.find('table').addClass('collapsed');
|
||||
}
|
||||
});
|
||||
el.closest('.icinga-container').data('icingaparams', {
|
||||
// TODO: remove namespace
|
||||
opened: Icinga.module('bpapp').listOpenedBps()
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get a list of all currently opened BPs.
|
||||
*
|
||||
* Only get the deepest nodes to keep requests as small as possible
|
||||
*/
|
||||
listOpenedBps: function () {
|
||||
var ids = [];
|
||||
$('.bpapp').find('table').not('.collapsed').each(function (key, el) {
|
||||
if ($(el).find('table').not('.collapsed').length === 0) {
|
||||
var search = true,
|
||||
this_id = $(el)[0].id,
|
||||
cnt = 0,
|
||||
current = el,
|
||||
parent;
|
||||
while (search && cnt < 40) {
|
||||
cnt++;
|
||||
parent = $(current).parent().closest('table')[0];
|
||||
if (!parent || $(parent).hasClass('bpapp')) {
|
||||
search = false;
|
||||
} else {
|
||||
current = parent;
|
||||
this_id = parent.id + '_' + this_id;
|
||||
}
|
||||
}
|
||||
if (this_id) {
|
||||
ids.push(this_id);
|
||||
}
|
||||
}
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
@ -8,141 +8,141 @@
|
||||
*
|
||||
*/
|
||||
define(['jquery', 'logging', 'icinga/componentRegistry'], function ($, log, registry) {
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
var ComponentLoader = function() {
|
||||
var ComponentLoader = function() {
|
||||
|
||||
/**
|
||||
* Load the component with the given type and attach it to the target
|
||||
*
|
||||
* @param {String} cmpType The component type to load '<module>/<component>'
|
||||
* @param {HTMLElement} target The targeted dom node
|
||||
* @param {function} fin The called when the component was successfully loaded
|
||||
* @param {function} err The error-callback
|
||||
*/
|
||||
var loadComponent = function(cmpType, target, fin, err) {
|
||||
requirejs(
|
||||
['modules/' + cmpType],
|
||||
function (Cmp) {
|
||||
var cmp;
|
||||
try {
|
||||
cmp = new Cmp(target);
|
||||
} catch (e) {
|
||||
log.emergency(e);
|
||||
err(e);
|
||||
return;
|
||||
}
|
||||
if (fin) {
|
||||
fin(cmp);
|
||||
}
|
||||
},
|
||||
function (ex) {
|
||||
if (!ex) {
|
||||
return;
|
||||
}
|
||||
log.emergency('Component "' + cmpType + '" could not be loaded.', ex);
|
||||
if (err) {
|
||||
err(ex);
|
||||
}
|
||||
/**
|
||||
* Load the component with the given type and attach it to the target
|
||||
*
|
||||
* @param {String} cmpType The component type to load '<module>/<component>'
|
||||
* @param {HTMLElement} target The targeted dom node
|
||||
* @param {function} fin The called when the component was successfully loaded
|
||||
* @param {function} err The error-callback
|
||||
*/
|
||||
var loadComponent = function(cmpType, target, fin, err) {
|
||||
requirejs(
|
||||
['modules/' + cmpType],
|
||||
function (Cmp) {
|
||||
var cmp;
|
||||
try {
|
||||
cmp = new Cmp(target);
|
||||
} catch (e) {
|
||||
log.emergency(e);
|
||||
err(e);
|
||||
return;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Load all new components and remove components that were removed from
|
||||
* the DOM from the internal registry
|
||||
*
|
||||
* @param {function} fin Called when the loading is completed
|
||||
*/
|
||||
this.load = function(fin) {
|
||||
|
||||
/*
|
||||
* Count the amount of pending callbacks to make sure everything is loaded
|
||||
* when calling the garbage collection.
|
||||
*/
|
||||
var pendingFns = 1;
|
||||
|
||||
var finalize = function() {
|
||||
pendingFns--;
|
||||
/*
|
||||
* Only return when all components are loaded
|
||||
*/
|
||||
if (pendingFns === 0) {
|
||||
registry.removeInactive();
|
||||
if (fin) {
|
||||
fin();
|
||||
}
|
||||
if (fin) {
|
||||
fin(cmp);
|
||||
}
|
||||
};
|
||||
|
||||
registry.markAllInactive();
|
||||
|
||||
$('div[data-icinga-component]')
|
||||
.each(function(index, el) {
|
||||
var type = $(el).attr('data-icinga-component');
|
||||
pendingFns++;
|
||||
|
||||
if (!el.id || !registry.getById(el.id)) {
|
||||
loadComponent(
|
||||
type,
|
||||
el,
|
||||
function(cmp) {
|
||||
var id = registry.add(cmp, el.id, type);
|
||||
registry.markActive(id);
|
||||
el.id = id;
|
||||
finalize();
|
||||
},
|
||||
finalize
|
||||
);
|
||||
} else {
|
||||
registry.markActive(el.id);
|
||||
finalize();
|
||||
}
|
||||
});
|
||||
finalize();
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the id of the given component, if one is assigned
|
||||
*
|
||||
* @param {*} component The component of which the id should be retrieved
|
||||
*
|
||||
* @returns {String|null} The id of the component, or null
|
||||
*/
|
||||
this.getId = function(component) {
|
||||
return registry.getId(component);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the component that is assigned to the given id
|
||||
*
|
||||
* @param {String} id The id of the component
|
||||
*
|
||||
* @returns {*} The component or null
|
||||
*/
|
||||
this.getById = function(id) {
|
||||
return registry.getById(id);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get all components that match the given type
|
||||
*
|
||||
* @param {String} type The component type in the form '<module>/<component>'
|
||||
*
|
||||
* @returns {*|Array} The components or an empty array
|
||||
*/
|
||||
this.getByType = function(type) {
|
||||
return registry.getByType(type);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get all components
|
||||
*
|
||||
* @returns {*|Array} The components or an empty array
|
||||
*/
|
||||
this.getComponents = function() {
|
||||
return registry.getComponents();
|
||||
};
|
||||
},
|
||||
function (ex) {
|
||||
if (!ex) {
|
||||
return;
|
||||
}
|
||||
log.emergency('Component "' + cmpType + '" could not be loaded.', ex);
|
||||
if (err) {
|
||||
err(ex);
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
return new ComponentLoader();
|
||||
|
||||
/**
|
||||
* Load all new components and remove components that were removed from
|
||||
* the DOM from the internal registry
|
||||
*
|
||||
* @param {function} fin Called when the loading is completed
|
||||
*/
|
||||
this.load = function(fin) {
|
||||
|
||||
/*
|
||||
* Count the amount of pending callbacks to make sure everything is loaded
|
||||
* when calling the garbage collection.
|
||||
*/
|
||||
var pendingFns = 1;
|
||||
|
||||
var finalize = function() {
|
||||
pendingFns--;
|
||||
/*
|
||||
* Only return when all components are loaded
|
||||
*/
|
||||
if (pendingFns === 0) {
|
||||
registry.removeInactive();
|
||||
if (fin) {
|
||||
fin();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
registry.markAllInactive();
|
||||
|
||||
$('div[data-icinga-component]')
|
||||
.each(function(index, el) {
|
||||
var type = $(el).attr('data-icinga-component');
|
||||
pendingFns++;
|
||||
|
||||
if (!el.id || !registry.getById(el.id)) {
|
||||
loadComponent(
|
||||
type,
|
||||
el,
|
||||
function(cmp) {
|
||||
var id = registry.add(cmp, el.id, type);
|
||||
registry.markActive(id);
|
||||
el.id = id;
|
||||
finalize();
|
||||
},
|
||||
finalize
|
||||
);
|
||||
} else {
|
||||
registry.markActive(el.id);
|
||||
finalize();
|
||||
}
|
||||
});
|
||||
finalize();
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the id of the given component, if one is assigned
|
||||
*
|
||||
* @param {*} component The component of which the id should be retrieved
|
||||
*
|
||||
* @returns {String|null} The id of the component, or null
|
||||
*/
|
||||
this.getId = function(component) {
|
||||
return registry.getId(component);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the component that is assigned to the given id
|
||||
*
|
||||
* @param {String} id The id of the component
|
||||
*
|
||||
* @returns {*} The component or null
|
||||
*/
|
||||
this.getById = function(id) {
|
||||
return registry.getById(id);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get all components that match the given type
|
||||
*
|
||||
* @param {String} type The component type in the form '<module>/<component>'
|
||||
*
|
||||
* @returns {*|Array} The components or an empty array
|
||||
*/
|
||||
this.getByType = function(type) {
|
||||
return registry.getByType(type);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get all components
|
||||
*
|
||||
* @returns {*|Array} The components or an empty array
|
||||
*/
|
||||
this.getComponents = function() {
|
||||
return registry.getComponents();
|
||||
};
|
||||
};
|
||||
return new ComponentLoader();
|
||||
});
|
||||
|
10946
public/js/main-built.js
10946
public/js/main-built.js
File diff suppressed because one or more lines are too long
@ -1,33 +1,22 @@
|
||||
requirejs.config({
|
||||
baseUrl: window.base_url + '/js',
|
||||
paths: {
|
||||
jquery: 'vendor/jquery-1.8.3',
|
||||
bootstrap: 'vendor/bootstrap.min',
|
||||
eve: 'vendor/raphael/eve',
|
||||
"raphael": 'vendor/raphael/raphael.amd',
|
||||
"raphael.core": 'vendor/raphael/raphael.core',
|
||||
"raphael.svg": 'vendor/raphael/raphael.svg',
|
||||
"raphael.vml": 'vendor/raphael/raphael.vml',
|
||||
'ace' : 'vendor/ace/ace',
|
||||
"Holder": 'vendor/holder',
|
||||
"History": 'vendor/history',
|
||||
|
||||
logging: 'icinga/util/logging',
|
||||
|
||||
datetimepicker: 'vendor/datetimepicker/bootstrap-datetimepicker.min'
|
||||
'jquery': 'vendor/jquery-1.8.3',
|
||||
'bootstrap': 'vendor/bootstrap/bootstrap.min',
|
||||
'history': 'vendor/history',
|
||||
'logging': 'icinga/util/logging',
|
||||
'datetimepicker': 'vendor/bootstrap/datetimepicker.min'
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
define(['jquery','Holder', 'History'], function ($) {
|
||||
requirejs(['bootstrap']);
|
||||
define(['jquery', 'history'], function ($) {
|
||||
requirejs(['bootstrap'], function() {
|
||||
requirejs(['datetimepicker']);
|
||||
});
|
||||
|
||||
requirejs(['icinga/icinga'], function (Icinga) {
|
||||
window.$ = $;
|
||||
window.jQuery = $;
|
||||
window.Icinga = Icinga;
|
||||
});
|
||||
});
|
||||
|
||||
define(['bootstrap'], function () {
|
||||
requirejs(['datetimepicker']);
|
||||
});
|
||||
});
|
11
public/js/vendor/ace/ace.js
vendored
11
public/js/vendor/ace/ace.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/ext-searchbox.js
vendored
1
public/js/vendor/ace/ext-searchbox.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/ext-spellcheck.js
vendored
1
public/js/vendor/ace/ext-spellcheck.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/ext/spellcheck",["require","exports","module"],function(e,t,n){text.spellcheck=!0,host.on("nativecontextmenu",function(e){if(!host.selection.isEmpty())return;var t=host.getCursorPosition(),n=host.session.getWordRange(t.row,t.column),r=host.session.getTextRange(n);host.session.tokenRe.lastIndex=0;if(!host.session.tokenRe.test(r))return;var e=r+" "+PLACEHOLDER;text.value=e,text.setSelectionRange(r.length+1,r.length+1),text.setSelectionRange(0,0),inputHandler=function(t){if(t==e)return"";if(t.lastIndexOf(e)==t.length-e.length)return t.slice(0,-e.length);if(t.indexOf(e)==0)return t.slice(e.length);if(t.slice(-2)==PLACEHOLDER){var r=t.slice(0,-2);if(r.slice(-1)==" ")return r=r.slice(0,-1),host.session.replace(n,r),r}return t}})})
|
1
public/js/vendor/ace/ext-static_highlight.js
vendored
1
public/js/vendor/ace/ext-static_highlight.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text"],function(e,t,n){var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_editor {font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;font-size: 12px;}.ace_editor .ace_gutter { width: 25px !important;display: block;float: left;text-align: right; padding: 0 3px 0 0; margin-right: 3px;}.ace_line { clear: both; }*.ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}";t.render=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r("");a.setMode(t),a.setUseWorker(!1);var f=new i(document.createElement("div"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),u||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>"+(h+o)+"</span>"),f.$renderLine(l,h,!0,!1),l.push("</div>");var p="<div class=':cssClass'> <div class='ace_editor ace_scroller ace_text-layer'> :code </div> </div>".replace(/:cssClass/,n.cssClass).replace(/:code/,l.join(""));return f.destroy(),{css:s+n.cssText,html:p}}})
|
1
public/js/vendor/ace/ext-textarea.js
vendored
1
public/js/vendor/ace/ext-textarea.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/keybinding-emacs.js
vendored
1
public/js/vendor/ace/keybinding-emacs.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/keybinding-vim.js
vendored
1
public/js/vendor/ace/keybinding-vim.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-abap.js
vendored
1
public/js/vendor/ace/mode-abap.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-asciidoc.js
vendored
1
public/js/vendor/ace/mode-asciidoc.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-c9search.js
vendored
1
public/js/vendor/ace/mode-c9search.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./c9search_highlight_rules").C9SearchHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./folding/c9search").FoldMode,f=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.$outdent=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text"],regex:"(^\\s+[0-9]+)(:\\s*)(.+)"},{token:["string","text"],regex:"(.+)(:$)"}]}};r.inherits(s,i),t.C9SearchHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^(\S.*\:|Searching for.*)$/,this.foldingStopMarker=/^(\s+|Found.*)$/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getAllLines(n),s=r[n],o=/^(Found.*|Searching for.*)$/,u=/^(\S.*\:|\s*)$/,a=o.test(s)?o:u;if(this.foldingStartMarker.test(s)){for(var f=n+1,l=e.getLength();f<l;f++)if(a.test(r[f]))break;return new i(n,s.length,f,0)}if(this.foldingStopMarker.test(s)){for(var f=n-1;f>=0;f--){s=r[f];if(a.test(s))break}return new i(f,s.length,n,0)}}}.call(o.prototype)})
|
1
public/js/vendor/ace/mode-c_cpp.js
vendored
1
public/js/vendor/ace/mode-c_cpp.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-clojure.js
vendored
1
public/js/vendor/ace/mode-clojure.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-coffee.js
vendored
1
public/js/vendor/ace/mode-coffee.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-coldfusion.js
vendored
1
public/js/vendor/ace/mode-coldfusion.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-csharp.js
vendored
1
public/js/vendor/ace/mode-csharp.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-css.js
vendored
1
public/js/vendor/ace/mode-css.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-curly.js
vendored
1
public/js/vendor/ace/mode-curly.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-dart.js
vendored
1
public/js/vendor/ace/mode-dart.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./dart_highlight_rules").DartHighlightRules,u=e("./folding/cstyle").FoldMode,a=function(){var e=new o;this.foldingRules=new u,this.$tokenizer=new s(e.getRules())};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="true|false|null",t="this|super",n="try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new",r="abstract|class|extends|external|factory|implements|interface|get|native|operator|set|typedef",i="static|final|const",s="void|bool|num|int|double|Dynamic|var|String",o=this.createKeywordMapper({"constant.language.dart":e,"variable.language.dart":t,"keyword.control.dart":n,"keyword.declaration.dart":r,"storage.modifier.dart":i,"storage.type.primitive.dart":s},"identifier"),u={token:"string",regex:".+"};this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:["meta.preprocessor.script.dart"],regex:"^(#!.*)$"},{token:"keyword.other.import.dart",regex:"#(?:\\b)(?:library|import|source|resource)(?:\\b)"},{token:["keyword.other.import.dart","text"],regex:"(?:\\b)(prefix)(\\s*:)"},{regex:"\\bas\\b",token:"keyword.cast.dart"},{regex:"\\?|:",token:"keyword.control.ternary.dart"},{regex:"(?:\\b)(is\\!?)(?:\\b)",token:["keyword.operator.dart"]},{regex:"(<<|>>>?|~|\\^|\\||&)",token:["keyword.operator.bitwise.dart"]},{regex:"((?:&|\\^|\\||<<|>>>?)=)",token:["keyword.operator.assignment.bitwise.dart"]},{regex:"(===?|!==?|<=?|>=?)",token:["keyword.operator.comparison.dart"]},{regex:"((?:[+*/%-]|\\~)=)",token:["keyword.operator.assignment.arithmetic.dart"]},{regex:"=",token:"keyword.operator.assignment.dart"},{token:"string",regex:"'''",next:"qdoc"},{token:"string",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{regex:"(\\-\\-|\\+\\+)",token:["keyword.operator.increment-decrement.dart"]},{regex:"(\\-|\\+|\\*|\\/|\\~\\/|%)",token:["keyword.operator.arithmetic.dart"]},{regex:"(!|&&|\\|\\|)",token:["keyword.operator.logical.dart"]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},u],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},u],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"start"},u],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"start"},u]}};r.inherits(s,i),t.DartHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i){var s=i.index;return i[1]?this.openingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s+i[0].length,1)}if(t!=="markbeginend")return;var i=r.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}}.call(o.prototype)})
|
1
public/js/vendor/ace/mode-diff.js
vendored
1
public/js/vendor/ace/mode-diff.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./diff_highlight_rules").DiffHighlightRules,u=e("./folding/diff").FoldMode,a=function(){this.$tokenizer=new s((new o).getRules(),"i"),this.foldingRules=new u(["diff","index","\\+{3}","@@|\\*{5}"],"i")};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible"}]}};r.inherits(s,i),t.DiffHighlightRules=s}),ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return s.fromPoints(i,{row:n-1,column:r.length})}}.call(o.prototype)})
|
1
public/js/vendor/ace/mode-django.js
vendored
1
public/js/vendor/ace/mode-django.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-dot.js
vendored
1
public/js/vendor/ace/mode-dot.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-glsl.js
vendored
1
public/js/vendor/ace/mode-glsl.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-golang.js
vendored
1
public/js/vendor/ace/mode-golang.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-groovy.js
vendored
1
public/js/vendor/ace/mode-groovy.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-haml.js
vendored
1
public/js/vendor/ace/mode-haml.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-haxe.js
vendored
1
public/js/vendor/ace/mode-haxe.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-html.js
vendored
1
public/js/vendor/ace/mode-html.js
vendored
File diff suppressed because one or more lines are too long
48
public/js/vendor/ace/mode-icinga.js
vendored
48
public/js/vendor/ace/mode-icinga.js
vendored
@ -1,48 +0,0 @@
|
||||
ace.define("ace/mode/icinga",function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var IcingaHighlightRules = function() {
|
||||
var objectTypes = {
|
||||
"host" : ['host_name','alias','display_name','address','address6','parents','hostgroups','check_command','initial_state','max_check_attempts','check_interval','retry_interval','active_checks_enabled','passive_checks_enabled','check_period','obsess_over_host','check_freshness','freshness_threshold','event_handler','event_handler_enabled','low_flap_threshold','high_flap_threshold','flap_detection_enabled','flap_detection_options','failure_prediction_enabled','process_perf_data','retain_status_information','retain_nonstatus_information','contacts','contact_groups','notification_interval','first_notification_delay','notification_period','notification_options','notifications_enabled','stalking_options','notes','notes_url','action_url','icon_image','icon_image_alt','statusmap_image','2d_coords'],
|
||||
'hostgroup' : ['hostgroup_name','alias','members','hostgroup_members','notes','notes_url','action_url'],
|
||||
'service' : ['host_name','hostgroup_name','service_description','display_name','servicegroups','is_volatile','check_command','initial_state','max_check_attempts','check_interval','retry_interval','active_checks_enabled','passive_checks_enabled','check_period','obsess_over_service','check_freshness','freshness_threshold','event_handler','event_handler_enabled','low_flap_threshold','high_flap_threshold','flap_detection_enabled','flap_detection_options','failure_prediction_enabled','process_perf_data','retain_status_information','retain_nonstatus_information','notification_interval','first_notification_delay','notification_period','notification_options','notifications_enabled','contacts','contact_groups','stalking_options','notes','notes_url','action_url','icon_image','icon_image_alt']
|
||||
}
|
||||
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{token : "keyword", regex : /define/, next: 'objectdefinition'},
|
||||
{token : "doc.comment", regex : /^#.*/},
|
||||
{token : "comment", regex : /;.*$/},
|
||||
|
||||
{caseInsensitive: true}
|
||||
],
|
||||
"objectdefinition" : [
|
||||
|
||||
],
|
||||
"objects" : [
|
||||
]
|
||||
|
||||
}
|
||||
for(var object in objectTypes ) {
|
||||
this.$rules["objectdefinition"].push({
|
||||
'token' : 'keyword', regex: object+"[^{]*", next: object
|
||||
})
|
||||
this.$rules[object] = [
|
||||
{token : "paren.lparen", regex: "{ *", next: object},
|
||||
{token : "paren.rparen", regex: " *} *", next: 'start'},{
|
||||
'token' : 'variable', regex: new RegExp("^ *("+objectTypes[object].join('|')+")"), next: object
|
||||
}, {
|
||||
'token' : 'keyword', regex: 'use', next: object
|
||||
}, {
|
||||
'token' : 'variable.parameter', regex: " +[^;]*$", next: object,
|
||||
}, {token : "comment", regex : /;.*$/, next: object},{
|
||||
token : 'variable', regex : /_[^ ]*/, next: object
|
||||
}]
|
||||
}
|
||||
};
|
||||
oop.inherits(IcingaHighlightRules, TextHighlightRules);
|
||||
exports.IcingaHighlightRules = IcingaHighlightRules;
|
||||
});
|
1
public/js/vendor/ace/mode-jade.js
vendored
1
public/js/vendor/ace/mode-jade.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-java.js
vendored
1
public/js/vendor/ace/mode-java.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-javascript.js
vendored
1
public/js/vendor/ace/mode-javascript.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-json.js
vendored
1
public/js/vendor/ace/mode-json.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-jsp.js
vendored
1
public/js/vendor/ace/mode-jsp.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-jsx.js
vendored
1
public/js/vendor/ace/mode-jsx.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-latex.js
vendored
1
public/js/vendor/ace/mode-latex.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./latex_highlight_rules").LatexHighlightRules,u=e("./folding/latex").FoldMode,a=e("../range").Range,f=function(){this.$tokenizer=new s((new o).getRules()),this.foldingRules=new u};r.inherits(f,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)\%/;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"%")},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"string",regex:"\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"},{token:"comment",regex:"%.*$"}]}};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/^\s*\\(begin)|(section|subsection)\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.latexBlock=function(e,t,n){var r={"\\begin":1,"\\end":-1},i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!=="keyword")return;var a=u.value,f=r[a],l=function(){var e=i.stepForward(),t=e.type=="lparen"?i.stepForward().value:"";return f===-1&&(i.stepBackward(),t&&i.stepBackward()),t},c=[l()],h=f===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=f===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(u.type!=="keyword")continue;var d=r[u.value];if(!d)continue;var v=l();if(d===f)c.unshift(v);else if(c.shift()!==v||!c.length)break}if(c.length)return;var t=i.getCurrentTokenRow();return f===-1?new s(t,e.getLine(t).length,p,h):new s(p,h,t,i.getCurrentTokenColumn())},this.latexSection=function(e,t,n){var r=["\\subsection","\\section","\\begin","\\end"],i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword")return;var a=r.indexOf(u.value),f=0,l=t;while(u=i.stepForward()){if(u.type!=="keyword")continue;var c=r.indexOf(u.value);if(c>=2){f||(l=i.getCurrentTokenRow()-1),f+=c==2?1:-1;if(f<0)break}else if(c>=a)break}f||(l=i.getCurrentTokenRow()-1);while(l>t&&!/\S/.test(e.getLine(l)))l--;return new s(t,e.getLine(t).length,l,e.getLine(l).length)}}.call(u.prototype)})
|
1
public/js/vendor/ace/mode-less.js
vendored
1
public/js/vendor/ace/mode-less.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-liquid.js
vendored
1
public/js/vendor/ace/mode-liquid.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-lisp.js
vendored
1
public/js/vendor/ace/mode-lisp.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/lisp_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./lisp_highlight_rules").LispHighlightRules,u=function(){var e=new o;this.$tokenizer=new s(e.getRules())};r.inherits(u,i),function(){}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};r.inherits(s,i),t.LispHighlightRules=s})
|
1
public/js/vendor/ace/mode-livescript.js
vendored
1
public/js/vendor/ace/mode-livescript.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-lua.js
vendored
1
public/js/vendor/ace/mode-lua.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-luapage.js
vendored
1
public/js/vendor/ace/mode-luapage.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-lucene.js
vendored
1
public/js/vendor/ace/mode-lucene.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/lucene_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./lucene_highlight_rules").LuceneHighlightRules,u=function(){this.$tokenizer=new s((new o).getRules())};r.inherits(u,i),t.Mode=u}),ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"constant.character.negation",regex:"[\\-]"},{token:"constant.character.interro",regex:"[\\?]"},{token:"constant.character.asterisk",regex:"[\\*]"},{token:"constant.character.proximity",regex:"~[0-9]+\\b"},{token:"keyword.operator",regex:"(?:AND|OR|NOT)\\b"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"keyword",regex:"[\\S]+:"},{token:"string",regex:'".*?"'},{token:"text",regex:"\\s+"}]}};r.inherits(o,s),t.LuceneHighlightRules=o})
|
1
public/js/vendor/ace/mode-makefile.js
vendored
1
public/js/vendor/ace/mode-makefile.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./makefile_highlight_rules").MakefileHighlightRules,u=e("./folding/coffee").FoldMode,a=function(){var e=new o;this.foldingRules=new u,this.$tokenizer=new s(e.getRules())};r.inherits(a,i),function(){}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./sh_highlight_rules"),o=function(){var e=this.createKeywordMapper({keyword:s.reservedKeywords,"support.function.builtin":s.languageConstructs,"invalid.deprecated":"debugger"},"string");this.$rules={start:[{token:"string.interpolated.backtick.makefile",regex:"`",next:"shell-start"},{token:"punctuation.definition.comment.makefile",regex:/#(?=.)/,next:"comment"},{token:["keyword.control.makefile"],regex:"^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"},{token:["entity.name.function.makefile","text"],regex:"^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"}],comment:[{token:"punctuation.definition.comment.makefile",regex:/.+\\/},{token:"punctuation.definition.comment.makefile",regex:".+",next:"start"}],"shell-start":[{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:"\\w+"},{token:"string.interpolated.backtick.makefile",regex:"`",next:"start"}]}};r.inherits(o,i),t.MakefileHighlightRules=o}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z][a-zA-Z0-9_]*",c="(?:(?:\\$"+l+")|(?:"+l+"=))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"variable.language",regex:h},{token:"variable",regex:c},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]}};r.inherits(u,i),t.ShHighlightRules=u}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
|
1
public/js/vendor/ace/mode-markdown.js
vendored
1
public/js/vendor/ace/mode-markdown.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-objectivec.js
vendored
1
public/js/vendor/ace/mode-objectivec.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-ocaml.js
vendored
1
public/js/vendor/ace/mode-ocaml.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-perl.js
vendored
1
public/js/vendor/ace/mode-perl.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-pgsql.js
vendored
1
public/js/vendor/ace/mode-pgsql.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-php.js
vendored
1
public/js/vendor/ace/mode-php.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-powershell.js
vendored
1
public/js/vendor/ace/mode-powershell.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-python.js
vendored
1
public/js/vendor/ace/mode-python.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./python_highlight_rules").PythonHighlightRules,u=e("./folding/pythonic").FoldMode,a=e("../range").Range,f=function(){this.$tokenizer=new s((new o).getRules()),this.foldingRules=new u("\\:")};r.inherits(f,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)#/;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var u=new a(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);u.start.row=o,u.end.row=o,u.end.column=l[0].length,t.replace(u,l[1])}}else t.indentRows(n,r,"#")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[\:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.$tokenizer.getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new a(n,r.length-i.length,n,r.length))}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",regex:i+'"{3}.*$',next:"qqstring"},{token:"string",regex:i+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:i+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",regex:i+"'{3}.*$",next:"qstring"},{token:"string",regex:i+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",regex:".+"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)})
|
1
public/js/vendor/ace/mode-r.js
vendored
1
public/js/vendor/ace/mode-r.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-rdoc.js
vendored
1
public/js/vendor/ace/mode-rdoc.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,u=e("./rdoc_highlight_rules").RDocHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,f=function(e){this.$tokenizer=new s((new u).getRules()),this.$outdent=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./latex_highlight_rules"),u=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:"text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell.text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell.text",regex:"\\s+"},{token:"nospell.text",regex:"\\w+"}]}};r.inherits(u,s),t.RDocHighlightRules=u}),ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"string",regex:"\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"},{token:"comment",regex:"%.*$"}]}};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i})
|
1
public/js/vendor/ace/mode-rhtml.js
vendored
1
public/js/vendor/ace/mode-rhtml.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-ruby.js
vendored
1
public/js/vendor/ace/mode-ruby.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-scad.js
vendored
1
public/js/vendor/ace/mode-scad.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-scala.js
vendored
1
public/js/vendor/ace/mode-scala.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-scheme.js
vendored
1
public/js/vendor/ace/mode-scheme.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/scheme_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./scheme_highlight_rules").SchemeHighlightRules,u=function(){var e=new o;this.$tokenizer=new s(e.getRules())};r.inherits(u,i),function(){}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq?|eqv?|equal?|and|or|not|null?",n="#t|#f",r="cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.scheme","text","entity.name.function.scheme"],regex:"(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:"punctuation.definition.constant.character.scheme",regex:"#:\\S+"},{token:["punctuation.definition.variable.scheme","variable.other.global.scheme","punctuation.definition.variable.scheme"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"#[xXoObB][0-9a-fA-F]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"},{token:i,regex:"[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.scheme",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}]}};r.inherits(s,i),t.SchemeHighlightRules=s})
|
1
public/js/vendor/ace/mode-scss.js
vendored
1
public/js/vendor/ace/mode-scss.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-sh.js
vendored
1
public/js/vendor/ace/mode-sh.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/sh_highlight_rules","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./sh_highlight_rules").ShHighlightRules,u=e("../range").Range,a=function(){this.$tokenizer=new s((new o).getRules())};r.inherits(a,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=/^(\s*)#/;for(var o=n;o<=r;o++)if(!s.test(t.getLine(o))){i=!1;break}if(i){var a=new u(0,0,0,0);for(var o=n;o<=r;o++){var f=t.getLine(o),l=f.match(s);a.start.row=o,a.end.row=o,a.end.column=l[0].length,t.replace(a,l[1])}}else t.indentRows(n,r,"#")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.$tokenizer.getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[\:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.$tokenizer.getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))}}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set",o=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z][a-zA-Z0-9_]*",c="(?:(?:\\$"+l+")|(?:"+l+"=))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"variable.language",regex:h},{token:"variable",regex:c},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]}};r.inherits(u,i),t.ShHighlightRules=u})
|
1
public/js/vendor/ace/mode-sql.js
vendored
1
public/js/vendor/ace/mode-sql.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/sql_highlight_rules","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./sql_highlight_rules").SqlHighlightRules,u=e("../range").Range,a=function(){this.$tokenizer=new s((new o).getRules())};r.inherits(a,i),function(){this.toggleCommentLines=function(e,t,n,r){var i=!0,s=[],o=/^(\s*)--/;for(var a=n;a<=r;a++)if(!o.test(t.getLine(a))){i=!1;break}if(i){var f=new u(0,0,0,0);for(var a=n;a<=r;a++){var l=t.getLine(a),c=l.match(o);f.start.row=a,f.end.row=a,f.end.column=c[0].length,t.replace(f,c[1])}}else t.indentRows(n,r,"--")}}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.SqlHighlightRules=s})
|
1
public/js/vendor/ace/mode-stylus.js
vendored
1
public/js/vendor/ace/mode-stylus.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-svg.js
vendored
1
public/js/vendor/ace/mode-svg.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-tcl.js
vendored
1
public/js/vendor/ace/mode-tcl.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-tex.js
vendored
1
public/js/vendor/ace/mode-tex.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,u=e("./tex_highlight_rules").TexHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,f=function(e){e?this.$tokenizer=new s((new o).getRules()):this.$tokenizer=new s((new u).getRules()),this.$outdent=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.allowAutoInsert=function(){return!1}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i})
|
0
public/js/vendor/ace/mode-text.js
vendored
0
public/js/vendor/ace/mode-text.js
vendored
1
public/js/vendor/ace/mode-textile.js
vendored
1
public/js/vendor/ace/mode-textile.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./textile_highlight_rules").TextileHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){return e=="intag"?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:function(e){return e.charAt(0)=="h"?"markup.heading."+e.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};r.inherits(s,i),t.TextileHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i})
|
1
public/js/vendor/ace/mode-tm_snippet.js
vendored
1
public/js/vendor/ace/mode-tm_snippet.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/tm_snippet",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,u=function(){var e="SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";this.$rules={start:[{token:"constant.language.escape",regex:/\\[\$}`\\]/},{token:"keyword",regex:"\\$(?:TM_)?(?:"+e+")\\b"},{token:"variable",regex:"\\$\\w+"},{token:function(e,t,n){return n[1]?n[1]++:n.unshift("start",1),this.tokenName},tokenName:"markup.list",regex:"\\${",next:"varDecl"},{token:function(e,t,n){return n[1]?(n[1]--,n[1]||n.splice(0,2),this.tokenName):"text"},tokenName:"markup.list",regex:"}"},{token:"doc,comment",regex:/^\${2}-{5,}$/}],varDecl:[{regex:/\d+\b/,token:"constant.numeric"},{token:"keyword",regex:"(?:TM_)?(?:"+e+")\\b"},{token:"variable",regex:"\\w+"},{regex:/:/,token:"punctuation.operator",next:"start"},{regex:/\//,token:"string.regex",next:"regexp"},{regex:"",next:"start"}],regexp:[{regex:/\\./,token:"escape"},{regex:/\[/,token:"regex.start",next:"charClass"},{regex:"/",token:"string.regex",next:"format"},{token:"string.regex",regex:"."}],charClass:[{regex:"\\.",token:"escape"},{regex:"\\]",token:"regex.end",next:"regexp"},{token:"string.regex",regex:"."}],format:[{regex:/\\[ulULE]/,token:"keyword"},{regex:/\$\d+/,token:"variable"},{regex:"/[gim]*:?",token:"string.regex",next:"start"},{token:"string",regex:"."}]}};r.inherits(u,o),t.SnippetHighlightRules=u;var a=function(){var e=new u;this.$tokenizer=new s(e.getRules())};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)}}.call(a.prototype),t.Mode=a})
|
1
public/js/vendor/ace/mode-typescript.js
vendored
1
public/js/vendor/ace/mode-typescript.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-vbscript.js
vendored
1
public/js/vendor/ace/mode-vbscript.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-xml.js
vendored
1
public/js/vendor/ace/mode-xml.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-xquery.js
vendored
1
public/js/vendor/ace/mode-xquery.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/mode-yaml.js
vendored
1
public/js/vendor/ace/mode-yaml.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./yaml_highlight_rules").YamlHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./folding/coffee").FoldMode,f=function(){this.$tokenizer=new s((new o).getRules()),this.$outdent=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(\:(?:\s+|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*\:(?:\s+|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[\\|>]\\w*",next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/[+\-]?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"}],qqstring:[{token:"string",regex:"(?=(?:(?:\\\\.)|(?:[^:]))*?:)",next:"start"},{token:"string",regex:".+"}]}};r.inherits(s,i),t.YamlHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
|
1
public/js/vendor/ace/theme-chrome.js
vendored
1
public/js/vendor/ace/theme-chrome.js
vendored
@ -1 +0,0 @@
|
||||
ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome .ace_scroller {background-color: #FFFFFF;}.ace-chrome .ace_cursor {border-left: 2px solid black;}.ace-chrome .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})
|
1
public/js/vendor/ace/worker-coffee.js
vendored
1
public/js/vendor/ace/worker-coffee.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/worker-css.js
vendored
1
public/js/vendor/ace/worker-css.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/worker-javascript.js
vendored
1
public/js/vendor/ace/worker-javascript.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/worker-json.js
vendored
1
public/js/vendor/ace/worker-json.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/worker-php.js
vendored
1
public/js/vendor/ace/worker-php.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/vendor/ace/worker-xquery.js
vendored
1
public/js/vendor/ace/worker-xquery.js
vendored
File diff suppressed because one or more lines are too long
2268
public/js/vendor/bootstrap.js
vendored
2268
public/js/vendor/bootstrap.js
vendored
File diff suppressed because it is too large
Load Diff
6
public/js/vendor/bootstrap.min.js
vendored
6
public/js/vendor/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
6
public/js/vendor/bootstrap/bootstrap.min.js
vendored
Normal file
6
public/js/vendor/bootstrap/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
401
public/js/vendor/holder.js
vendored
401
public/js/vendor/holder.js
vendored
@ -1,401 +0,0 @@
|
||||
/*
|
||||
|
||||
Holder - 1.9 - client side image placeholders
|
||||
(c) 2012-2013 Ivan Malopinsky / http://imsky.co
|
||||
|
||||
Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
|
||||
Commercial use requires attribution.
|
||||
|
||||
*/
|
||||
|
||||
var Holder = Holder || {};
|
||||
(function (app, win) {
|
||||
|
||||
var preempted = false,
|
||||
fallback = false,
|
||||
canvas = document.createElement('canvas');
|
||||
|
||||
//getElementsByClassName polyfill
|
||||
document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
|
||||
|
||||
//getComputedStyle polyfill
|
||||
window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
|
||||
|
||||
//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
|
||||
function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}};
|
||||
|
||||
//https://gist.github.com/991057 by Jed Schmidt with modifications
|
||||
function selector(a){
|
||||
a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
|
||||
var ret=[]; b!=null&&(b.length?ret=b:b.length==0?ret=b:ret=[b]); return ret;
|
||||
}
|
||||
|
||||
//shallow object property extend
|
||||
function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
|
||||
|
||||
//hasOwnProperty polyfill
|
||||
if (!Object.prototype.hasOwnProperty)
|
||||
Object.prototype.hasOwnProperty = function(prop) {
|
||||
var proto = this.__proto__ || this.constructor.prototype;
|
||||
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
|
||||
}
|
||||
|
||||
function text_size(width, height, template) {
|
||||
var dimension_arr = [height, width].sort();
|
||||
var maxFactor = Math.round(dimension_arr[1] / 16),
|
||||
minFactor = Math.round(dimension_arr[0] / 16);
|
||||
var text_height = Math.max(template.size, maxFactor);
|
||||
return {
|
||||
height: text_height
|
||||
}
|
||||
}
|
||||
|
||||
function draw(ctx, dimensions, template, ratio) {
|
||||
var ts = text_size(dimensions.width, dimensions.height, template);
|
||||
var text_height = ts.height;
|
||||
var width = dimensions.width * ratio, height = dimensions.height * ratio;
|
||||
var font = template.font ? template.font : "sans-serif";
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "middle";
|
||||
ctx.fillStyle = template.background;
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
ctx.fillStyle = template.foreground;
|
||||
ctx.font = "bold " + text_height + "px "+font;
|
||||
var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height);
|
||||
if (ctx.measureText(text).width / width > 1) {
|
||||
text_height = template.size / (ctx.measureText(text).width / width);
|
||||
}
|
||||
//Resetting font size if necessary
|
||||
ctx.font = "bold " + (text_height * ratio) + "px "+font;
|
||||
ctx.fillText(text, (width / 2), (height / 2), width);
|
||||
return canvas.toDataURL("image/png");
|
||||
}
|
||||
|
||||
function render(mode, el, holder, src) {
|
||||
var dimensions = holder.dimensions,
|
||||
theme = holder.theme,
|
||||
text = holder.text ? decodeURIComponent(holder.text) : holder.text;
|
||||
var dimensions_caption = dimensions.width + "x" + dimensions.height;
|
||||
theme = (text ? extend(theme, { text: text }) : theme);
|
||||
theme = (holder.font ? extend(theme, {font: holder.font}) : theme);
|
||||
|
||||
var ratio = 1;
|
||||
if(window.devicePixelRatio && window.devicePixelRatio > 1){
|
||||
ratio = window.devicePixelRatio;
|
||||
}
|
||||
|
||||
if (mode == "image") {
|
||||
el.setAttribute("data-src", src);
|
||||
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
|
||||
|
||||
if(fallback || !holder.auto){
|
||||
el.style.width = dimensions.width + "px";
|
||||
el.style.height = dimensions.height + "px";
|
||||
}
|
||||
|
||||
if (fallback) {
|
||||
el.style.backgroundColor = theme.background;
|
||||
|
||||
}
|
||||
else{
|
||||
el.setAttribute("src", draw(ctx, dimensions, theme, ratio));
|
||||
}
|
||||
} else {
|
||||
if (!fallback) {
|
||||
el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")";
|
||||
el.style.backgroundSize = dimensions.width+"px "+dimensions.height+"px";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function fluid(el, holder, src) {
|
||||
var dimensions = holder.dimensions,
|
||||
theme = holder.theme,
|
||||
text = holder.text;
|
||||
var dimensions_caption = dimensions.width + "x" + dimensions.height;
|
||||
theme = (text ? extend(theme, {
|
||||
text: text
|
||||
}) : theme);
|
||||
|
||||
var fluid = document.createElement("div");
|
||||
|
||||
fluid.style.backgroundColor = theme.background;
|
||||
fluid.style.color = theme.foreground;
|
||||
fluid.className = el.className + " holderjs-fluid";
|
||||
fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%")>0?"":"px");
|
||||
fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%")>0?"":"px");
|
||||
fluid.id = el.id;
|
||||
|
||||
el.style.width=0;
|
||||
el.style.height=0;
|
||||
|
||||
if (theme.text) {
|
||||
fluid.appendChild(document.createTextNode(theme.text))
|
||||
} else {
|
||||
fluid.appendChild(document.createTextNode(dimensions_caption))
|
||||
fluid_images.push(fluid);
|
||||
setTimeout(fluid_update, 0);
|
||||
}
|
||||
|
||||
el.parentNode.insertBefore(fluid, el.nextSibling)
|
||||
|
||||
if(window.jQuery){
|
||||
jQuery(function($){
|
||||
$(el).on("load", function(){
|
||||
el.style.width = fluid.style.width;
|
||||
el.style.height = fluid.style.height;
|
||||
$(el).show();
|
||||
$(fluid).remove();
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function fluid_update() {
|
||||
for (i in fluid_images) {
|
||||
if(!fluid_images.hasOwnProperty(i)) continue;
|
||||
var el = fluid_images[i],
|
||||
label = el.firstChild;
|
||||
|
||||
el.style.lineHeight = el.offsetHeight+"px";
|
||||
label.data = el.offsetWidth + "x" + el.offsetHeight;
|
||||
}
|
||||
}
|
||||
|
||||
function parse_flags(flags, options) {
|
||||
|
||||
var ret = {
|
||||
theme: settings.themes.gray
|
||||
}, render = false;
|
||||
|
||||
for (sl = flags.length, j = 0; j < sl; j++) {
|
||||
var flag = flags[j];
|
||||
if (app.flags.dimensions.match(flag)) {
|
||||
render = true;
|
||||
ret.dimensions = app.flags.dimensions.output(flag);
|
||||
} else if (app.flags.fluid.match(flag)) {
|
||||
render = true;
|
||||
ret.dimensions = app.flags.fluid.output(flag);
|
||||
ret.fluid = true;
|
||||
} else if (app.flags.colors.match(flag)) {
|
||||
ret.theme = app.flags.colors.output(flag);
|
||||
} else if (options.themes[flag]) {
|
||||
//If a theme is specified, it will override custom colors
|
||||
ret.theme = options.themes[flag];
|
||||
} else if (app.flags.text.match(flag)) {
|
||||
ret.text = app.flags.text.output(flag);
|
||||
} else if(app.flags.font.match(flag)){
|
||||
ret.font = app.flags.font.output(flag);
|
||||
}
|
||||
else if(app.flags.auto.match(flag)){
|
||||
ret.auto = true;
|
||||
}
|
||||
}
|
||||
|
||||
return render ? ret : false;
|
||||
|
||||
};
|
||||
|
||||
if (!canvas.getContext) {
|
||||
fallback = true;
|
||||
} else {
|
||||
if (canvas.toDataURL("image/png")
|
||||
.indexOf("data:image/png") < 0) {
|
||||
//Android doesn't support data URI
|
||||
fallback = true;
|
||||
} else {
|
||||
var ctx = canvas.getContext("2d");
|
||||
}
|
||||
}
|
||||
|
||||
var fluid_images = [];
|
||||
|
||||
var settings = {
|
||||
domain: "holder.js",
|
||||
images: "img",
|
||||
bgnodes: ".holderjs",
|
||||
themes: {
|
||||
"gray": {
|
||||
background: "#eee",
|
||||
foreground: "#aaa",
|
||||
size: 12
|
||||
},
|
||||
"social": {
|
||||
background: "#3a5a97",
|
||||
foreground: "#fff",
|
||||
size: 12
|
||||
},
|
||||
"industrial": {
|
||||
background: "#434A52",
|
||||
foreground: "#C2F200",
|
||||
size: 12
|
||||
}
|
||||
},
|
||||
stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}"
|
||||
};
|
||||
|
||||
|
||||
app.flags = {
|
||||
dimensions: {
|
||||
regex: /^(\d+)x(\d+)$/,
|
||||
output: function (val) {
|
||||
var exec = this.regex.exec(val);
|
||||
return {
|
||||
width: +exec[1],
|
||||
height: +exec[2]
|
||||
}
|
||||
}
|
||||
},
|
||||
fluid: {
|
||||
regex: /^([0-9%]+)x([0-9%]+)$/,
|
||||
output: function (val) {
|
||||
var exec = this.regex.exec(val);
|
||||
return {
|
||||
width: exec[1],
|
||||
height: exec[2]
|
||||
}
|
||||
}
|
||||
},
|
||||
colors: {
|
||||
regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
|
||||
output: function (val) {
|
||||
var exec = this.regex.exec(val);
|
||||
return {
|
||||
size: settings.themes.gray.size,
|
||||
foreground: "#" + exec[2],
|
||||
background: "#" + exec[1]
|
||||
}
|
||||
}
|
||||
},
|
||||
text: {
|
||||
regex: /text\:(.*)/,
|
||||
output: function (val) {
|
||||
return this.regex.exec(val)[1];
|
||||
}
|
||||
},
|
||||
font: {
|
||||
regex: /font\:(.*)/,
|
||||
output: function(val){
|
||||
return this.regex.exec(val)[1];
|
||||
}
|
||||
},
|
||||
auto: {
|
||||
regex: /^auto$/
|
||||
}
|
||||
}
|
||||
|
||||
for (var flag in app.flags) {
|
||||
if(!app.flags.hasOwnProperty(flag)) continue;
|
||||
app.flags[flag].match = function (val) {
|
||||
return val.match(this.regex)
|
||||
}
|
||||
}
|
||||
|
||||
app.add_theme = function (name, theme) {
|
||||
name != null && theme != null && (settings.themes[name] = theme);
|
||||
return app;
|
||||
};
|
||||
|
||||
app.add_image = function (src, el) {
|
||||
var node = selector(el);
|
||||
if (node.length) {
|
||||
for (var i = 0, l = node.length; i < l; i++) {
|
||||
var img = document.createElement("img")
|
||||
img.setAttribute("data-src", src);
|
||||
node[i].appendChild(img);
|
||||
}
|
||||
}
|
||||
return app;
|
||||
};
|
||||
|
||||
app.run = function (o) {
|
||||
var options = extend(settings, o), images = [];
|
||||
|
||||
if(options.images instanceof window.NodeList){
|
||||
imageNodes = options.images;
|
||||
}
|
||||
else if(options.images instanceof window.Node){
|
||||
imageNodes = [options.images];
|
||||
}
|
||||
else{
|
||||
imageNodes = selector(options.images);
|
||||
}
|
||||
|
||||
if(options.elements instanceof window.NodeList){
|
||||
bgnodes = options.bgnodes;
|
||||
}
|
||||
else if(options.bgnodes instanceof window.Node){
|
||||
bgnodes = [options.bgnodes];
|
||||
}
|
||||
else{
|
||||
bgnodes = selector(options.bgnodes);
|
||||
}
|
||||
|
||||
preempted = true;
|
||||
|
||||
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
|
||||
|
||||
var holdercss = document.getElementById("holderjs-style");
|
||||
|
||||
if(!holdercss){
|
||||
holdercss = document.createElement("style");
|
||||
holdercss.setAttribute("id", "holderjs-style");
|
||||
holdercss.type = "text/css";
|
||||
document.getElementsByTagName("head")[0].appendChild(holdercss);
|
||||
}
|
||||
|
||||
if(holdercss.styleSheet){
|
||||
holdercss.styleSheet += options.stylesheet;
|
||||
}
|
||||
else{
|
||||
holdercss.textContent+= options.stylesheet;
|
||||
}
|
||||
|
||||
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
|
||||
|
||||
for (var l = bgnodes.length, i = 0; i < l; i++) {
|
||||
var src = window.getComputedStyle(bgnodes[i], null)
|
||||
.getPropertyValue("background-image");
|
||||
var flags = src.match(cssregex);
|
||||
if (flags) {
|
||||
var holder = parse_flags(flags[1].split("/"), options);
|
||||
if (holder) {
|
||||
render("background", bgnodes[i], holder, src);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var l = images.length, i = 0; i < l; i++) {
|
||||
var src = images[i].getAttribute("src") || images[i].getAttribute("data-src");
|
||||
if (src != null && src.indexOf(options.domain) >= 0) {
|
||||
var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
|
||||
.split("/"), options);
|
||||
if (holder) {
|
||||
if (holder.fluid) {
|
||||
fluid(images[i], holder, src);
|
||||
} else {
|
||||
render("image", images[i], holder, src);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return app;
|
||||
};
|
||||
|
||||
contentLoaded(win, function () {
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener("resize", fluid_update, false);
|
||||
window.addEventListener("orientationchange", fluid_update, false);
|
||||
} else {
|
||||
window.attachEvent("onresize", fluid_update)
|
||||
}
|
||||
preempted || app.run();
|
||||
});
|
||||
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
define( "Holder", [], function () { return app; } );
|
||||
}
|
||||
|
||||
})(Holder, window);
|
301
public/js/vendor/html5shiv.js
vendored
Executable file
301
public/js/vendor/html5shiv.js
vendored
Executable file
@ -0,0 +1,301 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.6.2';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
||||
/** Used to skip problem elements */
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
/** Not all elements can be cloned in IE **/
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
/** Detect whether the browser supports default html5 styles */
|
||||
var supportsHtml5Styles;
|
||||
|
||||
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
||||
var expando = '_html5shiv';
|
||||
|
||||
/** The id for the the documents expando */
|
||||
var expanID = 0;
|
||||
|
||||
/** Cached data for each document */
|
||||
var expandoData = {};
|
||||
|
||||
/** Detect whether the browser supports unknown elements */
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
// assign a false positive if unable to shiv
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
// assign a false positive if detection fails => unable to shiv
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a style sheet with the given CSS text and adds it to the document.
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @param {String} cssText The CSS text.
|
||||
* @returns {StyleSheet} The style element.
|
||||
*/
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of `html5.elements` as an array.
|
||||
* @private
|
||||
* @returns {Array} An array of shived element node names.
|
||||
*/
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @returns {Object} An object of data.
|
||||
*/
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived element for the given nodeName and document
|
||||
* @memberOf html5
|
||||
* @param {String} nodeName name of the element
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived element.
|
||||
*/
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
// Avoid adding some elements to fragments in IE < 9 because
|
||||
// * Attributes like `name` or `type` cannot be set/changed once an element
|
||||
// is inserted into a document/fragment
|
||||
// * Link elements with `src` attributes that are inaccessible, as with
|
||||
// a 403 response, will cause the tab/window to crash
|
||||
// * Script elements appended to fragments will execute when their `src`
|
||||
// or `text` property is set
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived DocumentFragment for the given document
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived DocumentFragment.
|
||||
*/
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
||||
* @private
|
||||
* @param {Document|DocumentFragment} ownerDocument The document.
|
||||
* @param {Object} data of the document.
|
||||
*/
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
//abort shiv
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/\w+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Shivs the given document.
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The document to shiv.
|
||||
* @returns {Document} The shived document.
|
||||
*/
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
// corrects block display not defined in IE6/7/8/9
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
// adds styling not present in IE6/7/8/9
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
// hides non-rendered elements
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `html5` object is exposed so that more elements can be shived and
|
||||
* existing shiving can be detected on iframes.
|
||||
* @type Object
|
||||
* @example
|
||||
*
|
||||
* // options can be changed before the script is included
|
||||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
|
||||
*/
|
||||
var html5 = {
|
||||
|
||||
/**
|
||||
* An array or space separated string of node names of the elements to shiv.
|
||||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
*/
|
||||
'version': version,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the HTML5 style sheet should be inserted.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
/**
|
||||
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
||||
* @memberOf html5
|
||||
* @type boolean
|
||||
*/
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
||||
* methods should be overwritten.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
/**
|
||||
* A string to describe the type of `html5` object ("default" or "default print").
|
||||
* @memberOf html5
|
||||
* @type String
|
||||
*/
|
||||
'type': 'default',
|
||||
|
||||
// shivs the document according to the specified `html5` object options
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
//creates a shived element
|
||||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose html5
|
||||
window.html5 = html5;
|
||||
|
||||
// shiv the document
|
||||
shivDocument(document);
|
||||
|
||||
}(this, document));
|
94
public/js/vendor/jquery.sparkline.min.js
vendored
94
public/js/vendor/jquery.sparkline.min.js
vendored
@ -1,94 +0,0 @@
|
||||
/* jquery.sparkline 1.6 - http://omnipotent.net/jquery.sparkline/
|
||||
** Licensed under the New BSD License - see above site for details */
|
||||
|
||||
(function($){var defaults={common:{type:'line',lineColor:'#00f',fillColor:'#cdf',defaultPixelsPerValue:3,width:'auto',height:'auto',composite:false,tagValuesAttribute:'values',tagOptionsPrefix:'spark',enableTagOptions:false},line:{spotColor:'#f80',spotRadius:1.5,minSpotColor:'#f80',maxSpotColor:'#f80',lineWidth:1,normalRangeMin:undefined,normalRangeMax:undefined,normalRangeColor:'#ccc',drawNormalOnTop:false,chartRangeMin:undefined,chartRangeMax:undefined,chartRangeMinX:undefined,chartRangeMaxX:undefined},bar:{barColor:'#00f',negBarColor:'#f44',zeroColor:undefined,nullColor:undefined,zeroAxis:undefined,barWidth:4,barSpacing:1,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false,colorMap:undefined},tristate:{barWidth:4,barSpacing:1,posBarColor:'#6f6',negBarColor:'#f44',zeroBarColor:'#999',colorMap:{}},discrete:{lineHeight:'auto',thresholdColor:undefined,thresholdValue:0,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false},bullet:{targetColor:'red',targetWidth:3,performanceColor:'blue',rangeColors:['#D3DAFE','#A8B6FF','#7F94FF'],base:undefined},pie:{sliceColors:['#f00','#0f0','#00f']},box:{raw:false,boxLineColor:'black',boxFillColor:'#cdf',whiskerColor:'black',outlierLineColor:'#333',outlierFillColor:'white',medianColor:'red',showOutliers:true,outlierIQR:1.5,spotRadius:1.5,target:undefined,targetColor:'#4a2',chartRangeMax:undefined,chartRangeMin:undefined}};var VCanvas_base,VCanvas_canvas,VCanvas_vml;$.fn.simpledraw=function(width,height,use_existing){if(use_existing&&this[0].VCanvas){return this[0].VCanvas;}
|
||||
if(width===undefined){width=$(this).innerWidth();}
|
||||
if(height===undefined){height=$(this).innerHeight();}
|
||||
if($.browser.hasCanvas){return new VCanvas_canvas(width,height,this);}else if($.browser.msie){return new VCanvas_vml(width,height,this);}else{return false;}};var pending=[];$.fn.sparkline=function(uservalues,userOptions){return this.each(function(){var options=new $.fn.sparkline.options(this,userOptions);var render=function(){var values,width,height;if(uservalues==='html'||uservalues===undefined){var vals=this.getAttribute(options.get('tagValuesAttribute'));if(vals===undefined||vals===null){vals=$(this).html();}
|
||||
values=vals.replace(/(^\s*<!--)|(-->\s*$)|\s+/g,'').split(',');}else{values=uservalues;}
|
||||
width=options.get('width')=='auto'?values.length*options.get('defaultPixelsPerValue'):options.get('width');if(options.get('height')=='auto'){if(!options.get('composite')||!this.VCanvas){var tmp=document.createElement('span');tmp.innerHTML='a';$(this).html(tmp);height=$(tmp).innerHeight();$(tmp).remove();}}else{height=options.get('height');}
|
||||
$.fn.sparkline[options.get('type')].call(this,values,options,width,height);};if(($(this).html()&&$(this).is(':hidden'))||($.fn.jquery<"1.3.0"&&$(this).parents().is(':hidden'))||!$(this).parents('body').length){pending.push([this,render]);}else{render.call(this);}});};$.fn.sparkline.defaults=defaults;$.sparkline_display_visible=function(){for(var i=pending.length-1;i>=0;i--){var el=pending[i][0];if($(el).is(':visible')&&!$(el).parents().is(':hidden')){pending[i][1].call(el);pending.splice(i,1);}}};var UNSET_OPTION={};var normalizeValue=function(val){switch(val){case'undefined':val=undefined;break;case'null':val=null;break;case'true':val=true;break;case'false':val=false;break;default:var nf=parseFloat(val);if(val==nf){val=nf;}}
|
||||
return val;};$.fn.sparkline.options=function(tag,userOptions){var extendedOptions;this.userOptions=userOptions=userOptions||{};this.tag=tag;this.tagValCache={};var defaults=$.fn.sparkline.defaults;var base=defaults.common;this.tagOptionsPrefix=userOptions.enableTagOptions&&(userOptions.tagOptionsPrefix||base.tagOptionsPrefix);var tagOptionType=this.getTagSetting('type');if(tagOptionType===UNSET_OPTION){extendedOptions=defaults[userOptions.type||base.type];}else{extendedOptions=defaults[tagOptionType];}
|
||||
this.mergedOptions=$.extend({},base,extendedOptions,userOptions);};$.fn.sparkline.options.prototype.getTagSetting=function(key){var val,i,prefix=this.tagOptionsPrefix;if(prefix===false||prefix===undefined){return UNSET_OPTION;}
|
||||
if(this.tagValCache.hasOwnProperty(key)){val=this.tagValCache.key;}else{val=this.tag.getAttribute(prefix+key);if(val===undefined||val===null){val=UNSET_OPTION;}else if(val.substr(0,1)=='['){val=val.substr(1,val.length-2).split(',');for(i=val.length;i--;){val[i]=normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g,''));}}else if(val.substr(0,1)=='{'){var pairs=val.substr(1,val.length-2).split(',');val={};for(i=pairs.length;i--;){var keyval=pairs[i].split(':',2);val[keyval[0].replace(/(^\s*)|(\s*$)/g,'')]=normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g,''));}}else{val=normalizeValue(val);}
|
||||
this.tagValCache.key=val;}
|
||||
return val;};$.fn.sparkline.options.prototype.get=function(key){var tagOption=this.getTagSetting(key);if(tagOption!==UNSET_OPTION){return tagOption;}
|
||||
return this.mergedOptions[key];};$.fn.sparkline.line=function(values,options,width,height){var xvalues=[],yvalues=[],yminmax=[];for(var i=0;i<values.length;i++){var val=values[i];var isstr=typeof(values[i])=='string';var isarray=typeof(values[i])=='object'&&values[i]instanceof Array;var sp=isstr&&values[i].split(':');if(isstr&&sp.length==2){xvalues.push(Number(sp[0]));yvalues.push(Number(sp[1]));yminmax.push(Number(sp[1]));}else if(isarray){xvalues.push(val[0]);yvalues.push(val[1]);yminmax.push(val[1]);}else{xvalues.push(i);if(values[i]===null||values[i]=='null'){yvalues.push(null);}else{yvalues.push(Number(val));yminmax.push(Number(val));}}}
|
||||
if(options.get('xvalues')){xvalues=options.get('xvalues');}
|
||||
var maxy=Math.max.apply(Math,yminmax);var maxyval=maxy;var miny=Math.min.apply(Math,yminmax);var minyval=miny;var maxx=Math.max.apply(Math,xvalues);var minx=Math.min.apply(Math,xvalues);var normalRangeMin=options.get('normalRangeMin');var normalRangeMax=options.get('normalRangeMax');if(normalRangeMin!==undefined){if(normalRangeMin<miny){miny=normalRangeMin;}
|
||||
if(normalRangeMax>maxy){maxy=normalRangeMax;}}
|
||||
if(options.get('chartRangeMin')!==undefined&&(options.get('chartRangeClip')||options.get('chartRangeMin')<miny)){miny=options.get('chartRangeMin');}
|
||||
if(options.get('chartRangeMax')!==undefined&&(options.get('chartRangeClip')||options.get('chartRangeMax')>maxy)){maxy=options.get('chartRangeMax');}
|
||||
if(options.get('chartRangeMinX')!==undefined&&(options.get('chartRangeClipX')||options.get('chartRangeMinX')<minx)){minx=options.get('chartRangeMinX');}
|
||||
if(options.get('chartRangeMaxX')!==undefined&&(options.get('chartRangeClipX')||options.get('chartRangeMaxX')>maxx)){maxx=options.get('chartRangeMaxX');}
|
||||
var rangex=maxx-minx===0?1:maxx-minx;var rangey=maxy-miny===0?1:maxy-miny;var vl=yvalues.length-1;if(vl<1){this.innerHTML='';return;}
|
||||
var target=$(this).simpledraw(width,height,options.get('composite'));if(target){var canvas_width=target.pixel_width;var canvas_height=target.pixel_height;var canvas_top=0;var canvas_left=0;var spotRadius=options.get('spotRadius');if(spotRadius&&(canvas_width<(spotRadius*4)||canvas_height<(spotRadius*4))){spotRadius=0;}
|
||||
if(spotRadius){if(options.get('minSpotColor')||(options.get('spotColor')&&yvalues[vl]==miny)){canvas_height-=Math.ceil(spotRadius);}
|
||||
if(options.get('maxSpotColor')||(options.get('spotColor')&&yvalues[vl]==maxy)){canvas_height-=Math.ceil(spotRadius);canvas_top+=Math.ceil(spotRadius);}
|
||||
if(options.get('minSpotColor')||options.get('maxSpotColor')&&(yvalues[0]==miny||yvalues[0]==maxy)){canvas_left+=Math.ceil(spotRadius);canvas_width-=Math.ceil(spotRadius);}
|
||||
if(options.get('spotColor')||(options.get('minSpotColor')||options.get('maxSpotColor')&&(yvalues[vl]==miny||yvalues[vl]==maxy))){canvas_width-=Math.ceil(spotRadius);}}
|
||||
canvas_height--;var drawNormalRange=function(){if(normalRangeMin!==undefined){var ytop=canvas_top+Math.round(canvas_height-(canvas_height*((normalRangeMax-miny)/rangey)));var height=Math.round((canvas_height*(normalRangeMax-normalRangeMin))/rangey);target.drawRect(canvas_left,ytop,canvas_width,height,undefined,options.get('normalRangeColor'));}};if(!options.get('drawNormalOnTop')){drawNormalRange();}
|
||||
var path=[];var paths=[path];var x,y,vlen=yvalues.length;for(i=0;i<vlen;i++){x=xvalues[i];y=yvalues[i];if(y===null){if(i){if(yvalues[i-1]!==null){path=[];paths.push(path);}}}else{if(y<miny){y=miny;}
|
||||
if(y>maxy){y=maxy;}
|
||||
if(!path.length){path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+canvas_height]);}
|
||||
path.push([canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((y-miny)/rangey)))]);}}
|
||||
var lineshapes=[];var fillshapes=[];var plen=paths.length;for(i=0;i<plen;i++){path=paths[i];if(!path.length){continue;}
|
||||
if(options.get('fillColor')){path.push([path[path.length-1][0],canvas_top+canvas_height-1]);fillshapes.push(path.slice(0));path.pop();}
|
||||
if(path.length>2){path[0]=[path[0][0],path[1][1]];}
|
||||
lineshapes.push(path);}
|
||||
plen=fillshapes.length;for(i=0;i<plen;i++){target.drawShape(fillshapes[i],undefined,options.get('fillColor'));}
|
||||
if(options.get('drawNormalOnTop')){drawNormalRange();}
|
||||
plen=lineshapes.length;for(i=0;i<plen;i++){target.drawShape(lineshapes[i],options.get('lineColor'),undefined,options.get('lineWidth'));}
|
||||
if(spotRadius&&options.get('spotColor')){target.drawCircle(canvas_left+Math.round(xvalues[xvalues.length-1]*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((yvalues[vl]-miny)/rangey))),spotRadius,undefined,options.get('spotColor'));}
|
||||
if(maxy!=minyval){if(spotRadius&&options.get('minSpotColor')){x=xvalues[$.inArray(minyval,yvalues)];target.drawCircle(canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((minyval-miny)/rangey))),spotRadius,undefined,options.get('minSpotColor'));}
|
||||
if(spotRadius&&options.get('maxSpotColor')){x=xvalues[$.inArray(maxyval,yvalues)];target.drawCircle(canvas_left+Math.round((x-minx)*(canvas_width/rangex)),canvas_top+Math.round(canvas_height-(canvas_height*((maxyval-miny)/rangey))),spotRadius,undefined,options.get('maxSpotColor'));}}}else{this.innerHTML='';}};$.fn.sparkline.bar=function(values,options,width,height){width=(values.length*options.get('barWidth'))+((values.length-1)*options.get('barSpacing'));var num_values=[];for(var i=0,vlen=values.length;i<vlen;i++){if(values[i]=='null'||values[i]===null){values[i]=null;}else{values[i]=Number(values[i]);num_values.push(Number(values[i]));}}
|
||||
var max=Math.max.apply(Math,num_values),min=Math.min.apply(Math,num_values);if(options.get('chartRangeMin')!==undefined&&(options.get('chartRangeClip')||options.get('chartRangeMin')<min)){min=options.get('chartRangeMin');}
|
||||
if(options.get('chartRangeMax')!==undefined&&(options.get('chartRangeClip')||options.get('chartRangeMax')>max)){max=options.get('chartRangeMax');}
|
||||
var zeroAxis=options.get('zeroAxis');if(zeroAxis===undefined){zeroAxis=min<0;}
|
||||
var range=max-min===0?1:max-min;var colorMapByIndex,colorMapByValue;if($.isArray(options.get('colorMap'))){colorMapByIndex=options.get('colorMap');colorMapByValue=null;}else{colorMapByIndex=null;colorMapByValue=options.get('colorMap');}
|
||||
var target=$(this).simpledraw(width,height,options.get('composite'));if(target){var color,canvas_height=target.pixel_height,yzero=min<0&&zeroAxis?canvas_height-Math.round(canvas_height*(Math.abs(min)/range))-1:canvas_height-1;for(i=values.length;i--;){var x=i*(options.get('barWidth')+options.get('barSpacing')),y,val=values[i];if(val===null){if(options.get('nullColor')){color=options.get('nullColor');val=(zeroAxis&&min<0)?0:min;height=1;y=(zeroAxis&&min<0)?yzero:canvas_height-height;}else{continue;}}else{if(val<min){val=min;}
|
||||
if(val>max){val=max;}
|
||||
color=(val<0)?options.get('negBarColor'):options.get('barColor');if(zeroAxis&&min<0){height=Math.round(canvas_height*((Math.abs(val)/range)))+1;y=(val<0)?yzero:yzero-height;}else{height=Math.round(canvas_height*((val-min)/range))+1;y=canvas_height-height;}
|
||||
if(val===0&&options.get('zeroColor')!==undefined){color=options.get('zeroColor');}
|
||||
if(colorMapByValue&&colorMapByValue[val]){color=colorMapByValue[val];}else if(colorMapByIndex&&colorMapByIndex.length>i){color=colorMapByIndex[i];}
|
||||
if(color===null){continue;}}
|
||||
target.drawRect(x,y,options.get('barWidth')-1,height-1,color,color);}}else{this.innerHTML='';}};$.fn.sparkline.tristate=function(values,options,width,height){values=$.map(values,Number);width=(values.length*options.get('barWidth'))+((values.length-1)*options.get('barSpacing'));var colorMapByIndex,colorMapByValue;if($.isArray(options.get('colorMap'))){colorMapByIndex=options.get('colorMap');colorMapByValue=null;}else{colorMapByIndex=null;colorMapByValue=options.get('colorMap');}
|
||||
var target=$(this).simpledraw(width,height,options.get('composite'));if(target){var canvas_height=target.pixel_height,half_height=Math.round(canvas_height/2);for(var i=values.length;i--;){var x=i*(options.get('barWidth')+options.get('barSpacing')),y,color;if(values[i]<0){y=half_height;height=half_height-1;color=options.get('negBarColor');}else if(values[i]>0){y=0;height=half_height-1;color=options.get('posBarColor');}else{y=half_height-1;height=2;color=options.get('zeroBarColor');}
|
||||
if(colorMapByValue&&colorMapByValue[values[i]]){color=colorMapByValue[values[i]];}else if(colorMapByIndex&&colorMapByIndex.length>i){color=colorMapByIndex[i];}
|
||||
if(color===null){continue;}
|
||||
target.drawRect(x,y,options.get('barWidth')-1,height-1,color,color);}}else{this.innerHTML='';}};$.fn.sparkline.discrete=function(values,options,width,height){values=$.map(values,Number);width=options.get('width')=='auto'?values.length*2:width;var interval=Math.floor(width/values.length);var target=$(this).simpledraw(width,height,options.get('composite'));if(target){var canvas_height=target.pixel_height,line_height=options.get('lineHeight')=='auto'?Math.round(canvas_height*0.3):options.get('lineHeight'),pheight=canvas_height-line_height,min=Math.min.apply(Math,values),max=Math.max.apply(Math,values);if(options.get('chartRangeMin')!==undefined&&(options.get('chartRangeClip')||options.get('chartRangeMin')<min)){min=options.get('chartRangeMin');}
|
||||
if(options.get('chartRangeMax')!==undefined&&(options.get('chartRangeClip')||options.get('chartRangeMax')>max)){max=options.get('chartRangeMax');}
|
||||
var range=max-min;for(var i=values.length;i--;){var val=values[i];if(val<min){val=min;}
|
||||
if(val>max){val=max;}
|
||||
var x=(i*interval),ytop=Math.round(pheight-pheight*((val-min)/range));target.drawLine(x,ytop,x,ytop+line_height,(options.get('thresholdColor')&&val<options.get('thresholdValue'))?options.get('thresholdColor'):options.get('lineColor'));}}else{this.innerHTML='';}};$.fn.sparkline.bullet=function(values,options,width,height){values=$.map(values,Number);width=options.get('width')=='auto'?'4.0em':width;var target=$(this).simpledraw(width,height,options.get('composite'));if(target&&values.length>1){var canvas_width=target.pixel_width-Math.ceil(options.get('targetWidth')/2),canvas_height=target.pixel_height,min=Math.min.apply(Math,values),max=Math.max.apply(Math,values);if(options.get('base')===undefined){min=min<0?min:0;}else{min=options.get('base');}
|
||||
var range=max-min;for(var i=2,vlen=values.length;i<vlen;i++){var rangeval=values[i],rangewidth=Math.round(canvas_width*((rangeval-min)/range));target.drawRect(0,0,rangewidth-1,canvas_height-1,options.get('rangeColors')[i-2],options.get('rangeColors')[i-2]);}
|
||||
var perfval=values[1],perfwidth=Math.round(canvas_width*((perfval-min)/range));target.drawRect(0,Math.round(canvas_height*0.3),perfwidth-1,Math.round(canvas_height*0.4)-1,options.get('performanceColor'),options.get('performanceColor'));var targetval=values[0],x=Math.round(canvas_width*((targetval-min)/range)-(options.get('targetWidth')/2)),targettop=Math.round(canvas_height*0.10),targetheight=canvas_height-(targettop*2);target.drawRect(x,targettop,options.get('targetWidth')-1,targetheight-1,options.get('targetColor'),options.get('targetColor'));}else{this.innerHTML='';}};$.fn.sparkline.pie=function(values,options,width,height){values=$.map(values,Number);width=options.get('width')=='auto'?height:width;var target=$(this).simpledraw(width,height,options.get('composite'));if(target&&values.length>1){var canvas_width=target.pixel_width,canvas_height=target.pixel_height,radius=Math.floor(Math.min(canvas_width,canvas_height)/2),total=0,next=0,circle=2*Math.PI;for(var i=values.length;i--;){total+=values[i];}
|
||||
if(options.get('offset')){next+=(2*Math.PI)*(options.get('offset')/360);}
|
||||
var vlen=values.length;for(i=0;i<vlen;i++){var start=next;var end=next;if(total>0){end=next+(circle*(values[i]/total));}
|
||||
target.drawPieSlice(radius,radius,radius,start,end,undefined,options.get('sliceColors')[i%options.get('sliceColors').length]);next=end;}}};var quartile=function(values,q){if(q==2){var vl2=Math.floor(values.length/2);return values.length%2?values[vl2]:(values[vl2]+values[vl2+1])/2;}else{var vl4=Math.floor(values.length/4);return values.length%2?(values[vl4*q]+values[vl4*q+1])/2:values[vl4*q];}};$.fn.sparkline.box=function(values,options,width,height){values=$.map(values,Number);width=options.get('width')=='auto'?'4.0em':width;var minvalue=options.get('chartRangeMin')===undefined?Math.min.apply(Math,values):options.get('chartRangeMin'),maxvalue=options.get('chartRangeMax')===undefined?Math.max.apply(Math,values):options.get('chartRangeMax'),target=$(this).simpledraw(width,height,options.get('composite')),vlen=values.length,lwhisker,loutlier,q1,q2,q3,rwhisker,routlier;if(target&&values.length>1){var canvas_width=target.pixel_width,canvas_height=target.pixel_height;if(options.get('raw')){if(options.get('showOutliers')&&values.length>5){loutlier=values[0];lwhisker=values[1];q1=values[2];q2=values[3];q3=values[4];rwhisker=values[5];routlier=values[6];}else{lwhisker=values[0];q1=values[1];q2=values[2];q3=values[3];rwhisker=values[4];}}else{values.sort(function(a,b){return a-b;});q1=quartile(values,1);q2=quartile(values,2);q3=quartile(values,3);var iqr=q3-q1;if(options.get('showOutliers')){lwhisker=undefined;rwhisker=undefined;for(var i=0;i<vlen;i++){if(lwhisker===undefined&&values[i]>q1-(iqr*options.get('outlierIQR'))){lwhisker=values[i];}
|
||||
if(values[i]<q3+(iqr*options.get('outlierIQR'))){rwhisker=values[i];}}
|
||||
loutlier=values[0];routlier=values[vlen-1];}else{lwhisker=values[0];rwhisker=values[vlen-1];}}
|
||||
var unitsize=canvas_width/(maxvalue-minvalue+1),canvas_left=0;if(options.get('showOutliers')){canvas_left=Math.ceil(options.get('spotRadius'));canvas_width-=2*Math.ceil(options.get('spotRadius'));unitsize=canvas_width/(maxvalue-minvalue+1);if(loutlier<lwhisker){target.drawCircle((loutlier-minvalue)*unitsize+canvas_left,canvas_height/2,options.get('spotRadius'),options.get('outlierLineColor'),options.get('outlierFillColor'));}
|
||||
if(routlier>rwhisker){target.drawCircle((routlier-minvalue)*unitsize+canvas_left,canvas_height/2,options.get('spotRadius'),options.get('outlierLineColor'),options.get('outlierFillColor'));}}
|
||||
target.drawRect(Math.round((q1-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.1),Math.round((q3-q1)*unitsize),Math.round(canvas_height*0.8),options.get('boxLineColor'),options.get('boxFillColor'));target.drawLine(Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),Math.round((q1-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),options.get('lineColor'));target.drawLine(Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/4),Math.round((lwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height-canvas_height/4),options.get('whiskerColor'));target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),Math.round((q3-minvalue)*unitsize+canvas_left),Math.round(canvas_height/2),options.get('lineColor'));target.drawLine(Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height/4),Math.round((rwhisker-minvalue)*unitsize+canvas_left),Math.round(canvas_height-canvas_height/4),options.get('whiskerColor'));target.drawLine(Math.round((q2-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.1),Math.round((q2-minvalue)*unitsize+canvas_left),Math.round(canvas_height*0.9),options.get('medianColor'));if(options.get('target')){var size=Math.ceil(options.get('spotRadius'));target.drawLine(Math.round((options.get('target')-minvalue)*unitsize+canvas_left),Math.round((canvas_height/2)-size),Math.round((options.get('target')-minvalue)*unitsize+canvas_left),Math.round((canvas_height/2)+size),options.get('targetColor'));target.drawLine(Math.round((options.get('target')-minvalue)*unitsize+canvas_left-size),Math.round(canvas_height/2),Math.round((options.get('target')-minvalue)*unitsize+canvas_left+size),Math.round(canvas_height/2),options.get('targetColor'));}}else{this.innerHTML='';}};if($.browser.msie&&!document.namespaces.v){document.namespaces.add('v','urn:schemas-microsoft-com:vml','#default#VML');}
|
||||
if($.browser.hasCanvas===undefined){var t=document.createElement('canvas');$.browser.hasCanvas=t.getContext!==undefined;}
|
||||
VCanvas_base=function(width,height,target){};VCanvas_base.prototype={init:function(width,height,target){this.width=width;this.height=height;this.target=target;if(target[0]){target=target[0];}
|
||||
target.VCanvas=this;},drawShape:function(path,lineColor,fillColor,lineWidth){alert('drawShape not implemented');},drawLine:function(x1,y1,x2,y2,lineColor,lineWidth){return this.drawShape([[x1,y1],[x2,y2]],lineColor,lineWidth);},drawCircle:function(x,y,radius,lineColor,fillColor){alert('drawCircle not implemented');},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){alert('drawPieSlice not implemented');},drawRect:function(x,y,width,height,lineColor,fillColor){alert('drawRect not implemented');},getElement:function(){return this.canvas;},_insert:function(el,target){$(target).html(el);}};VCanvas_canvas=function(width,height,target){return this.init(width,height,target);};VCanvas_canvas.prototype=$.extend(new VCanvas_base(),{_super:VCanvas_base.prototype,init:function(width,height,target){this._super.init(width,height,target);this.canvas=document.createElement('canvas');if(target[0]){target=target[0];}
|
||||
target.VCanvas=this;$(this.canvas).css({display:'inline-block',width:width,height:height,verticalAlign:'top'});this._insert(this.canvas,target);this.pixel_height=$(this.canvas).height();this.pixel_width=$(this.canvas).width();this.canvas.width=this.pixel_width;this.canvas.height=this.pixel_height;$(this.canvas).css({width:this.pixel_width,height:this.pixel_height});},_getContext:function(lineColor,fillColor,lineWidth){var context=this.canvas.getContext('2d');if(lineColor!==undefined){context.strokeStyle=lineColor;}
|
||||
context.lineWidth=lineWidth===undefined?1:lineWidth;if(fillColor!==undefined){context.fillStyle=fillColor;}
|
||||
return context;},drawShape:function(path,lineColor,fillColor,lineWidth){var context=this._getContext(lineColor,fillColor,lineWidth);context.beginPath();context.moveTo(path[0][0]+0.5,path[0][1]+0.5);for(var i=1,plen=path.length;i<plen;i++){context.lineTo(path[i][0]+0.5,path[i][1]+0.5);}
|
||||
if(lineColor!==undefined){context.stroke();}
|
||||
if(fillColor!==undefined){context.fill();}},drawCircle:function(x,y,radius,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.arc(x,y,radius,0,2*Math.PI,false);if(lineColor!==undefined){context.stroke();}
|
||||
if(fillColor!==undefined){context.fill();}},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){var context=this._getContext(lineColor,fillColor);context.beginPath();context.moveTo(x,y);context.arc(x,y,radius,startAngle,endAngle,false);context.lineTo(x,y);context.closePath();if(lineColor!==undefined){context.stroke();}
|
||||
if(fillColor){context.fill();}},drawRect:function(x,y,width,height,lineColor,fillColor){return this.drawShape([[x,y],[x+width,y],[x+width,y+height],[x,y+height],[x,y]],lineColor,fillColor);}});VCanvas_vml=function(width,height,target){return this.init(width,height,target);};VCanvas_vml.prototype=$.extend(new VCanvas_base(),{_super:VCanvas_base.prototype,init:function(width,height,target){this._super.init(width,height,target);if(target[0]){target=target[0];}
|
||||
target.VCanvas=this;this.canvas=document.createElement('span');$(this.canvas).css({display:'inline-block',position:'relative',overflow:'hidden',width:width,height:height,margin:'0px',padding:'0px',verticalAlign:'top'});this._insert(this.canvas,target);this.pixel_height=$(this.canvas).height();this.pixel_width=$(this.canvas).width();this.canvas.width=this.pixel_width;this.canvas.height=this.pixel_height;var groupel='<v:group coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'"'+' style="position:absolute;top:0;left:0;width:'+this.pixel_width+'px;height='+this.pixel_height+'px;"></v:group>';this.canvas.insertAdjacentHTML('beforeEnd',groupel);this.group=$(this.canvas).children()[0];},drawShape:function(path,lineColor,fillColor,lineWidth){var vpath=[];for(var i=0,plen=path.length;i<plen;i++){vpath[i]=''+(path[i][0])+','+(path[i][1]);}
|
||||
var initial=vpath.splice(0,1);lineWidth=lineWidth===undefined?1:lineWidth;var stroke=lineColor===undefined?' stroked="false" ':' strokeWeight="'+lineWidth+'" strokeColor="'+lineColor+'" ';var fill=fillColor===undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var closed=vpath[0]==vpath[vpath.length-1]?'x ':'';var vel='<v:shape coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'" '+
|
||||
stroke+
|
||||
fill+' style="position:absolute;left:0px;top:0px;height:'+this.pixel_height+'px;width:'+this.pixel_width+'px;padding:0px;margin:0px;" '+' path="m '+initial+' l '+vpath.join(', ')+' '+closed+'e">'+' </v:shape>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawCircle:function(x,y,radius,lineColor,fillColor){x-=radius+1;y-=radius+1;var stroke=lineColor===undefined?' stroked="false" ':' strokeWeight="1" strokeColor="'+lineColor+'" ';var fill=fillColor===undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var vel='<v:oval '+
|
||||
stroke+
|
||||
fill+' style="position:absolute;top:'+y+'px; left:'+x+'px; width:'+(radius*2)+'px; height:'+(radius*2)+'px"></v:oval>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawPieSlice:function(x,y,radius,startAngle,endAngle,lineColor,fillColor){if(startAngle==endAngle){return;}
|
||||
if((endAngle-startAngle)==(2*Math.PI)){startAngle=0.0;endAngle=(2*Math.PI);}
|
||||
var startx=x+Math.round(Math.cos(startAngle)*radius);var starty=y+Math.round(Math.sin(startAngle)*radius);var endx=x+Math.round(Math.cos(endAngle)*radius);var endy=y+Math.round(Math.sin(endAngle)*radius);if(startx==endx&&starty==endy&&(endAngle-startAngle)<Math.PI){return;}
|
||||
var vpath=[x-radius,y-radius,x+radius,y+radius,startx,starty,endx,endy];var stroke=lineColor===undefined?' stroked="false" ':' strokeWeight="1" strokeColor="'+lineColor+'" ';var fill=fillColor===undefined?' filled="false"':' fillColor="'+fillColor+'" filled="true" ';var vel='<v:shape coordorigin="0 0" coordsize="'+this.pixel_width+' '+this.pixel_height+'" '+
|
||||
stroke+
|
||||
fill+' style="position:absolute;left:0px;top:0px;height:'+this.pixel_height+'px;width:'+this.pixel_width+'px;padding:0px;margin:0px;" '+' path="m '+x+','+y+' wa '+vpath.join(', ')+' x e">'+' </v:shape>';this.group.insertAdjacentHTML('beforeEnd',vel);},drawRect:function(x,y,width,height,lineColor,fillColor){return this.drawShape([[x,y],[x,y+height],[x+width,y+height],[x+width,y],[x,y]],lineColor,fillColor);}});})(jQuery);
|
47
public/js/vendor/namespaced_requirejs.min.js
vendored
47
public/js/vendor/namespaced_requirejs.min.js
vendored
@ -1,47 +0,0 @@
|
||||
var requirejs = (function () {
|
||||
//Define a require object here that has any
|
||||
//default configuration you want for RequireJS. If
|
||||
//you do not have any config options you want to set,
|
||||
//just use an simple object literal, {}. You may need
|
||||
//to at least set baseUrl.
|
||||
var require = {
|
||||
baseUrl: '..'
|
||||
};
|
||||
/*
|
||||
RequireJS 2.1.6 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
||||
Available via the MIT or new BSD license.
|
||||
see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
var requirejs,require,define;
|
||||
(function(ba){function J(b){return"[object Function]"===N.call(b)}function K(b){return"[object Array]"===N.call(b)}function z(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function O(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function t(b,c){return ha.call(b,c)}function m(b,c){return t(b,c)&&b[c]}function H(b,c){for(var d in b)if(t(b,d)&&c(b[d],d))break}function S(b,c,d,m){c&&H(c,function(c,l){if(d||!t(b,l))m&&"string"!==typeof c?(b[l]||(b[l]={}),S(b[l],
|
||||
c,d,m)):b[l]=c});return b}function v(b,c){return function(){return c.apply(b,arguments)}}function ca(b){throw b;}function da(b){if(!b)return b;var c=ba;z(b.split("."),function(b){c=c[b]});return c}function B(b,c,d,m){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=m;d&&(c.originalError=d);return c}function ia(b){function c(a,f,C){var e,n,b,c,d,T,k,g=f&&f.split("/");e=g;var l=j.map,h=l&&l["*"];if(a&&"."===a.charAt(0))if(f){e=m(j.pkgs,f)?g=[f]:g.slice(0,g.length-
|
||||
1);f=a=e.concat(a.split("/"));for(e=0;f[e];e+=1)if(n=f[e],"."===n)f.splice(e,1),e-=1;else if(".."===n)if(1===e&&(".."===f[2]||".."===f[0]))break;else 0<e&&(f.splice(e-1,2),e-=2);e=m(j.pkgs,f=a[0]);a=a.join("/");e&&a===f+"/"+e.main&&(a=f)}else 0===a.indexOf("./")&&(a=a.substring(2));if(C&&l&&(g||h)){f=a.split("/");for(e=f.length;0<e;e-=1){b=f.slice(0,e).join("/");if(g)for(n=g.length;0<n;n-=1)if(C=m(l,g.slice(0,n).join("/")))if(C=m(C,b)){c=C;d=e;break}if(c)break;!T&&(h&&m(h,b))&&(T=m(h,b),k=e)}!c&&
|
||||
T&&(c=T,d=k);c&&(f.splice(0,d,c),a=f.join("/"))}return a}function d(a){A&&z(document.getElementsByTagName("script"),function(f){if(f.getAttribute("data-requiremodule")===a&&f.getAttribute("data-requirecontext")===k.contextName)return f.parentNode.removeChild(f),!0})}function p(a){var f=m(j.paths,a);if(f&&K(f)&&1<f.length)return d(a),f.shift(),k.require.undef(a),k.require([a]),!0}function g(a){var f,b=a?a.indexOf("!"):-1;-1<b&&(f=a.substring(0,b),a=a.substring(b+1,a.length));return[f,a]}function l(a,
|
||||
f,b,e){var n,D,i=null,d=f?f.name:null,l=a,h=!0,j="";a||(h=!1,a="_@r"+(N+=1));a=g(a);i=a[0];a=a[1];i&&(i=c(i,d,e),D=m(r,i));a&&(i?j=D&&D.normalize?D.normalize(a,function(a){return c(a,d,e)}):c(a,d,e):(j=c(a,d,e),a=g(j),i=a[0],j=a[1],b=!0,n=k.nameToUrl(j)));b=i&&!D&&!b?"_unnormalized"+(O+=1):"";return{prefix:i,name:j,parentMap:f,unnormalized:!!b,url:n,originalName:l,isDefine:h,id:(i?i+"!"+j:j)+b}}function s(a){var f=a.id,b=m(q,f);b||(b=q[f]=new k.Module(a));return b}function u(a,f,b){var e=a.id,n=m(q,
|
||||
e);if(t(r,e)&&(!n||n.defineEmitComplete))"defined"===f&&b(r[e]);else if(n=s(a),n.error&&"error"===f)b(n.error);else n.on(f,b)}function w(a,f){var b=a.requireModules,e=!1;if(f)f(a);else if(z(b,function(f){if(f=m(q,f))f.error=a,f.events.error&&(e=!0,f.emit("error",a))}),!e)h.onError(a)}function x(){U.length&&(ja.apply(I,[I.length-1,0].concat(U)),U=[])}function y(a){delete q[a];delete W[a]}function G(a,f,b){var e=a.map.id;a.error?a.emit("error",a.error):(f[e]=!0,z(a.depMaps,function(e,c){var d=e.id,
|
||||
g=m(q,d);g&&(!a.depMatched[c]&&!b[d])&&(m(f,d)?(a.defineDep(c,r[d]),a.check()):G(g,f,b))}),b[e]=!0)}function E(){var a,f,b,e,n=(b=1E3*j.waitSeconds)&&k.startTime+b<(new Date).getTime(),c=[],i=[],g=!1,l=!0;if(!X){X=!0;H(W,function(b){a=b.map;f=a.id;if(b.enabled&&(a.isDefine||i.push(b),!b.error))if(!b.inited&&n)p(f)?g=e=!0:(c.push(f),d(f));else if(!b.inited&&(b.fetched&&a.isDefine)&&(g=!0,!a.prefix))return l=!1});if(n&&c.length)return b=B("timeout","Load timeout for modules: "+c,null,c),b.contextName=
|
||||
k.contextName,w(b);l&&z(i,function(a){G(a,{},{})});if((!n||e)&&g)if((A||ea)&&!Y)Y=setTimeout(function(){Y=0;E()},50);X=!1}}function F(a){t(r,a[0])||s(l(a[0],null,!0)).init(a[1],a[2])}function L(a){var a=a.currentTarget||a.srcElement,b=k.onScriptLoad;a.detachEvent&&!Z?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=k.onScriptError;(!a.detachEvent||Z)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function M(){var a;for(x();I.length;){a=
|
||||
I.shift();if(null===a[0])return w(B("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));F(a)}}var X,$,k,P,Y,j={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},q={},W={},aa={},I=[],r={},V={},N=1,O=1;P={require:function(a){return a.require?a.require:a.require=k.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=r[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){var b=
|
||||
m(j.pkgs,a.map.id);return(b?m(j.config,a.map.id+"/"+b.main):m(j.config,a.map.id))||{}},exports:r[a.map.id]}}};$=function(a){this.events=m(aa,a.id)||{};this.map=a;this.shim=m(j.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};$.prototype={init:function(a,b,c,e){e=e||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=v(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=
|
||||
!0;this.ignore=e.ignore;e.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;k.startTime=(new Date).getTime();var a=this.map;if(this.shim)k.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],v(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=
|
||||
this.map.url;V[a]||(V[a]=!0,k.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var e=this.exports,n=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(J(n)){if(this.events.error&&this.map.isDefine||h.onError!==ca)try{e=k.execCb(c,n,b,e)}catch(d){a=d}else e=k.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==
|
||||
this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else e=n;this.exports=e;if(this.map.isDefine&&!this.ignore&&(r[c]=e,h.onResourceLoad))h.onResourceLoad(k,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=
|
||||
!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=l(a.prefix);this.depMaps.push(d);u(d,"defined",v(this,function(e){var n,d;d=this.map.name;var g=this.map.parentMap?this.map.parentMap.name:null,C=k.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,g,!0)})||""),e=l(a.prefix+"!"+d,this.map.parentMap),u(e,"defined",v(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),
|
||||
d=m(q,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",v(this,function(a){this.emit("error",a)}));d.enable()}}else n=v(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=v(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];H(q,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),n.fromText=v(this,function(e,c){var d=a.name,g=l(d),i=Q;c&&(e=c);i&&(Q=!1);s(g);t(j.config,b)&&(j.config[d]=j.config[b]);try{h.exec(e)}catch(D){return w(B("fromtexteval",
|
||||
"fromText eval for "+b+" failed: "+D,D,[b]))}i&&(Q=!0);this.depMaps.push(g);k.completeLoad(d);C([d],n)}),e.load(a.name,C,n,j)}));k.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){W[this.map.id]=this;this.enabling=this.enabled=!0;z(this.depMaps,v(this,function(a,b){var c,e;if("string"===typeof a){a=l(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(P,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;u(a,"defined",v(this,function(a){this.defineDep(b,
|
||||
a);this.check()}));this.errback&&u(a,"error",v(this,this.errback))}c=a.id;e=q[c];!t(P,c)&&(e&&!e.enabled)&&k.enable(a,this)}));H(this.pluginMaps,v(this,function(a){var b=m(q,a.id);b&&!b.enabled&&k.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){z(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};k={config:j,contextName:b,registry:q,defined:r,urlFetched:V,defQueue:I,Module:$,makeModuleMap:l,
|
||||
nextTick:h.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.pkgs,c=j.shim,e={paths:!0,config:!0,map:!0};H(a,function(a,b){e[b]?"map"===b?(j.map||(j.map={}),S(j[b],a,!0,!0)):S(j[b],a,!0):j[b]=a});a.shim&&(H(a.shim,function(a,b){K(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=k.makeShimExports(a);c[b]=a}),j.shim=c);a.packages&&(z(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,
|
||||
location:a.location||a.name,main:(a.main||"main").replace(ka,"").replace(fa,"")}}),j.pkgs=b);H(q,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=l(b))});if(a.deps||a.callback)k.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,f){function d(e,c,g){var i,j;f.enableBuildCallback&&(c&&J(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(J(c))return w(B("requireargs",
|
||||
"Invalid require call"),g);if(a&&t(P,e))return P[e](q[a.id]);if(h.get)return h.get(k,e,a,d);i=l(e,a,!1,!0);i=i.id;return!t(r,i)?w(B("notloaded",'Module name "'+i+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[i]}M();k.nextTick(function(){M();j=s(l(null,a));j.skipMap=f.skipMap;j.init(e,c,g,{enabled:!0});E()});return d}f=f||{};S(d,{isBrowser:A,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];if(-1!==f&&(!("."===g||".."===g)||1<f))d=b.substring(f,b.length),b=
|
||||
b.substring(0,f);return k.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return t(r,l(b,a,!1,!0).id)},specified:function(b){b=l(b,a,!1,!0).id;return t(r,b)||t(q,b)}});a||(d.undef=function(b){x();var c=l(b,a,!0),d=m(q,b);delete r[b];delete V[c.url];delete aa[b];d&&(d.events.defined&&(aa[b]=d.events),y(b))});return d},enable:function(a){m(q,a.id)&&s(a).enable()},completeLoad:function(a){var b,c,e=m(j.shim,a)||{},d=e.exports;for(x();I.length;){c=I.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===
|
||||
a&&(b=!0);F(c)}c=m(q,a);if(!b&&!t(r,a)&&c&&!c.inited){if(j.enforceDefine&&(!d||!da(d)))return p(a)?void 0:w(B("nodefine","No define call for "+a,null,[a]));F([a,e.deps||[],e.exportsFn])}E()},nameToUrl:function(a,b,c){var d,g,l,i,k,p;if(h.jsExtRegExp.test(a))i=a+(b||"");else{d=j.paths;g=j.pkgs;i=a.split("/");for(k=i.length;0<k;k-=1)if(p=i.slice(0,k).join("/"),l=m(g,p),p=m(d,p)){K(p)&&(p=p[0]);i.splice(0,k,p);break}else if(l){a=a===l.name?l.location+"/"+l.main:l.location;i.splice(0,k,a);break}i=i.join("/");
|
||||
i+=b||(/\?/.test(i)||c?"":".js");i=("/"===i.charAt(0)||i.match(/^[\w\+\.\-]+:/)?"":j.baseUrl)+i}return j.urlArgs?i+((-1===i.indexOf("?")?"?":"&")+j.urlArgs):i},load:function(a,b){h.load(k,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||la.test((a.currentTarget||a.srcElement).readyState))R=null,a=L(a),k.completeLoad(a.id)},onScriptError:function(a){var b=L(a);if(!p(b.id))return w(B("scripterror","Script error for: "+b.id,a,[b.id]))}};k.require=k.makeRequire();
|
||||
return k}var h,x,y,E,L,F,R,M,s,ga,ma=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,na=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,fa=/\.js$/,ka=/^\.\//;x=Object.prototype;var N=x.toString,ha=x.hasOwnProperty,ja=Array.prototype.splice,A=!!("undefined"!==typeof window&&navigator&&window.document),ea=!A&&"undefined"!==typeof importScripts,la=A&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Z="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),G={},u={},U=[],Q=
|
||||
!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(J(requirejs))return;u=requirejs;requirejs=void 0}"undefined"!==typeof require&&!J(require)&&(u=require,require=void 0);h=requirejs=function(b,c,d,p){var g,l="_";!K(b)&&"string"!==typeof b&&(g=b,K(c)?(b=c,c=d,d=p):b=[]);g&&g.context&&(l=g.context);(p=m(G,l))||(p=G[l]=h.s.newContext(l));g&&p.configure(g);return p.require(b,c,d)};h.config=function(b){return h(b)};h.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,
|
||||
4)}:function(b){b()};require||(require=h);h.version="2.1.6";h.jsExtRegExp=/^\/|:|\?|\.js$/;h.isBrowser=A;x=h.s={contexts:G,newContext:ia};h({});z(["toUrl","undef","defined","specified"],function(b){h[b]=function(){var c=G._;return c.require[b].apply(c,arguments)}});if(A&&(y=x.head=document.getElementsByTagName("head")[0],E=document.getElementsByTagName("base")[0]))y=x.head=E.parentNode;h.onError=ca;h.load=function(b,c,d){var h=b&&b.config||{},g;if(A)return g=h.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml",
|
||||
"html:script"):document.createElement("script"),g.type=h.scriptType||"text/javascript",g.charset="utf-8",g.async=!0,g.setAttribute("data-requirecontext",b.contextName),g.setAttribute("data-requiremodule",c),g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&!Z?(Q=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)):(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,M=g,E?y.insertBefore(g,E):y.appendChild(g),
|
||||
M=null,g;if(ea)try{importScripts(d),b.completeLoad(c)}catch(l){b.onError(B("importscripts","importScripts failed for "+c+" at "+d,l,[c]))}};A&&O(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(L=b.getAttribute("data-main"))return s=L,u.baseUrl||(F=s.split("/"),s=F.pop(),ga=F.length?F.join("/")+"/":"./",u.baseUrl=ga),s=s.replace(fa,""),h.jsExtRegExp.test(s)&&(s=L),u.deps=u.deps?u.deps.concat(s):[s],!0});define=function(b,c,d){var h,g;"string"!==typeof b&&(d=c,c=b,b=null);
|
||||
K(c)||(d=c,c=null);!c&&J(d)&&(c=[],d.length&&(d.toString().replace(ma,"").replace(na,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(Q){if(!(h=M))R&&"interactive"===R.readyState||O(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return R=b}),h=R;h&&(b||(b=h.getAttribute("data-requiremodule")),g=G[h.getAttribute("data-requirecontext")])}(g?g.defQueue:U).push([b,c,d])};define.amd={jQuery:!0};h.exec=function(b){return eval(b)};
|
||||
h(u)}})(this);
|
||||
return require;
|
||||
})();
|
10
public/js/vendor/raphael.js
vendored
10
public/js/vendor/raphael.js
vendored
File diff suppressed because one or more lines are too long
342
public/js/vendor/raphael/eve.js
vendored
342
public/js/vendor/raphael/eve.js
vendored
@ -1,342 +0,0 @@
|
||||
// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\
|
||||
// │ Eve 0.4.1 - JavaScript Events Library │ \\
|
||||
// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\
|
||||
// │ Copyright (c) 2008-2012 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\
|
||||
// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\
|
||||
// └──────────────────────────────────────────────────────────────────────────────────────┘ \\
|
||||
|
||||
(function (glob) {
|
||||
var version = "0.4.1",
|
||||
has = "hasOwnProperty",
|
||||
separator = /[\.\/]/,
|
||||
wildcard = "*",
|
||||
fun = function () {},
|
||||
numsort = function (a, b) {
|
||||
return a - b;
|
||||
},
|
||||
current_event,
|
||||
stop,
|
||||
events = {n: {}},
|
||||
/*\
|
||||
* eve
|
||||
[ method ]
|
||||
|
||||
* Fires event with given `name`, given scope and other parameters.
|
||||
|
||||
> Arguments
|
||||
|
||||
- name (string) name of the *event*, dot (`.`) or slash (`/`) separated
|
||||
- scope (object) context for the event handlers
|
||||
- varargs (...) the rest of arguments will be sent to event handlers
|
||||
|
||||
= (object) array of returned values from the listeners
|
||||
\*/
|
||||
eve = function (name, scope) {
|
||||
var e = events,
|
||||
oldstop = stop,
|
||||
args = Array.prototype.slice.call(arguments, 2),
|
||||
listeners = eve.listeners(name),
|
||||
z = 0,
|
||||
f = false,
|
||||
l,
|
||||
indexed = [],
|
||||
queue = {},
|
||||
out = [],
|
||||
ce = current_event,
|
||||
errors = [];
|
||||
current_event = name;
|
||||
stop = 0;
|
||||
for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) {
|
||||
indexed.push(listeners[i].zIndex);
|
||||
if (listeners[i].zIndex < 0) {
|
||||
queue[listeners[i].zIndex] = listeners[i];
|
||||
}
|
||||
}
|
||||
indexed.sort(numsort);
|
||||
while (indexed[z] < 0) {
|
||||
l = queue[indexed[z++]];
|
||||
out.push(l.apply(scope, args));
|
||||
if (stop) {
|
||||
stop = oldstop;
|
||||
return out;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < ii; i++) {
|
||||
l = listeners[i];
|
||||
if ("zIndex" in l) {
|
||||
if (l.zIndex == indexed[z]) {
|
||||
out.push(l.apply(scope, args));
|
||||
if (stop) {
|
||||
break;
|
||||
}
|
||||
do {
|
||||
z++;
|
||||
l = queue[indexed[z]];
|
||||
l && out.push(l.apply(scope, args));
|
||||
if (stop) {
|
||||
break;
|
||||
}
|
||||
} while (l)
|
||||
} else {
|
||||
queue[l.zIndex] = l;
|
||||
}
|
||||
} else {
|
||||
out.push(l.apply(scope, args));
|
||||
if (stop) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
stop = oldstop;
|
||||
current_event = ce;
|
||||
return out.length ? out : null;
|
||||
};
|
||||
// Undocumented. Debug only.
|
||||
eve._events = events;
|
||||
/*\
|
||||
* eve.listeners
|
||||
[ method ]
|
||||
|
||||
* Internal method which gives you array of all event handlers that will be triggered by the given `name`.
|
||||
|
||||
> Arguments
|
||||
|
||||
- name (string) name of the event, dot (`.`) or slash (`/`) separated
|
||||
|
||||
= (array) array of event handlers
|
||||
\*/
|
||||
eve.listeners = function (name) {
|
||||
var names = name.split(separator),
|
||||
e = events,
|
||||
item,
|
||||
items,
|
||||
k,
|
||||
i,
|
||||
ii,
|
||||
j,
|
||||
jj,
|
||||
nes,
|
||||
es = [e],
|
||||
out = [];
|
||||
for (i = 0, ii = names.length; i < ii; i++) {
|
||||
nes = [];
|
||||
for (j = 0, jj = es.length; j < jj; j++) {
|
||||
e = es[j].n;
|
||||
items = [e[names[i]], e[wildcard]];
|
||||
k = 2;
|
||||
while (k--) {
|
||||
item = items[k];
|
||||
if (item) {
|
||||
nes.push(item);
|
||||
out = out.concat(item.f || []);
|
||||
}
|
||||
}
|
||||
}
|
||||
es = nes;
|
||||
}
|
||||
return out;
|
||||
};
|
||||
|
||||
/*\
|
||||
* eve.on
|
||||
[ method ]
|
||||
**
|
||||
* Binds given event handler with a given name. You can use wildcards “`*`” for the names:
|
||||
| eve.on("*.under.*", f);
|
||||
| eve("mouse.under.floor"); // triggers f
|
||||
* Use @eve to trigger the listener.
|
||||
**
|
||||
> Arguments
|
||||
**
|
||||
- name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
|
||||
- f (function) event handler function
|
||||
**
|
||||
= (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.
|
||||
> Example:
|
||||
| eve.on("mouse", eatIt)(2);
|
||||
| eve.on("mouse", scream);
|
||||
| eve.on("mouse", catchIt)(1);
|
||||
* This will ensure that `catchIt()` function will be called before `eatIt()`.
|
||||
*
|
||||
* If you want to put your handler before non-indexed handlers, specify a negative value.
|
||||
* Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.
|
||||
\*/
|
||||
eve.on = function (name, f) {
|
||||
var names = name.split(separator),
|
||||
e = events;
|
||||
for (var i = 0, ii = names.length; i < ii; i++) {
|
||||
e = e.n;
|
||||
e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});
|
||||
}
|
||||
e.f = e.f || [];
|
||||
for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {
|
||||
return fun;
|
||||
}
|
||||
e.f.push(f);
|
||||
return function (zIndex) {
|
||||
if (+zIndex == +zIndex) {
|
||||
f.zIndex = +zIndex;
|
||||
}
|
||||
};
|
||||
};
|
||||
/*\
|
||||
* eve.f
|
||||
[ method ]
|
||||
**
|
||||
* Returns function that will fire given event with optional arguments.
|
||||
* Arguments that will be passed to the result function will be also
|
||||
* concated to the list of final arguments.
|
||||
| el.onclick = eve.f("click", 1, 2);
|
||||
| eve.on("click", function (a, b, c) {
|
||||
| console.log(a, b, c); // 1, 2, [event object]
|
||||
| });
|
||||
> Arguments
|
||||
- event (string) event name
|
||||
- varargs (…) and any other arguments
|
||||
= (function) possible event handler function
|
||||
\*/
|
||||
eve.f = function (event) {
|
||||
var attrs = [].slice.call(arguments, 1);
|
||||
return function () {
|
||||
eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0)));
|
||||
};
|
||||
};
|
||||
/*\
|
||||
* eve.stop
|
||||
[ method ]
|
||||
**
|
||||
* Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.
|
||||
\*/
|
||||
eve.stop = function () {
|
||||
stop = 1;
|
||||
};
|
||||
/*\
|
||||
* eve.nt
|
||||
[ method ]
|
||||
**
|
||||
* Could be used inside event handler to figure out actual name of the event.
|
||||
**
|
||||
> Arguments
|
||||
**
|
||||
- subname (string) #optional subname of the event
|
||||
**
|
||||
= (string) name of the event, if `subname` is not specified
|
||||
* or
|
||||
= (boolean) `true`, if current event’s name contains `subname`
|
||||
\*/
|
||||
eve.nt = function (subname) {
|
||||
if (subname) {
|
||||
return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event);
|
||||
}
|
||||
return current_event;
|
||||
};
|
||||
/*\
|
||||
* eve.off
|
||||
[ method ]
|
||||
**
|
||||
* Removes given function from the list of event listeners assigned to given name.
|
||||
* If no arguments specified all the events will be cleared.
|
||||
**
|
||||
> Arguments
|
||||
**
|
||||
- name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
|
||||
- f (function) event handler function
|
||||
\*/
|
||||
/*\
|
||||
* eve.unbind
|
||||
[ method ]
|
||||
**
|
||||
* See @eve.off
|
||||
\*/
|
||||
eve.off = eve.unbind = function (name, f) {
|
||||
if (!name) {
|
||||
eve._events = events = {n: {}};
|
||||
return;
|
||||
}
|
||||
var names = name.split(separator),
|
||||
e,
|
||||
key,
|
||||
splice,
|
||||
i, ii, j, jj,
|
||||
cur = [events];
|
||||
for (i = 0, ii = names.length; i < ii; i++) {
|
||||
for (j = 0; j < cur.length; j += splice.length - 2) {
|
||||
splice = [j, 1];
|
||||
e = cur[j].n;
|
||||
if (names[i] != wildcard) {
|
||||
if (e[names[i]]) {
|
||||
splice.push(e[names[i]]);
|
||||
}
|
||||
} else {
|
||||
for (key in e) if (e[has](key)) {
|
||||
splice.push(e[key]);
|
||||
}
|
||||
}
|
||||
cur.splice.apply(cur, splice);
|
||||
}
|
||||
}
|
||||
for (i = 0, ii = cur.length; i < ii; i++) {
|
||||
e = cur[i];
|
||||
while (e.n) {
|
||||
if (f) {
|
||||
if (e.f) {
|
||||
for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {
|
||||
e.f.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
!e.f.length && delete e.f;
|
||||
}
|
||||
for (key in e.n) if (e.n[has](key) && e.n[key].f) {
|
||||
var funcs = e.n[key].f;
|
||||
for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {
|
||||
funcs.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
!funcs.length && delete e.n[key].f;
|
||||
}
|
||||
} else {
|
||||
delete e.f;
|
||||
for (key in e.n) if (e.n[has](key) && e.n[key].f) {
|
||||
delete e.n[key].f;
|
||||
}
|
||||
}
|
||||
e = e.n;
|
||||
}
|
||||
}
|
||||
};
|
||||
/*\
|
||||
* eve.once
|
||||
[ method ]
|
||||
**
|
||||
* Binds given event handler with a given name to only run once then unbind itself.
|
||||
| eve.once("login", f);
|
||||
| eve("login"); // triggers f
|
||||
| eve("login"); // no listeners
|
||||
* Use @eve to trigger the listener.
|
||||
**
|
||||
> Arguments
|
||||
**
|
||||
- name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards
|
||||
- f (function) event handler function
|
||||
**
|
||||
= (function) same return function as @eve.on
|
||||
\*/
|
||||
eve.once = function (name, f) {
|
||||
var f2 = function () {
|
||||
eve.unbind(name, f2);
|
||||
return f.apply(this, arguments);
|
||||
};
|
||||
return eve.on(name, f2);
|
||||
};
|
||||
/*\
|
||||
* eve.version
|
||||
[ property (string) ]
|
||||
**
|
||||
* Current version of the library.
|
||||
\*/
|
||||
eve.version = version;
|
||||
eve.toString = function () {
|
||||
return "You are running Eve " + version;
|
||||
};
|
||||
(typeof module != "undefined" && module.exports) ? (module.exports = eve) : (typeof define != "undefined" ? (define("eve", [], function() { return eve; })) : (glob.eve = eve));
|
||||
})(this);
|
19
public/js/vendor/raphael/raphael.amd.js
vendored
19
public/js/vendor/raphael/raphael.amd.js
vendored
@ -1,19 +0,0 @@
|
||||
// ┌─────────────────────────────────────────────────────────────────────┐ \\
|
||||
// │ "Raphaël 2.0.2" - JavaScript Vector Library │ \\
|
||||
// ├─────────────────────────────────────────────────────────────────────┤ \\
|
||||
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
|
||||
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\
|
||||
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
|
||||
// └─────────────────────────────────────────────────────────────────────┘ \\
|
||||
|
||||
// This module combines the core raphael module with the svg and vml modules
|
||||
// to return a complete raphael object. Apps that want to use Raphaël as an
|
||||
// AMD module should reference this file.
|
||||
//
|
||||
// Apps that want to load a plain old script that exports window.raphael
|
||||
// should use the combined raphael.js file.
|
||||
|
||||
define(['./raphael.core', './raphael.svg', './raphael.vml'], function (R) {
|
||||
return R;
|
||||
});
|
||||
|
5191
public/js/vendor/raphael/raphael.core.js
vendored
5191
public/js/vendor/raphael/raphael.core.js
vendored
File diff suppressed because it is too large
Load Diff
1366
public/js/vendor/raphael/raphael.svg.js
vendored
1366
public/js/vendor/raphael/raphael.svg.js
vendored
File diff suppressed because it is too large
Load Diff
975
public/js/vendor/raphael/raphael.vml.js
vendored
975
public/js/vendor/raphael/raphael.vml.js
vendored
@ -1,975 +0,0 @@
|
||||
// ┌─────────────────────────────────────────────────────────────────────┐ \\
|
||||
// │ Raphaël - JavaScript Vector Library │ \\
|
||||
// ├─────────────────────────────────────────────────────────────────────┤ \\
|
||||
// │ VML Module │ \\
|
||||
// ├─────────────────────────────────────────────────────────────────────┤ \\
|
||||
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
|
||||
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\
|
||||
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\
|
||||
// └─────────────────────────────────────────────────────────────────────┘ \\
|
||||
define(['./raphael.core'], function (R) {
|
||||
if (!R.vml) return;
|
||||
var has = "hasOwnProperty",
|
||||
Str = String,
|
||||
toFloat = parseFloat,
|
||||
math = Math,
|
||||
round = math.round,
|
||||
mmax = math.max,
|
||||
mmin = math.min,
|
||||
abs = math.abs,
|
||||
fillString = "fill",
|
||||
separator = /[, ]+/,
|
||||
eve = R.eve,
|
||||
ms = " progid:DXImageTransform.Microsoft",
|
||||
S = " ",
|
||||
E = "",
|
||||
map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"},
|
||||
bites = /([clmz]),?([^clmz]*)/gi,
|
||||
blurregexp = / progid:\S+Blur\([^\)]+\)/g,
|
||||
val = /-?[^,\s-]+/g,
|
||||
cssDot = "position:absolute;left:0;top:0;width:1px;height:1px",
|
||||
zoom = 21600,
|
||||
pathTypes = {path: 1, rect: 1, image: 1},
|
||||
ovalTypes = {circle: 1, ellipse: 1},
|
||||
path2vml = function (path) {
|
||||
var total = /[ahqstv]/ig,
|
||||
command = R._pathToAbsolute;
|
||||
Str(path).match(total) && (command = R._path2curve);
|
||||
total = /[clmz]/g;
|
||||
if (command == R._pathToAbsolute && !Str(path).match(total)) {
|
||||
var res = Str(path).replace(bites, function (all, command, args) {
|
||||
var vals = [],
|
||||
isMove = command.toLowerCase() == "m",
|
||||
res = map[command];
|
||||
args.replace(val, function (value) {
|
||||
if (isMove && vals.length == 2) {
|
||||
res += vals + map[command == "m" ? "l" : "L"];
|
||||
vals = [];
|
||||
}
|
||||
vals.push(round(value * zoom));
|
||||
});
|
||||
return res + vals;
|
||||
});
|
||||
return res;
|
||||
}
|
||||
var pa = command(path), p, r;
|
||||
res = [];
|
||||
for (var i = 0, ii = pa.length; i < ii; i++) {
|
||||
p = pa[i];
|
||||
r = pa[i][0].toLowerCase();
|
||||
r == "z" && (r = "x");
|
||||
for (var j = 1, jj = p.length; j < jj; j++) {
|
||||
r += round(p[j] * zoom) + (j != jj - 1 ? "," : E);
|
||||
}
|
||||
res.push(r);
|
||||
}
|
||||
return res.join(S);
|
||||
},
|
||||
compensation = function (deg, dx, dy) {
|
||||
var m = R.matrix();
|
||||
m.rotate(-deg, .5, .5);
|
||||
return {
|
||||
dx: m.x(dx, dy),
|
||||
dy: m.y(dx, dy)
|
||||
};
|
||||
},
|
||||
setCoords = function (p, sx, sy, dx, dy, deg) {
|
||||
var _ = p._,
|
||||
m = p.matrix,
|
||||
fillpos = _.fillpos,
|
||||
o = p.node,
|
||||
s = o.style,
|
||||
y = 1,
|
||||
flip = "",
|
||||
dxdy,
|
||||
kx = zoom / sx,
|
||||
ky = zoom / sy;
|
||||
s.visibility = "hidden";
|
||||
if (!sx || !sy) {
|
||||
return;
|
||||
}
|
||||
o.coordsize = abs(kx) + S + abs(ky);
|
||||
s.rotation = deg * (sx * sy < 0 ? -1 : 1);
|
||||
if (deg) {
|
||||
var c = compensation(deg, dx, dy);
|
||||
dx = c.dx;
|
||||
dy = c.dy;
|
||||
}
|
||||
sx < 0 && (flip += "x");
|
||||
sy < 0 && (flip += " y") && (y = -1);
|
||||
s.flip = flip;
|
||||
o.coordorigin = (dx * -kx) + S + (dy * -ky);
|
||||
if (fillpos || _.fillsize) {
|
||||
var fill = o.getElementsByTagName(fillString);
|
||||
fill = fill && fill[0];
|
||||
o.removeChild(fill);
|
||||
if (fillpos) {
|
||||
c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));
|
||||
fill.position = c.dx * y + S + c.dy * y;
|
||||
}
|
||||
if (_.fillsize) {
|
||||
fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);
|
||||
}
|
||||
o.appendChild(fill);
|
||||
}
|
||||
s.visibility = "visible";
|
||||
};
|
||||
R.toString = function () {
|
||||
return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version;
|
||||
};
|
||||
var addArrow = function (o, value, isEnd) {
|
||||
var values = Str(value).toLowerCase().split("-"),
|
||||
se = isEnd ? "end" : "start",
|
||||
i = values.length,
|
||||
type = "classic",
|
||||
w = "medium",
|
||||
h = "medium";
|
||||
while (i--) {
|
||||
switch (values[i]) {
|
||||
case "block":
|
||||
case "classic":
|
||||
case "oval":
|
||||
case "diamond":
|
||||
case "open":
|
||||
case "none":
|
||||
type = values[i];
|
||||
break;
|
||||
case "wide":
|
||||
case "narrow": h = values[i]; break;
|
||||
case "long":
|
||||
case "short": w = values[i]; break;
|
||||
}
|
||||
}
|
||||
var stroke = o.node.getElementsByTagName("stroke")[0];
|
||||
stroke[se + "arrow"] = type;
|
||||
stroke[se + "arrowlength"] = w;
|
||||
stroke[se + "arrowwidth"] = h;
|
||||
},
|
||||
setFillAndStroke = function (o, params) {
|
||||
// o.paper.canvas.style.display = "none";
|
||||
o.attrs = o.attrs || {};
|
||||
var node = o.node,
|
||||
a = o.attrs,
|
||||
s = node.style,
|
||||
xy,
|
||||
newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),
|
||||
isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),
|
||||
res = o;
|
||||
|
||||
|
||||
for (var par in params) if (params[has](par)) {
|
||||
a[par] = params[par];
|
||||
}
|
||||
if (newpath) {
|
||||
a.path = R._getPath[o.type](o);
|
||||
o._.dirty = 1;
|
||||
}
|
||||
params.href && (node.href = params.href);
|
||||
params.title && (node.title = params.title);
|
||||
params.target && (node.target = params.target);
|
||||
params.cursor && (s.cursor = params.cursor);
|
||||
"blur" in params && o.blur(params.blur);
|
||||
if (params.path && o.type == "path" || newpath) {
|
||||
node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path);
|
||||
if (o.type == "image") {
|
||||
o._.fillpos = [a.x, a.y];
|
||||
o._.fillsize = [a.width, a.height];
|
||||
setCoords(o, 1, 1, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
"transform" in params && o.transform(params.transform);
|
||||
if (isOval) {
|
||||
var cx = +a.cx,
|
||||
cy = +a.cy,
|
||||
rx = +a.rx || +a.r || 0,
|
||||
ry = +a.ry || +a.r || 0;
|
||||
node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));
|
||||
}
|
||||
if ("clip-rect" in params) {
|
||||
var rect = Str(params["clip-rect"]).split(separator);
|
||||
if (rect.length == 4) {
|
||||
rect[2] = +rect[2] + (+rect[0]);
|
||||
rect[3] = +rect[3] + (+rect[1]);
|
||||
var div = node.clipRect || R._g.doc.createElement("div"),
|
||||
dstyle = div.style;
|
||||
dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);
|
||||
if (!node.clipRect) {
|
||||
dstyle.position = "absolute";
|
||||
dstyle.top = 0;
|
||||
dstyle.left = 0;
|
||||
dstyle.width = o.paper.width + "px";
|
||||
dstyle.height = o.paper.height + "px";
|
||||
node.parentNode.insertBefore(div, node);
|
||||
div.appendChild(node);
|
||||
node.clipRect = div;
|
||||
}
|
||||
}
|
||||
if (!params["clip-rect"]) {
|
||||
node.clipRect && (node.clipRect.style.clip = "auto");
|
||||
}
|
||||
}
|
||||
if (o.textpath) {
|
||||
var textpathStyle = o.textpath.style;
|
||||
params.font && (textpathStyle.font = params.font);
|
||||
params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"');
|
||||
params["font-size"] && (textpathStyle.fontSize = params["font-size"]);
|
||||
params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]);
|
||||
params["font-style"] && (textpathStyle.fontStyle = params["font-style"]);
|
||||
}
|
||||
if ("arrow-start" in params) {
|
||||
addArrow(res, params["arrow-start"]);
|
||||
}
|
||||
if ("arrow-end" in params) {
|
||||
addArrow(res, params["arrow-end"], 1);
|
||||
}
|
||||
if (params.opacity != null ||
|
||||
params["stroke-width"] != null ||
|
||||
params.fill != null ||
|
||||
params.src != null ||
|
||||
params.stroke != null ||
|
||||
params["stroke-width"] != null ||
|
||||
params["stroke-opacity"] != null ||
|
||||
params["fill-opacity"] != null ||
|
||||
params["stroke-dasharray"] != null ||
|
||||
params["stroke-miterlimit"] != null ||
|
||||
params["stroke-linejoin"] != null ||
|
||||
params["stroke-linecap"] != null) {
|
||||
var fill = node.getElementsByTagName(fillString),
|
||||
newfill = false;
|
||||
fill = fill && fill[0];
|
||||
!fill && (newfill = fill = createNode(fillString));
|
||||
if (o.type == "image" && params.src) {
|
||||
fill.src = params.src;
|
||||
}
|
||||
params.fill && (fill.on = true);
|
||||
if (fill.on == null || params.fill == "none" || params.fill === null) {
|
||||
fill.on = false;
|
||||
}
|
||||
if (fill.on && params.fill) {
|
||||
var isURL = Str(params.fill).match(R._ISURL);
|
||||
if (isURL) {
|
||||
fill.parentNode == node && node.removeChild(fill);
|
||||
fill.rotate = true;
|
||||
fill.src = isURL[1];
|
||||
fill.type = "tile";
|
||||
var bbox = o.getBBox(1);
|
||||
fill.position = bbox.x + S + bbox.y;
|
||||
o._.fillpos = [bbox.x, bbox.y];
|
||||
|
||||
R._preload(isURL[1], function () {
|
||||
o._.fillsize = [this.offsetWidth, this.offsetHeight];
|
||||
});
|
||||
} else {
|
||||
fill.color = R.getRGB(params.fill).hex;
|
||||
fill.src = E;
|
||||
fill.type = "solid";
|
||||
if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) {
|
||||
a.fill = "none";
|
||||
a.gradient = params.fill;
|
||||
fill.rotate = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("fill-opacity" in params || "opacity" in params) {
|
||||
var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);
|
||||
opacity = mmin(mmax(opacity, 0), 1);
|
||||
fill.opacity = opacity;
|
||||
if (fill.src) {
|
||||
fill.color = "none";
|
||||
}
|
||||
}
|
||||
node.appendChild(fill);
|
||||
var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]),
|
||||
newstroke = false;
|
||||
!stroke && (newstroke = stroke = createNode("stroke"));
|
||||
if ((params.stroke && params.stroke != "none") ||
|
||||
params["stroke-width"] ||
|
||||
params["stroke-opacity"] != null ||
|
||||
params["stroke-dasharray"] ||
|
||||
params["stroke-miterlimit"] ||
|
||||
params["stroke-linejoin"] ||
|
||||
params["stroke-linecap"]) {
|
||||
stroke.on = true;
|
||||
}
|
||||
(params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);
|
||||
var strokeColor = R.getRGB(params.stroke);
|
||||
stroke.on && params.stroke && (stroke.color = strokeColor.hex);
|
||||
opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);
|
||||
var width = (toFloat(params["stroke-width"]) || 1) * .75;
|
||||
opacity = mmin(mmax(opacity, 0), 1);
|
||||
params["stroke-width"] == null && (width = a["stroke-width"]);
|
||||
params["stroke-width"] && (stroke.weight = width);
|
||||
width && width < 1 && (opacity *= width) && (stroke.weight = 1);
|
||||
stroke.opacity = opacity;
|
||||
|
||||
params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter");
|
||||
stroke.miterlimit = params["stroke-miterlimit"] || 8;
|
||||
params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round");
|
||||
if (params["stroke-dasharray"]) {
|
||||
var dasharray = {
|
||||
"-": "shortdash",
|
||||
".": "shortdot",
|
||||
"-.": "shortdashdot",
|
||||
"-..": "shortdashdotdot",
|
||||
". ": "dot",
|
||||
"- ": "dash",
|
||||
"--": "longdash",
|
||||
"- .": "dashdot",
|
||||
"--.": "longdashdot",
|
||||
"--..": "longdashdotdot"
|
||||
};
|
||||
stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E;
|
||||
}
|
||||
newstroke && node.appendChild(stroke);
|
||||
}
|
||||
if (res.type == "text") {
|
||||
res.paper.canvas.style.display = E;
|
||||
var span = res.paper.span,
|
||||
m = 100,
|
||||
fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/);
|
||||
s = span.style;
|
||||
a.font && (s.font = a.font);
|
||||
a["font-family"] && (s.fontFamily = a["font-family"]);
|
||||
a["font-weight"] && (s.fontWeight = a["font-weight"]);
|
||||
a["font-style"] && (s.fontStyle = a["font-style"]);
|
||||
fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10;
|
||||
s.fontSize = fontSize * m + "px";
|
||||
res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>"));
|
||||
var brect = span.getBoundingClientRect();
|
||||
res.W = a.w = (brect.right - brect.left) / m;
|
||||
res.H = a.h = (brect.bottom - brect.top) / m;
|
||||
// res.paper.canvas.style.display = "none";
|
||||
res.X = a.x;
|
||||
res.Y = a.y + res.H / 2;
|
||||
|
||||
("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));
|
||||
var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"];
|
||||
for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {
|
||||
res._.dirty = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
// text-anchor emulation
|
||||
switch (a["text-anchor"]) {
|
||||
case "start":
|
||||
res.textpath.style["v-text-align"] = "left";
|
||||
res.bbx = res.W / 2;
|
||||
break;
|
||||
case "end":
|
||||
res.textpath.style["v-text-align"] = "right";
|
||||
res.bbx = -res.W / 2;
|
||||
break;
|
||||
default:
|
||||
res.textpath.style["v-text-align"] = "center";
|
||||
res.bbx = 0;
|
||||
break;
|
||||
}
|
||||
res.textpath.style["v-text-kern"] = true;
|
||||
}
|
||||
// res.paper.canvas.style.display = E;
|
||||
},
|
||||
addGradientFill = function (o, gradient, fill) {
|
||||
o.attrs = o.attrs || {};
|
||||
var attrs = o.attrs,
|
||||
pow = Math.pow,
|
||||
opacity,
|
||||
oindex,
|
||||
type = "linear",
|
||||
fxfy = ".5 .5";
|
||||
o.attrs.gradient = gradient;
|
||||
gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {
|
||||
type = "radial";
|
||||
if (fx && fy) {
|
||||
fx = toFloat(fx);
|
||||
fy = toFloat(fy);
|
||||
pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);
|
||||
fxfy = fx + S + fy;
|
||||
}
|
||||
return E;
|
||||
});
|
||||
gradient = gradient.split(/\s*\-\s*/);
|
||||
if (type == "linear") {
|
||||
var angle = gradient.shift();
|
||||
angle = -toFloat(angle);
|
||||
if (isNaN(angle)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
var dots = R._parseDots(gradient);
|
||||
if (!dots) {
|
||||
return null;
|
||||
}
|
||||
o = o.shape || o.node;
|
||||
if (dots.length) {
|
||||
o.removeChild(fill);
|
||||
fill.on = true;
|
||||
fill.method = "none";
|
||||
fill.color = dots[0].color;
|
||||
fill.color2 = dots[dots.length - 1].color;
|
||||
var clrs = [];
|
||||
for (var i = 0, ii = dots.length; i < ii; i++) {
|
||||
dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);
|
||||
}
|
||||
fill.colors = clrs.length ? clrs.join() : "0% " + fill.color;
|
||||
if (type == "radial") {
|
||||
fill.type = "gradientTitle";
|
||||
fill.focus = "100%";
|
||||
fill.focussize = "0 0";
|
||||
fill.focusposition = fxfy;
|
||||
fill.angle = 0;
|
||||
} else {
|
||||
// fill.rotate= true;
|
||||
fill.type = "gradient";
|
||||
fill.angle = (270 - angle) % 360;
|
||||
}
|
||||
o.appendChild(fill);
|
||||
}
|
||||
return 1;
|
||||
},
|
||||
Element = function (node, vml) {
|
||||
this[0] = this.node = node;
|
||||
node.raphael = true;
|
||||
this.id = R._oid++;
|
||||
node.raphaelid = this.id;
|
||||
this.X = 0;
|
||||
this.Y = 0;
|
||||
this.attrs = {};
|
||||
this.paper = vml;
|
||||
this.matrix = R.matrix();
|
||||
this._ = {
|
||||
transform: [],
|
||||
sx: 1,
|
||||
sy: 1,
|
||||
dx: 0,
|
||||
dy: 0,
|
||||
deg: 0,
|
||||
dirty: 1,
|
||||
dirtyT: 1
|
||||
};
|
||||
!vml.bottom && (vml.bottom = this);
|
||||
this.prev = vml.top;
|
||||
vml.top && (vml.top.next = this);
|
||||
vml.top = this;
|
||||
this.next = null;
|
||||
};
|
||||
var elproto = R.el;
|
||||
|
||||
Element.prototype = elproto;
|
||||
elproto.constructor = Element;
|
||||
elproto.transform = function (tstr) {
|
||||
if (tstr == null) {
|
||||
return this._.transform;
|
||||
}
|
||||
var vbs = this.paper._viewBoxShift,
|
||||
vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E,
|
||||
oldt;
|
||||
if (vbs) {
|
||||
oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E);
|
||||
}
|
||||
R._extractTransform(this, vbt + tstr);
|
||||
var matrix = this.matrix.clone(),
|
||||
skew = this.skew,
|
||||
o = this.node,
|
||||
split,
|
||||
isGrad = ~Str(this.attrs.fill).indexOf("-"),
|
||||
isPatt = !Str(this.attrs.fill).indexOf("url(");
|
||||
matrix.translate(-.5, -.5);
|
||||
if (isPatt || isGrad || this.type == "image") {
|
||||
skew.matrix = "1 0 0 1";
|
||||
skew.offset = "0 0";
|
||||
split = matrix.split();
|
||||
if ((isGrad && split.noRotation) || !split.isSimple) {
|
||||
o.style.filter = matrix.toFilter();
|
||||
var bb = this.getBBox(),
|
||||
bbt = this.getBBox(1),
|
||||
dx = bb.x - bbt.x,
|
||||
dy = bb.y - bbt.y;
|
||||
o.coordorigin = (dx * -zoom) + S + (dy * -zoom);
|
||||
setCoords(this, 1, 1, dx, dy, 0);
|
||||
} else {
|
||||
o.style.filter = E;
|
||||
setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);
|
||||
}
|
||||
} else {
|
||||
o.style.filter = E;
|
||||
skew.matrix = Str(matrix);
|
||||
skew.offset = matrix.offset();
|
||||
}
|
||||
oldt && (this._.transform = oldt);
|
||||
return this;
|
||||
};
|
||||
elproto.rotate = function (deg, cx, cy) {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
if (deg == null) {
|
||||
return;
|
||||
}
|
||||
deg = Str(deg).split(separator);
|
||||
if (deg.length - 1) {
|
||||
cx = toFloat(deg[1]);
|
||||
cy = toFloat(deg[2]);
|
||||
}
|
||||
deg = toFloat(deg[0]);
|
||||
(cy == null) && (cx = cy);
|
||||
if (cx == null || cy == null) {
|
||||
var bbox = this.getBBox(1);
|
||||
cx = bbox.x + bbox.width / 2;
|
||||
cy = bbox.y + bbox.height / 2;
|
||||
}
|
||||
this._.dirtyT = 1;
|
||||
this.transform(this._.transform.concat([["r", deg, cx, cy]]));
|
||||
return this;
|
||||
};
|
||||
elproto.translate = function (dx, dy) {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
dx = Str(dx).split(separator);
|
||||
if (dx.length - 1) {
|
||||
dy = toFloat(dx[1]);
|
||||
}
|
||||
dx = toFloat(dx[0]) || 0;
|
||||
dy = +dy || 0;
|
||||
if (this._.bbox) {
|
||||
this._.bbox.x += dx;
|
||||
this._.bbox.y += dy;
|
||||
}
|
||||
this.transform(this._.transform.concat([["t", dx, dy]]));
|
||||
return this;
|
||||
};
|
||||
elproto.scale = function (sx, sy, cx, cy) {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
sx = Str(sx).split(separator);
|
||||
if (sx.length - 1) {
|
||||
sy = toFloat(sx[1]);
|
||||
cx = toFloat(sx[2]);
|
||||
cy = toFloat(sx[3]);
|
||||
isNaN(cx) && (cx = null);
|
||||
isNaN(cy) && (cy = null);
|
||||
}
|
||||
sx = toFloat(sx[0]);
|
||||
(sy == null) && (sy = sx);
|
||||
(cy == null) && (cx = cy);
|
||||
if (cx == null || cy == null) {
|
||||
var bbox = this.getBBox(1);
|
||||
}
|
||||
cx = cx == null ? bbox.x + bbox.width / 2 : cx;
|
||||
cy = cy == null ? bbox.y + bbox.height / 2 : cy;
|
||||
|
||||
this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));
|
||||
this._.dirtyT = 1;
|
||||
return this;
|
||||
};
|
||||
elproto.hide = function () {
|
||||
!this.removed && (this.node.style.display = "none");
|
||||
return this;
|
||||
};
|
||||
elproto.show = function () {
|
||||
!this.removed && (this.node.style.display = E);
|
||||
return this;
|
||||
};
|
||||
elproto._getBBox = function () {
|
||||
if (this.removed) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
x: this.X + (this.bbx || 0) - this.W / 2,
|
||||
y: this.Y - this.H,
|
||||
width: this.W,
|
||||
height: this.H
|
||||
};
|
||||
};
|
||||
elproto.remove = function () {
|
||||
if (this.removed || !this.node.parentNode) {
|
||||
return;
|
||||
}
|
||||
this.paper.__set__ && this.paper.__set__.exclude(this);
|
||||
R.eve.unbind("raphael.*.*." + this.id);
|
||||
R._tear(this, this.paper);
|
||||
this.node.parentNode.removeChild(this.node);
|
||||
this.shape && this.shape.parentNode.removeChild(this.shape);
|
||||
for (var i in this) {
|
||||
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
|
||||
}
|
||||
this.removed = true;
|
||||
};
|
||||
elproto.attr = function (name, value) {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
if (name == null) {
|
||||
var res = {};
|
||||
for (var a in this.attrs) if (this.attrs[has](a)) {
|
||||
res[a] = this.attrs[a];
|
||||
}
|
||||
res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
|
||||
res.transform = this._.transform;
|
||||
return res;
|
||||
}
|
||||
if (value == null && R.is(name, "string")) {
|
||||
if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) {
|
||||
return this.attrs.gradient;
|
||||
}
|
||||
var names = name.split(separator),
|
||||
out = {};
|
||||
for (var i = 0, ii = names.length; i < ii; i++) {
|
||||
name = names[i];
|
||||
if (name in this.attrs) {
|
||||
out[name] = this.attrs[name];
|
||||
} else if (R.is(this.paper.customAttributes[name], "function")) {
|
||||
out[name] = this.paper.customAttributes[name].def;
|
||||
} else {
|
||||
out[name] = R._availableAttrs[name];
|
||||
}
|
||||
}
|
||||
return ii - 1 ? out : out[names[0]];
|
||||
}
|
||||
if (this.attrs && value == null && R.is(name, "array")) {
|
||||
out = {};
|
||||
for (i = 0, ii = name.length; i < ii; i++) {
|
||||
out[name[i]] = this.attr(name[i]);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
var params;
|
||||
if (value != null) {
|
||||
params = {};
|
||||
params[name] = value;
|
||||
}
|
||||
value == null && R.is(name, "object") && (params = name);
|
||||
for (var key in params) {
|
||||
eve("raphael.attr." + key + "." + this.id, this, params[key]);
|
||||
}
|
||||
if (params) {
|
||||
for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
|
||||
var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
|
||||
this.attrs[key] = params[key];
|
||||
for (var subkey in par) if (par[has](subkey)) {
|
||||
params[subkey] = par[subkey];
|
||||
}
|
||||
}
|
||||
// this.paper.canvas.style.display = "none";
|
||||
if (params.text && this.type == "text") {
|
||||
this.textpath.string = params.text;
|
||||
}
|
||||
setFillAndStroke(this, params);
|
||||
// this.paper.canvas.style.display = E;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
elproto.toFront = function () {
|
||||
!this.removed && this.node.parentNode.appendChild(this.node);
|
||||
this.paper && this.paper.top != this && R._tofront(this, this.paper);
|
||||
return this;
|
||||
};
|
||||
elproto.toBack = function () {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
if (this.node.parentNode.firstChild != this.node) {
|
||||
this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);
|
||||
R._toback(this, this.paper);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
elproto.insertAfter = function (element) {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
if (element.constructor == R.st.constructor) {
|
||||
element = element[element.length - 1];
|
||||
}
|
||||
if (element.node.nextSibling) {
|
||||
element.node.parentNode.insertBefore(this.node, element.node.nextSibling);
|
||||
} else {
|
||||
element.node.parentNode.appendChild(this.node);
|
||||
}
|
||||
R._insertafter(this, element, this.paper);
|
||||
return this;
|
||||
};
|
||||
elproto.insertBefore = function (element) {
|
||||
if (this.removed) {
|
||||
return this;
|
||||
}
|
||||
if (element.constructor == R.st.constructor) {
|
||||
element = element[0];
|
||||
}
|
||||
element.node.parentNode.insertBefore(this.node, element.node);
|
||||
R._insertbefore(this, element, this.paper);
|
||||
return this;
|
||||
};
|
||||
elproto.blur = function (size) {
|
||||
var s = this.node.runtimeStyle,
|
||||
f = s.filter;
|
||||
f = f.replace(blurregexp, E);
|
||||
if (+size !== 0) {
|
||||
this.attrs.blur = size;
|
||||
s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")";
|
||||
s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5));
|
||||
} else {
|
||||
s.filter = f;
|
||||
s.margin = 0;
|
||||
delete this.attrs.blur;
|
||||
}
|
||||
};
|
||||
|
||||
R._engine.path = function (pathString, vml) {
|
||||
var el = createNode("shape");
|
||||
el.style.cssText = cssDot;
|
||||
el.coordsize = zoom + S + zoom;
|
||||
el.coordorigin = vml.coordorigin;
|
||||
var p = new Element(el, vml),
|
||||
attr = {fill: "none", stroke: "#000"};
|
||||
pathString && (attr.path = pathString);
|
||||
p.type = "path";
|
||||
p.path = [];
|
||||
p.Path = E;
|
||||
setFillAndStroke(p, attr);
|
||||
vml.canvas.appendChild(el);
|
||||
var skew = createNode("skew");
|
||||
skew.on = true;
|
||||
el.appendChild(skew);
|
||||
p.skew = skew;
|
||||
p.transform(E);
|
||||
return p;
|
||||
};
|
||||
R._engine.rect = function (vml, x, y, w, h, r) {
|
||||
var path = R._rectPath(x, y, w, h, r),
|
||||
res = vml.path(path),
|
||||
a = res.attrs;
|
||||
res.X = a.x = x;
|
||||
res.Y = a.y = y;
|
||||
res.W = a.width = w;
|
||||
res.H = a.height = h;
|
||||
a.r = r;
|
||||
a.path = path;
|
||||
res.type = "rect";
|
||||
return res;
|
||||
};
|
||||
R._engine.ellipse = function (vml, x, y, rx, ry) {
|
||||
var res = vml.path(),
|
||||
a = res.attrs;
|
||||
res.X = x - rx;
|
||||
res.Y = y - ry;
|
||||
res.W = rx * 2;
|
||||
res.H = ry * 2;
|
||||
res.type = "ellipse";
|
||||
setFillAndStroke(res, {
|
||||
cx: x,
|
||||
cy: y,
|
||||
rx: rx,
|
||||
ry: ry
|
||||
});
|
||||
return res;
|
||||
};
|
||||
R._engine.circle = function (vml, x, y, r) {
|
||||
var res = vml.path(),
|
||||
a = res.attrs;
|
||||
res.X = x - r;
|
||||
res.Y = y - r;
|
||||
res.W = res.H = r * 2;
|
||||
res.type = "circle";
|
||||
setFillAndStroke(res, {
|
||||
cx: x,
|
||||
cy: y,
|
||||
r: r
|
||||
});
|
||||
return res;
|
||||
};
|
||||
R._engine.image = function (vml, src, x, y, w, h) {
|
||||
var path = R._rectPath(x, y, w, h),
|
||||
res = vml.path(path).attr({stroke: "none"}),
|
||||
a = res.attrs,
|
||||
node = res.node,
|
||||
fill = node.getElementsByTagName(fillString)[0];
|
||||
a.src = src;
|
||||
res.X = a.x = x;
|
||||
res.Y = a.y = y;
|
||||
res.W = a.width = w;
|
||||
res.H = a.height = h;
|
||||
a.path = path;
|
||||
res.type = "image";
|
||||
fill.parentNode == node && node.removeChild(fill);
|
||||
fill.rotate = true;
|
||||
fill.src = src;
|
||||
fill.type = "tile";
|
||||
res._.fillpos = [x, y];
|
||||
res._.fillsize = [w, h];
|
||||
node.appendChild(fill);
|
||||
setCoords(res, 1, 1, 0, 0, 0);
|
||||
return res;
|
||||
};
|
||||
R._engine.text = function (vml, x, y, text) {
|
||||
var el = createNode("shape"),
|
||||
path = createNode("path"),
|
||||
o = createNode("textpath");
|
||||
x = x || 0;
|
||||
y = y || 0;
|
||||
text = text || "";
|
||||
path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1);
|
||||
path.textpathok = true;
|
||||
o.string = Str(text);
|
||||
o.on = true;
|
||||
el.style.cssText = cssDot;
|
||||
el.coordsize = zoom + S + zoom;
|
||||
el.coordorigin = "0 0";
|
||||
var p = new Element(el, vml),
|
||||
attr = {
|
||||
fill: "#000",
|
||||
stroke: "none",
|
||||
font: R._availableAttrs.font,
|
||||
text: text
|
||||
};
|
||||
p.shape = el;
|
||||
p.path = path;
|
||||
p.textpath = o;
|
||||
p.type = "text";
|
||||
p.attrs.text = Str(text);
|
||||
p.attrs.x = x;
|
||||
p.attrs.y = y;
|
||||
p.attrs.w = 1;
|
||||
p.attrs.h = 1;
|
||||
setFillAndStroke(p, attr);
|
||||
el.appendChild(o);
|
||||
el.appendChild(path);
|
||||
vml.canvas.appendChild(el);
|
||||
var skew = createNode("skew");
|
||||
skew.on = true;
|
||||
el.appendChild(skew);
|
||||
p.skew = skew;
|
||||
p.transform(E);
|
||||
return p;
|
||||
};
|
||||
R._engine.setSize = function (width, height) {
|
||||
var cs = this.canvas.style;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
width == +width && (width += "px");
|
||||
height == +height && (height += "px");
|
||||
cs.width = width;
|
||||
cs.height = height;
|
||||
cs.clip = "rect(0 " + width + " " + height + " 0)";
|
||||
if (this._viewBox) {
|
||||
R._engine.setViewBox.apply(this, this._viewBox);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
R._engine.setViewBox = function (x, y, w, h, fit) {
|
||||
R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
|
||||
var width = this.width,
|
||||
height = this.height,
|
||||
size = 1 / mmax(w / width, h / height),
|
||||
H, W;
|
||||
if (fit) {
|
||||
H = height / h;
|
||||
W = width / w;
|
||||
if (w * H < width) {
|
||||
x -= (width - w * H) / 2 / H;
|
||||
}
|
||||
if (h * W < height) {
|
||||
y -= (height - h * W) / 2 / W;
|
||||
}
|
||||
}
|
||||
this._viewBox = [x, y, w, h, !!fit];
|
||||
this._viewBoxShift = {
|
||||
dx: -x,
|
||||
dy: -y,
|
||||
scale: size
|
||||
};
|
||||
this.forEach(function (el) {
|
||||
el.transform("...");
|
||||
});
|
||||
return this;
|
||||
};
|
||||
var createNode;
|
||||
R._engine.initWin = function (win) {
|
||||
var doc = win.document;
|
||||
doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
|
||||
try {
|
||||
!doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
|
||||
createNode = function (tagName) {
|
||||
return doc.createElement('<rvml:' + tagName + ' class="rvml">');
|
||||
};
|
||||
} catch (e) {
|
||||
createNode = function (tagName) {
|
||||
return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
|
||||
};
|
||||
}
|
||||
};
|
||||
R._engine.initWin(R._g.win);
|
||||
R._engine.create = function () {
|
||||
var con = R._getContainer.apply(0, arguments),
|
||||
container = con.container,
|
||||
height = con.height,
|
||||
s,
|
||||
width = con.width,
|
||||
x = con.x,
|
||||
y = con.y;
|
||||
if (!container) {
|
||||
throw new Error("VML container not found.");
|
||||
}
|
||||
var res = new R._Paper,
|
||||
c = res.canvas = R._g.doc.createElement("div"),
|
||||
cs = c.style;
|
||||
x = x || 0;
|
||||
y = y || 0;
|
||||
width = width || 512;
|
||||
height = height || 342;
|
||||
res.width = width;
|
||||
res.height = height;
|
||||
width == +width && (width += "px");
|
||||
height == +height && (height += "px");
|
||||
res.coordsize = zoom * 1e3 + S + zoom * 1e3;
|
||||
res.coordorigin = "0 0";
|
||||
res.span = R._g.doc.createElement("span");
|
||||
res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";
|
||||
c.appendChild(res.span);
|
||||
cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height);
|
||||
if (container == 1) {
|
||||
R._g.doc.body.appendChild(c);
|
||||
cs.left = x + "px";
|
||||
cs.top = y + "px";
|
||||
cs.position = "absolute";
|
||||
} else {
|
||||
if (container.firstChild) {
|
||||
container.insertBefore(c, container.firstChild);
|
||||
} else {
|
||||
container.appendChild(c);
|
||||
}
|
||||
}
|
||||
res.renderfix = function () {};
|
||||
return res;
|
||||
};
|
||||
R.prototype.clear = function () {
|
||||
R.eve("raphael.clear", this);
|
||||
this.canvas.innerHTML = E;
|
||||
this.span = R._g.doc.createElement("span");
|
||||
this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";
|
||||
this.canvas.appendChild(this.span);
|
||||
this.bottom = this.top = null;
|
||||
};
|
||||
R.prototype.remove = function () {
|
||||
R.eve("raphael.remove", this);
|
||||
this.canvas.parentNode.removeChild(this.canvas);
|
||||
for (var i in this) {
|
||||
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var setproto = R.st;
|
||||
for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
|
||||
setproto[method] = (function (methodname) {
|
||||
return function () {
|
||||
var arg = arguments;
|
||||
return this.forEach(function (el) {
|
||||
el[methodname].apply(el, arg);
|
||||
});
|
||||
};
|
||||
})(method);
|
||||
}
|
||||
return R;
|
||||
});
|
6
public/js/vendor/respond.min.js
vendored
Normal file
6
public/js/vendor/respond.min.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
|
||||
|
||||
/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||
(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this);
|
Loading…
x
Reference in New Issue
Block a user