all da files
This commit is contained in:
393
node_modules/tabletop/examples/timeline_setter/timeline_setter.css
generated
vendored
Executable file
393
node_modules/tabletop/examples/timeline_setter/timeline_setter.css
generated
vendored
Executable file
@@ -0,0 +1,393 @@
|
||||
.timeline_setter {
|
||||
width:85%;
|
||||
margin:0 auto;
|
||||
padding:10px;
|
||||
position:relative;
|
||||
height:100%;
|
||||
background-color:white;
|
||||
}
|
||||
.TS-item {
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
border:1px solid #EBEBEB;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
padding:10px;
|
||||
background:#F7F7F7;
|
||||
color:#333;
|
||||
min-width: 150px;
|
||||
}
|
||||
.TS-item_user_html {
|
||||
padding-bottom:5px;
|
||||
}
|
||||
.TS-item_label {
|
||||
font-family:Georgia,"Times New Roman",Times,serif;
|
||||
font-size:12px;
|
||||
line-height:16px;
|
||||
height:85%;
|
||||
display:block;
|
||||
}
|
||||
.TS-item_year {
|
||||
font-family:"Helvetica Neue",Helvetica,arial,sans-serif;
|
||||
font-weight:bold;
|
||||
font-size:16px;
|
||||
padding-top:10px;
|
||||
float:left;
|
||||
clear:left;
|
||||
display:block;
|
||||
width:150px;
|
||||
}
|
||||
.TS-item_year_text {
|
||||
float:left;
|
||||
}
|
||||
.TS-css_arrow {
|
||||
border-style: solid;
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
position:relative;
|
||||
top: 2px;
|
||||
border-width: 10px 10px 10px 10px;
|
||||
}
|
||||
.TS-css_arrow_up {
|
||||
border-color: transparent transparent #7C93AF transparent;
|
||||
}
|
||||
.TS-read_btn {
|
||||
-webkit-box-shadow: #CECECE 0px 0px 2px;
|
||||
-moz-box-shadow: #CECECE 0px 0px 2px;
|
||||
box-shadow: #CECECE 0px 0px 2px;
|
||||
-webkit-user-select: none;
|
||||
background: #E9F0F8;
|
||||
border-bottom-left-radius: 4px 4px;
|
||||
border-bottom-right-radius: 4px 4px;
|
||||
border-top-left-radius: 4px 4px;
|
||||
border-top-right-radius: 4px 4px;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin-top:8px;
|
||||
font-size:11px;
|
||||
font-family:"Helvetica Neue",arial,sans-serif;
|
||||
text-transform:uppercase;
|
||||
font-weight:normal;
|
||||
text-align:center;
|
||||
display:block;
|
||||
}
|
||||
.TS-read_btn:hover {
|
||||
color:black;cursor:pointer;text-decoration:none;background:#cecece;
|
||||
}
|
||||
.timeline_setter a {
|
||||
text-decoration:none;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.TS-top_matter_container {
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
overflow:visible;
|
||||
}
|
||||
.TS-notchbar_container {
|
||||
border:1px solid #cecece;
|
||||
-webkit-box-shadow: #CECECE 0px 0px 2px;
|
||||
-moz-box-shadow: #CECECE 0px 0px 2px;
|
||||
box-shadow: #CECECE 0px 0px 2px;
|
||||
background:#f7f7f7;
|
||||
width:100%;
|
||||
height:20px;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
clear:left;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
cursor: col-resize;
|
||||
}
|
||||
.TS-card_scroller {
|
||||
width:100%;
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
height:800px; /* FIX THIS!!! */
|
||||
}
|
||||
.TS-card_scroller_inner {
|
||||
width:100%;
|
||||
position:relative;
|
||||
}
|
||||
.TS-notchbar {
|
||||
height:20px;
|
||||
position:relative;
|
||||
width:100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.TS-notchbar_draggable {
|
||||
cursor: col-resize;
|
||||
}
|
||||
.TS-notch, .TS-year_notch {
|
||||
height:100%;
|
||||
position:absolute;
|
||||
color:#999;
|
||||
}
|
||||
.TS-year_notch {
|
||||
border-left: 1px solid #999;
|
||||
}
|
||||
.TS-year_notch_year_text {
|
||||
display:block;
|
||||
/*
|
||||
Arial actually looks better than Helvetica at
|
||||
small sizes. See Comment 6 here:
|
||||
http://www.subtraction.com/2007/11/01/the-elements#7497
|
||||
*/
|
||||
font-family:Arial,sans-serif;
|
||||
font-size:9px;
|
||||
padding:2px 0 0 5px;
|
||||
}
|
||||
.TS-year_notch:hover {
|
||||
}
|
||||
.TS-notch{
|
||||
width:4px;
|
||||
cursor:pointer;
|
||||
}
|
||||
.TS-card_container {
|
||||
position:absolute;
|
||||
margin-left:-5px;
|
||||
z-index: 9999;
|
||||
}
|
||||
.TS-controls {
|
||||
margin: 0 0 0 0;
|
||||
float:right;
|
||||
height:2%;
|
||||
overflow:visible;
|
||||
text-align: right;
|
||||
width: 220px;
|
||||
}
|
||||
.TS-controls a {
|
||||
border:1px solid #cecece;
|
||||
background-color:#f0f0f0;
|
||||
padding:3px 5px 3px 5px;
|
||||
color:#999;
|
||||
font-family:"Helvetica Neue",Arial,sans-serif;
|
||||
font-weight:normal;
|
||||
height: 14px;
|
||||
font-size:14px;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
display: inline;
|
||||
}
|
||||
.TS-choose_next {
|
||||
margin-left:4px;
|
||||
}
|
||||
.TS-controls_inner_text {
|
||||
font-size:11px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.TS-controls a.TS-controls_disabled {
|
||||
color:#cecece;
|
||||
background-color:#f7f7f7;
|
||||
cursor:default;
|
||||
}
|
||||
.TS-controls a:hover {
|
||||
background-color:#fff;
|
||||
}
|
||||
.TS-notch_active {
|
||||
-webkit-box-shadow: 0px 0px 10px #333;
|
||||
-moz-box-shadow: 0px 0px 10px #333;
|
||||
box-shadow: 0px 0px 10px #333;
|
||||
|
||||
/* let's throw IE7 users a bone */
|
||||
*border: 1px solid #333;
|
||||
}
|
||||
.TS-zoom {
|
||||
background-repeat:no-repeat;
|
||||
background-position:center center;
|
||||
width:20px !important;
|
||||
padding:3px 8px 3px 8px !important;
|
||||
margin-right:4px;
|
||||
}
|
||||
.TS-zoom_inner_text {
|
||||
display:none;
|
||||
/* IE7 */
|
||||
*display:inline;
|
||||
}
|
||||
.TS-zoom_in {
|
||||
background-image:url("data:image/gif;charset=utf-8;base64,R0lGODlhCgAKALMAADMzM//M/5GRkdXV1fDw8GZmZk1NTf////r6+gAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAAEALAAAAAAKAAoAAAQpMMhJpyiihjLIKJTQGV4mFYShEqAkHIiBHKYEHHhhVAWgY5qToFZRRQAAOw==");
|
||||
}
|
||||
.TS-zoom_out {
|
||||
background-image:url("data:image/gif;charset=utf-8;base64,R0lGODlhCgAKALMAADMzM//M/5GRkdXV1fDw8GZmZk1NTf////r6+gAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAAEALAAAAAAKAAoAAAQoMMhJpyiihjLIKJTQEV4mFYShEqAkHAh8mBJw3IVRFUCOaScBraKKAAA7");
|
||||
}
|
||||
|
||||
/* legend */
|
||||
|
||||
.TS-series_nav_container {
|
||||
font-family:Arial,sans-serif;
|
||||
font-size:11px;
|
||||
height:30px;
|
||||
margin-left:-10px;
|
||||
}
|
||||
.TS-series_legend_swatch {
|
||||
background-image:url("data:image/gif;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIBJREFUeNrskksKwCAMBev9byS4UfEOoh7AA4hu9JUG2kVb+8FVoYFsQmbghTAA00ix7wumRfC0nXPYz97Ca70ThBA20hhzL7DWIsZIi957AmutB7gryDkTlFLaYKUUznZPBUIIlFIIbq1BSolevG5uzjnF0Frj6j7sf+VxwSzAAG/ifZQMhRJhAAAAAElFTkSuQmCC");
|
||||
background-repeat:no-repeat;
|
||||
background-position:center center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
float: left;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
border-top-left-radius: 2px 2px;
|
||||
border-top-right-radius: 2px 2px;
|
||||
border-bottom-right-radius: 2px 2px;
|
||||
border-bottom-left-radius: 2px 2px;
|
||||
margin-right:5px;
|
||||
}
|
||||
.TS-series_legend_item {
|
||||
float:left;
|
||||
margin:-3px 10px 0 10px;
|
||||
cursor:pointer;
|
||||
}
|
||||
.TS-series_legend_item_inactive {}
|
||||
.TS-series_legend_item_inactive .TS-series_legend_swatch {
|
||||
background-image:none !important;
|
||||
filter:alpha(opacity=40); /* IE can't do data URLs, so this will serve as 'inactive' UI for series heds in IE */
|
||||
}
|
||||
.TS-item h2, .TS-img-hed {
|
||||
font-family: 'Helvetica Neue',arial,sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
display:inline-block;
|
||||
margin:0;
|
||||
margin-bottom: 10px;
|
||||
line-height:20px;
|
||||
}
|
||||
.TS-permalink {
|
||||
font-family:"Helvetica Neue",arial,sans-serif;
|
||||
font-size:12px;
|
||||
color:#404040;
|
||||
cursor:pointer;
|
||||
padding:0 0 0 15px;
|
||||
margin-top:-5px;
|
||||
float:left;
|
||||
-webkit-transform:rotate(45deg);
|
||||
-moz-transform:rotate(45deg);
|
||||
}
|
||||
|
||||
/* color priority */
|
||||
/* "#065718", "#EDC047", "#91ADD1", "#929E5E", "#9E5E23", "#C44846", "#465363", "#EDD4A5", "#CECECE" */
|
||||
|
||||
/* default */
|
||||
.TS-notch_color_default,.TS-series_legend_swatch_default {
|
||||
background-color: #444;
|
||||
}
|
||||
.TS-css_arrow_color_default {
|
||||
border-bottom-color:#444;
|
||||
}
|
||||
.TS-item_color_default {
|
||||
border-top:1px solid #444;
|
||||
}
|
||||
|
||||
/* 1 */
|
||||
.TS-notch_color_1,.TS-series_legend_swatch_1 {
|
||||
background-color: #065718 !important;
|
||||
}
|
||||
.TS-css_arrow_color_1 {
|
||||
border-bottom-color:#065718 !important;
|
||||
}
|
||||
.TS-item_color_1 {
|
||||
border-top:1px solid #065718 !important;
|
||||
}
|
||||
|
||||
/* 2 */
|
||||
.TS-notch_color_2,.TS-series_legend_swatch_2 {
|
||||
background-color: #EDC047 !important;
|
||||
}
|
||||
.TS-css_arrow_color_2 {
|
||||
border-bottom-color:#EDC047 !important;
|
||||
}
|
||||
.TS-item_color_2 {
|
||||
border-top:1px solid #EDC047 !important;
|
||||
}
|
||||
|
||||
/* 3 */
|
||||
.TS-notch_color_3,.TS-series_legend_swatch_3 {
|
||||
background-color: #91ADD1 !important;
|
||||
}
|
||||
.TS-css_arrow_color_3 {
|
||||
border-bottom-color:#91ADD1 !important;
|
||||
}
|
||||
.TS-item_color_3 {
|
||||
border-top:1px solid #91ADD1 !important;
|
||||
}
|
||||
|
||||
/* 4 */
|
||||
.TS-notch_color_4,.TS-series_legend_swatch_4 {
|
||||
background-color: #929E5E !important;
|
||||
}
|
||||
.TS-css_arrow_color_4 {
|
||||
border-bottom-color:#929E5E !important;
|
||||
}
|
||||
.TS-item_color_4 {
|
||||
border-top:1px solid #929E5E !important;
|
||||
}
|
||||
|
||||
/* 5 */
|
||||
.TS-notch_color_5,.TS-series_legend_swatch_5 {
|
||||
background-color: #9E5E23 !important;
|
||||
}
|
||||
.TS-css_arrow_color_5 {
|
||||
border-bottom-color:#9E5E23 !important;
|
||||
}
|
||||
.TS-item_color_5 {
|
||||
border-top:1px solid #9E5E23 !important;
|
||||
}
|
||||
|
||||
/* 6 */
|
||||
.TS-notch_color_6,.TS-series_legend_swatch_6 {
|
||||
background-color: #C44846 !important;
|
||||
}
|
||||
.TS-css_arrow_color_6 {
|
||||
border-bottom-color:#C44846 !important;
|
||||
}
|
||||
.TS-item_color_6 {
|
||||
border-top:1px solid #C44846 !important;
|
||||
}
|
||||
|
||||
/* 7 */
|
||||
.TS-notch_color_7,.TS-series_legend_swatch_7 {
|
||||
background-color: #465363 !important;
|
||||
}
|
||||
.TS-css_arrow_color_7 {
|
||||
border-bottom-color:#465363 !important;
|
||||
}
|
||||
.TS-item_color_7 {
|
||||
border-top:1px solid #465363 !important;
|
||||
}
|
||||
|
||||
|
||||
/* 8 */
|
||||
.TS-notch_color_8,.TS-series_legend_swatch_8 {
|
||||
background-color: #EDD4A5 !important;
|
||||
}
|
||||
.TS-css_arrow_color_8 {
|
||||
border-bottom-color:#EDD4A5 !important;
|
||||
}
|
||||
.TS-item_color_8 {
|
||||
border-top:1px solid #EDD4A5 !important;
|
||||
}
|
||||
|
||||
/* 9 */
|
||||
.TS-notch_color_9,.TS-series_legend_swatch_9 {
|
||||
background-color: #CECECE !important;
|
||||
}
|
||||
.TS-css_arrow_color_9 {
|
||||
border-bottom-color:#CECECE !important;
|
||||
}
|
||||
.TS-item_color_9 {
|
||||
border-top:1px solid #CECECE !important;
|
||||
}
|
||||
|
46
node_modules/tabletop/examples/timeline_setter/timeline_setter.html
generated
vendored
Executable file
46
node_modules/tabletop/examples/timeline_setter/timeline_setter.html
generated
vendored
Executable file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href="timeline_setter.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="timeline"></div>
|
||||
|
||||
<!-- Don't need jQuery or Underscore for Tabletop, but you do for TimelineSetter -->
|
||||
<script type="text/javascript" src="../common/jquery.js"></script>
|
||||
<script type="text/javascript" src="underscore.js"></script>
|
||||
<script type="text/javascript" src="timeline_setter.js"></script>
|
||||
<script type="text/javascript" src="../../src/tabletop.js"></script>
|
||||
<script type="text/javascript">
|
||||
var public_spreadsheet_url = "https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AmYzu_s7QHsmdHk2akhfdG5iTk96OUt6UjJJX1dYMFE&single=true&gid=0&output=html"
|
||||
|
||||
$(document).ready( function() {
|
||||
/*
|
||||
Need to post-process elements because Google Spreadsheets abbreviates
|
||||
'display_date' column as 'displaydate' and you need to parse the date
|
||||
into the 'timestamp' field for TimelineSetter
|
||||
simpleSheet: true sends array of rows to callback, so you don't need to
|
||||
do the whole Tabletop.sheets('Sheet1').all() thing.
|
||||
*/
|
||||
Tabletop.init( { key: public_spreadsheet_url,
|
||||
callback: drawTimeline,
|
||||
simpleSheet: true,
|
||||
postProcess: function(element) {
|
||||
element["display_date"] = element["displaydate"];
|
||||
element["timestamp"] = Date.parse( element["date"] );
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function drawTimeline(data) {
|
||||
var currentTimeline = TimelineSetter.Timeline.boot(
|
||||
data,
|
||||
{"container":"#timeline","interval":""}
|
||||
);
|
||||
}
|
||||
|
||||
document.write("The published spreadsheet is located at <a target='_new' href='" + public_spreadsheet_url + "'>" + public_spreadsheet_url + "</a>");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
1
node_modules/tabletop/examples/timeline_setter/timeline_setter.js
generated
vendored
Executable file
1
node_modules/tabletop/examples/timeline_setter/timeline_setter.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
26
node_modules/tabletop/examples/timeline_setter/underscore.js
generated
vendored
Executable file
26
node_modules/tabletop/examples/timeline_setter/underscore.js
generated
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
// Underscore.js 1.1.5
|
||||
// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
|
||||
// Underscore is freely distributable under the MIT license.
|
||||
// Portions of Underscore are inspired or borrowed from Prototype,
|
||||
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
||||
// For all details and documentation:
|
||||
// http://documentcloud.github.com/underscore
|
||||
(function(){var q=this,D=q._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,E=k.unshift,F=o.toString,m=o.hasOwnProperty,s=k.forEach,t=k.map,u=k.reduce,v=k.reduceRight,w=k.filter,x=k.every,y=k.some,p=k.indexOf,z=k.lastIndexOf;o=Array.isArray;var G=Object.keys,A=Function.prototype.bind,c=function(a){return new l(a)};if(typeof module!=="undefined"&&module.exports){module.exports=c;c._=c}else q._=c;c.VERSION="1.1.5";var j=c.each=c.forEach=function(a,b,d){if(a!=null)if(s&&a.forEach===s)a.forEach(b,
|
||||
d);else if(c.isNumber(a.length))for(var e=0,f=a.length;e<f;e++){if(b.call(d,a[e],e,a)===n)break}else for(e in a)if(m.call(a,e))if(b.call(d,a[e],e,a)===n)break};c.map=function(a,b,d){var e=[];if(a==null)return e;if(t&&a.map===t)return a.map(b,d);j(a,function(f,g,h){e[e.length]=b.call(d,f,g,h)});return e};c.reduce=c.foldl=c.inject=function(a,b,d,e){var f=d!==void 0;if(a==null)a=[];if(u&&a.reduce===u){if(e)b=c.bind(b,e);return f?a.reduce(b,d):a.reduce(b)}j(a,function(g,h,H){if(!f&&h===0){d=g;f=true}else d=
|
||||
b.call(e,d,g,h,H)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};c.reduceRight=c.foldr=function(a,b,d,e){if(a==null)a=[];if(v&&a.reduceRight===v){if(e)b=c.bind(b,e);return d!==void 0?a.reduceRight(b,d):a.reduceRight(b)}a=(c.isArray(a)?a.slice():c.toArray(a)).reverse();return c.reduce(a,b,d,e)};c.find=c.detect=function(a,b,d){var e;B(a,function(f,g,h){if(b.call(d,f,g,h)){e=f;return true}});return e};c.filter=c.select=function(a,b,d){var e=[];if(a==null)return e;
|
||||
if(w&&a.filter===w)return a.filter(b,d);j(a,function(f,g,h){if(b.call(d,f,g,h))e[e.length]=f});return e};c.reject=function(a,b,d){var e=[];if(a==null)return e;j(a,function(f,g,h){b.call(d,f,g,h)||(e[e.length]=f)});return e};c.every=c.all=function(a,b,d){b=b||c.identity;var e=true;if(a==null)return e;if(x&&a.every===x)return a.every(b,d);j(a,function(f,g,h){if(!(e=e&&b.call(d,f,g,h)))return n});return e};var B=c.some=c.any=function(a,b,d){b=b||c.identity;var e=false;if(a==null)return e;if(y&&a.some===
|
||||
y)return a.some(b,d);j(a,function(f,g,h){if(e=b.call(d,f,g,h))return n});return e};c.include=c.contains=function(a,b){var d=false;if(a==null)return d;if(p&&a.indexOf===p)return a.indexOf(b)!=-1;B(a,function(e){if(d=e===b)return true});return d};c.invoke=function(a,b){var d=i.call(arguments,2);return c.map(a,function(e){return(b?e[b]:e).apply(e,d)})};c.pluck=function(a,b){return c.map(a,function(d){return d[b]})};c.max=function(a,b,d){if(!b&&c.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};
|
||||
j(a,function(f,g,h){g=b?b.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};c.min=function(a,b,d){if(!b&&c.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};j(a,function(f,g,h){g=b?b.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};c.sortBy=function(a,b,d){return c.pluck(c.map(a,function(e,f,g){return{value:e,criteria:b.call(d,e,f,g)}}).sort(function(e,f){var g=e.criteria,h=f.criteria;return g<h?-1:g>h?1:0}),"value")};c.sortedIndex=
|
||||
function(a,b,d){d=d||c.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(b)?e=g+1:f=g}return e};c.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(c.isArray(a))return a;if(c.isArguments(a))return i.call(a);return c.values(a)};c.size=function(a){return c.toArray(a).length};c.first=c.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};c.rest=c.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};c.last=function(a){return a[a.length-1]};c.compact=function(a){return c.filter(a,
|
||||
function(b){return!!b})};c.flatten=function(a){return c.reduce(a,function(b,d){if(c.isArray(d))return b.concat(c.flatten(d));b[b.length]=d;return b},[])};c.without=function(a){var b=i.call(arguments,1);return c.filter(a,function(d){return!c.include(b,d)})};c.uniq=c.unique=function(a,b){return c.reduce(a,function(d,e,f){if(0==f||(b===true?c.last(d)!=e:!c.include(d,e)))d[d.length]=e;return d},[])};c.intersect=function(a){var b=i.call(arguments,1);return c.filter(c.uniq(a),function(d){return c.every(b,
|
||||
function(e){return c.indexOf(e,d)>=0})})};c.zip=function(){for(var a=i.call(arguments),b=c.max(c.pluck(a,"length")),d=Array(b),e=0;e<b;e++)d[e]=c.pluck(a,""+e);return d};c.indexOf=function(a,b,d){if(a==null)return-1;var e;if(d){d=c.sortedIndex(a,b);return a[d]===b?d:-1}if(p&&a.indexOf===p)return a.indexOf(b);d=0;for(e=a.length;d<e;d++)if(a[d]===b)return d;return-1};c.lastIndexOf=function(a,b){if(a==null)return-1;if(z&&a.lastIndexOf===z)return a.lastIndexOf(b);for(var d=a.length;d--;)if(a[d]===b)return d;
|
||||
return-1};c.range=function(a,b,d){if(arguments.length<=1){b=a||0;a=0}d=arguments[2]||1;for(var e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;){g[f++]=a;a+=d}return g};c.bind=function(a,b){if(A&&a.bind===A)return a.bind.apply(a,i.call(arguments,1));var d=i.call(arguments,2);return function(){return a.apply(b,d.concat(i.call(arguments)))}};c.bindAll=function(a){var b=i.call(arguments,1);if(b.length==0)b=c.functions(a);j(b,function(d){a[d]=c.bind(a[d],a)});return a};c.memoize=function(a,b){var d=
|
||||
{};b=b||c.identity;return function(){var e=b.apply(this,arguments);return m.call(d,e)?d[e]:d[e]=a.apply(this,arguments)}};c.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};c.defer=function(a){return c.delay.apply(c,[a,1].concat(i.call(arguments,1)))};var C=function(a,b,d){var e;return function(){var f=this,g=arguments,h=function(){e=null;a.apply(f,g)};d&&clearTimeout(e);if(d||!e)e=setTimeout(h,b)}};c.throttle=function(a,b){return C(a,b,false)};c.debounce=
|
||||
function(a,b){return C(a,b,true)};c.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};c.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments));return b.apply(this,d)}};c.compose=function(){var a=i.call(arguments);return function(){for(var b=i.call(arguments),d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};c.keys=G||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)if(m.call(a,
|
||||
d))b[b.length]=d;return b};c.values=function(a){return c.map(a,c.identity)};c.functions=c.methods=function(a){return c.filter(c.keys(a),function(b){return c.isFunction(a[b])}).sort()};c.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};c.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)if(a[d]==null)a[d]=b[d]});return a};c.clone=function(a){return c.isArray(a)?a.slice():c.extend({},a)};c.tap=function(a,b){b(a);return a};c.isEqual=function(a,
|
||||
b){if(a===b)return true;var d=typeof a;if(d!=typeof b)return false;if(a==b)return true;if(!a&&b||a&&!b)return false;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual)return a.isEqual(b);if(c.isDate(a)&&c.isDate(b))return a.getTime()===b.getTime();if(c.isNaN(a)&&c.isNaN(b))return false;if(c.isRegExp(a)&&c.isRegExp(b))return a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if(d!=="object")return false;if(a.length&&a.length!==b.length)return false;
|
||||
d=c.keys(a);var e=c.keys(b);if(d.length!=e.length)return false;for(var f in a)if(!(f in b)||!c.isEqual(a[f],b[f]))return false;return true};c.isEmpty=function(a){if(c.isArray(a)||c.isString(a))return a.length===0;for(var b in a)if(m.call(a,b))return false;return true};c.isElement=function(a){return!!(a&&a.nodeType==1)};c.isArray=o||function(a){return F.call(a)==="[object Array]"};c.isArguments=function(a){return!!(a&&m.call(a,"callee"))};c.isFunction=function(a){return!!(a&&a.constructor&&a.call&&
|
||||
a.apply)};c.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};c.isNumber=function(a){return!!(a===0||a&&a.toExponential&&a.toFixed)};c.isNaN=function(a){return a!==a};c.isBoolean=function(a){return a===true||a===false};c.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};c.isRegExp=function(a){return!!(a&&a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};c.isNull=function(a){return a===null};c.isUndefined=function(a){return a===void 0};c.noConflict=function(){q._=
|
||||
D;return this};c.identity=function(a){return a};c.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};c.mixin=function(a){j(c.functions(a),function(b){I(b,c[b]=a[b])})};var J=0;c.uniqueId=function(a){var b=J++;return a?a+b:b};c.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};c.template=function(a,b){var d=c.templateSettings;d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.interpolate,
|
||||
function(e,f){return"',"+f.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||null,function(e,f){return"');"+f.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";d=new Function("obj",d);return b?d(b):d};var l=function(a){this._wrapped=a};c.prototype=l.prototype;var r=function(a,b){return b?c(a).chain():a},I=function(a,b){l.prototype[a]=function(){var d=i.call(arguments);E.call(d,this._wrapped);return r(b.apply(c,
|
||||
d),this._chain)}};c.mixin(c);j(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=k[a];l.prototype[a]=function(){b.apply(this._wrapped,arguments);return r(this._wrapped,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];l.prototype[a]=function(){return r(b.apply(this._wrapped,arguments),this._chain)}});l.prototype.chain=function(){this._chain=true;return this};l.prototype.value=function(){return this._wrapped}})();
|
Reference in New Issue
Block a user