atlas_assets 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile +15 -0
  3. data/Gemfile.lock +86 -0
  4. data/LICENSE +22 -0
  5. data/Procfile +1 -0
  6. data/README.md +36 -0
  7. data/Rakefile +16 -0
  8. data/_config.yml +13 -0
  9. data/atlas_assets.gemspec +21 -0
  10. data/config.ru +9 -0
  11. data/docs/.gitignore +1 -0
  12. data/docs/404.html +1 -0
  13. data/docs/_layouts/default.html +56 -0
  14. data/docs/_plugins/jekyll_assets.rb +3 -0
  15. data/docs/_posts/2013-05-17-buttons.md +43 -0
  16. data/docs/_posts/2013-05-17-flash.md +58 -0
  17. data/docs/_posts/2013-05-17-fonts.md +26 -0
  18. data/docs/_posts/2013-05-17-grid.md +60 -0
  19. data/docs/_posts/2013-05-17-helpers.md +9 -0
  20. data/docs/_posts/2013-05-17-icons.md +1089 -0
  21. data/docs/_posts/2013-05-17-lists.md +76 -0
  22. data/docs/_posts/2013-05-17-navbar.md +73 -0
  23. data/docs/_posts/2013-05-21-forms.md +423 -0
  24. data/docs/index.html +31 -0
  25. data/lib/assets/fonts/atlas.eot +0 -0
  26. data/lib/assets/fonts/atlas.svg +279 -0
  27. data/lib/assets/fonts/atlas.ttf +0 -0
  28. data/lib/assets/fonts/atlas.woff +0 -0
  29. data/lib/assets/javascripts/atlas_assets.js +9 -0
  30. data/lib/assets/javascripts/backbone.js +1572 -0
  31. data/lib/assets/javascripts/jquery.js +9405 -0
  32. data/lib/assets/javascripts/jquery_ujs.js +378 -0
  33. data/lib/assets/javascripts/keypress.js +20 -0
  34. data/lib/assets/javascripts/pusher.js +101 -0
  35. data/lib/assets/javascripts/setup.js +35 -0
  36. data/lib/assets/javascripts/string.js +912 -0
  37. data/lib/assets/javascripts/underscore.js +1228 -0
  38. data/lib/assets/stylesheets/atlas_assets.css +10 -0
  39. data/lib/assets/stylesheets/buttons.css.scss +56 -0
  40. data/lib/assets/stylesheets/flash.css.scss +32 -0
  41. data/lib/assets/stylesheets/fonts.css.scss +66 -0
  42. data/lib/assets/stylesheets/forms.css.scss +861 -0
  43. data/lib/assets/stylesheets/grid.css.scss +762 -0
  44. data/lib/assets/stylesheets/helpers.css.scss +55 -0
  45. data/lib/assets/stylesheets/icons.css.scss +823 -0
  46. data/lib/assets/stylesheets/lists.css.scss +73 -0
  47. data/lib/assets/stylesheets/navbar.css.scss +121 -0
  48. data/lib/assets/stylesheets/pre.css.scss +7 -0
  49. data/lib/atlas_assets/engine.rb +8 -0
  50. data/lib/atlas_assets/version.rb +5 -0
  51. data/lib/atlas_assets.rb +1 -0
  52. data/rails/init.rb +1 -0
  53. metadata +114 -0
@@ -0,0 +1,912 @@
1
+
2
+ /*
3
+ string.js - Copyright (C) 2012-2013, JP Richardson <jprichardson@gmail.com>
4
+ */
5
+
6
+ !(function() {
7
+ "use strict";
8
+
9
+ var VERSION = '1.3.0';
10
+
11
+ var ENTITIES = {};
12
+
13
+ function S(s) {
14
+ if (s !== null && s !== undefined) {
15
+ if (typeof s === 'string')
16
+ this.s = s;
17
+ else
18
+ this.s = s.toString();
19
+ } else {
20
+ this.s = s; //null or undefined
21
+ }
22
+
23
+ this.orig = s; //original object, currently only used by toCSV() and toBoolean()
24
+
25
+ if (s !== null && s !== undefined) {
26
+ if (this.__defineGetter__) {
27
+ this.__defineGetter__('length', function() {
28
+ return this.s.length;
29
+ })
30
+ } else {
31
+ this.length = s.length;
32
+ }
33
+ } else {
34
+ this.length = -1;
35
+ }
36
+ }
37
+
38
+ var __nsp = String.prototype;
39
+ var __sp = S.prototype = {
40
+
41
+ between: function(left, right) {
42
+ var s = this.s;
43
+ var startPos = s.indexOf(left);
44
+ var endPos = s.indexOf(right);
45
+ var start = startPos + left.length;
46
+ return new S(endPos > startPos ? s.slice(start, endPos) : "");
47
+ },
48
+
49
+ //# modified slightly from https://github.com/epeli/underscore.string
50
+ camelize: function() {
51
+ var s = this.trim().s.replace(/(\-|_|\s)+(.)?/g, function(mathc, sep, c) {
52
+ return (c ? c.toUpperCase() : '');
53
+ });
54
+ return new S(s);
55
+ },
56
+
57
+ capitalize: function() {
58
+ return new S(this.s.substr(0, 1).toUpperCase() + this.s.substring(1).toLowerCase());
59
+ },
60
+
61
+ charAt: function(index) {
62
+ return this.s.charAt(index);
63
+ },
64
+
65
+ chompLeft: function(prefix) {
66
+ var s = this.s;
67
+ if (s.indexOf(prefix) === 0) {
68
+ s = s.slice(prefix.length);
69
+ return new S(s);
70
+ } else {
71
+ return this;
72
+ }
73
+ },
74
+
75
+ chompRight: function(suffix) {
76
+ if (this.endsWith(suffix)) {
77
+ var s = this.s;
78
+ s = s.slice(0, s.length - suffix.length);
79
+ return new S(s);
80
+ } else {
81
+ return this;
82
+ }
83
+ },
84
+
85
+ //#thanks Google
86
+ collapseWhitespace: function() {
87
+ var s = this.s.replace(/[\s\xa0]+/g, ' ').replace(/^\s+|\s+$/g, '');
88
+ return new S(s);
89
+ },
90
+
91
+ contains: function(ss) {
92
+ return this.s.indexOf(ss) >= 0;
93
+ },
94
+
95
+ //#modified from https://github.com/epeli/underscore.string
96
+ dasherize: function() {
97
+ var s = this.trim().s.replace(/[_\s]+/g, '-').replace(/([A-Z])/g, '-$1').replace(/-+/g, '-').toLowerCase();
98
+ return new S(s);
99
+ },
100
+
101
+ decodeHtmlEntities: function() { //https://github.com/substack/node-ent/blob/master/index.js
102
+ var s = this.s;
103
+ s = s.replace(/&#(\d+);?/g, function (_, code) {
104
+ return String.fromCharCode(code);
105
+ })
106
+ .replace(/&#[xX]([A-Fa-f0-9]+);?/g, function (_, hex) {
107
+ return String.fromCharCode(parseInt(hex, 16));
108
+ })
109
+ .replace(/&([^;\W]+;?)/g, function (m, e) {
110
+ var ee = e.replace(/;$/, '');
111
+ var target = ENTITIES[e] || (e.match(/;$/) && ENTITIES[ee]);
112
+
113
+ if (typeof target === 'number') {
114
+ return String.fromCharCode(target);
115
+ }
116
+ else if (typeof target === 'string') {
117
+ return target;
118
+ }
119
+ else {
120
+ return m;
121
+ }
122
+ })
123
+
124
+ return new S(s);
125
+ },
126
+
127
+ endsWith: function(suffix) {
128
+ var l = this.s.length - suffix.length;
129
+ return l >= 0 && this.s.indexOf(suffix, l) === l;
130
+ },
131
+
132
+ escapeHTML: function() { //from underscore.string
133
+ return new S(this.s.replace(/[&<>"']/g, function(m){ return '&' + reversedEscapeChars[m] + ';'; }));
134
+ },
135
+
136
+ ensureLeft: function(prefix) {
137
+ var s = this.s;
138
+ if (s.indexOf(prefix) === 0) {
139
+ return this;
140
+ } else {
141
+ return new S(prefix + s);
142
+ }
143
+ },
144
+
145
+ ensureRight: function(suffix) {
146
+ var s = this.s;
147
+ if (this.endsWith(suffix)) {
148
+ return this;
149
+ } else {
150
+ return new S(s + suffix);
151
+ }
152
+ },
153
+
154
+ isAlpha: function() {
155
+ return !/[^a-z\xC0-\xFF]/.test(this.s.toLowerCase());
156
+ },
157
+
158
+ isAlphaNumeric: function() {
159
+ return !/[^0-9a-z\xC0-\xFF]/.test(this.s.toLowerCase());
160
+ },
161
+
162
+ isEmpty: function() {
163
+ return this.s === null || this.s === undefined ? true : /^[\s\xa0]*$/.test(this.s);
164
+ },
165
+
166
+ isLower: function() {
167
+ return this.isAlpha() && this.s.toLowerCase() === this.s;
168
+ },
169
+
170
+ isNumeric: function() {
171
+ return !/[^0-9]/.test(this.s);
172
+ },
173
+
174
+ isUpper: function() {
175
+ return this.isAlpha() && this.s.toUpperCase() === this.s;
176
+ },
177
+
178
+ left: function(N) {
179
+ if (N >= 0) {
180
+ var s = this.s.substr(0, N);
181
+ return new S(s);
182
+ } else {
183
+ return this.right(-N);
184
+ }
185
+ },
186
+
187
+ lines: function() {
188
+ var lines = this.s.split('\n')
189
+ for (var i = 0; i < lines.length; ++i) {
190
+ lines[i] = lines[i].replace(/(^\s*|\s*$)/g, '');
191
+ }
192
+ return lines;
193
+ },
194
+
195
+ pad: function(len, ch) { //https://github.com/component/pad
196
+ ch = ch || ' ';
197
+ if (this.s.length >= len) return new S(this.s);
198
+ len = len - this.s.length;
199
+ var left = Array(Math.ceil(len / 2) + 1).join(ch);
200
+ var right = Array(Math.floor(len / 2) + 1).join(ch);
201
+ return new S(left + this.s + right);
202
+ },
203
+
204
+ padLeft: function(len, ch) { //https://github.com/component/pad
205
+ ch = ch || ' ';
206
+ if (this.s.length >= len) return new S(this.s);
207
+ return new S(Array(len - this.s.length + 1).join(ch) + this.s);
208
+ },
209
+
210
+ padRight: function(len, ch) { //https://github.com/component/pad
211
+ ch = ch || ' ';
212
+ if (this.s.length >= len) return new S(this.s);
213
+ return new S(this.s + Array(len - this.s.length + 1).join(ch));
214
+ },
215
+
216
+ parseCSV: function(delimiter, qualifier, escape) { //try to parse no matter what
217
+ delimiter = delimiter || ',';
218
+ escape = escape || '\\'
219
+ if (typeof qualifier == 'undefined')
220
+ qualifier = '"';
221
+
222
+ var i = 0, fieldBuffer = [], fields = [], len = this.s.length, inField = false, self = this;
223
+ var ca = function(i){return self.s.charAt(i)};
224
+
225
+ if (!qualifier)
226
+ inField = true;
227
+
228
+ while (i < len) {
229
+ var current = ca(i);
230
+ switch (current) {
231
+ case qualifier:
232
+ if (!inField) {
233
+ inField = true;
234
+ } else {
235
+ if (ca(i-1) === escape)
236
+ fieldBuffer.push(current);
237
+ else
238
+ inField = false;
239
+ }
240
+ break;
241
+ case delimiter:
242
+ if (inField && qualifier)
243
+ fieldBuffer.push(current);
244
+ else {
245
+ fields.push(fieldBuffer.join(''))
246
+ fieldBuffer.length = 0;
247
+ }
248
+ break;
249
+ case escape:
250
+ if (qualifier)
251
+ if (ca(i+1) !== qualifier)
252
+ fieldBuffer.push(current);
253
+ break;
254
+ default:
255
+ if (inField)
256
+ fieldBuffer.push(current);
257
+ break;
258
+ }
259
+ i += 1;
260
+ }
261
+
262
+ fields.push(fieldBuffer.join(''))
263
+ return fields;
264
+ },
265
+
266
+ replaceAll: function(ss, r) {
267
+ //var s = this.s.replace(new RegExp(ss, 'g'), r);
268
+ var s = this.s.split(ss).join(r)
269
+ return new S(s);
270
+ },
271
+
272
+ right: function(N) {
273
+ if (N >= 0) {
274
+ var s = this.s.substr(this.s.length - N, N);
275
+ return new S(s);
276
+ } else {
277
+ return this.left(-N);
278
+ }
279
+ },
280
+
281
+ slugify: function() {
282
+ var sl = (new S(this.s.replace(/[^\w\s-]/g, '').toLowerCase())).dasherize().s;
283
+ if (sl.charAt(0) === '-')
284
+ sl = sl.substr(1);
285
+ return new S(sl);
286
+ },
287
+
288
+ startsWith: function(prefix) {
289
+ return this.s.lastIndexOf(prefix, 0) === 0;
290
+ },
291
+
292
+ stripPunctuation: function() {
293
+ //return new S(this.s.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""));
294
+ return new S(this.s.replace(/[^\w\s]|_/g, "").replace(/\s+/g, " "));
295
+ },
296
+
297
+ stripTags: function() { //from sugar.js
298
+ var s = this.s, args = arguments.length > 0 ? arguments : [''];
299
+ multiArgs(args, function(tag) {
300
+ s = s.replace(RegExp('<\/?' + tag + '[^<>]*>', 'gi'), '');
301
+ });
302
+ return new S(s);
303
+ },
304
+
305
+ template: function(values, opening, closing) {
306
+ var s = this.s
307
+ var opening = opening || Export.TMPL_OPEN
308
+ var closing = closing || Export.TMPL_CLOSE
309
+ var r = new RegExp(opening + '(.+?)' + closing, 'g')
310
+ //, r = /\{\{(.+?)\}\}/g
311
+ var matches = s.match(r) || [];
312
+
313
+ matches.forEach(function(match) {
314
+ var key = match.substring(opening.length, match.length - closing.length);//chop {{ and }}
315
+ if (values[key])
316
+ s = s.replace(match, values[key]);
317
+ });
318
+ return new S(s);
319
+ },
320
+
321
+ times: function(n) {
322
+ return new S(new Array(n + 1).join(this.s));
323
+ },
324
+
325
+ toBoolean: function() {
326
+ if (typeof this.orig === 'string') {
327
+ var s = this.s.toLowerCase();
328
+ return s === 'true' || s === 'yes' || s === 'on';
329
+ } else
330
+ return this.orig === true || this.orig === 1;
331
+ },
332
+
333
+ toFloat: function(precision) {
334
+ var num = parseFloat(this.s, 10);
335
+ if (precision)
336
+ return parseFloat(num.toFixed(precision));
337
+ else
338
+ return num;
339
+ },
340
+
341
+ toInt: function() { //thanks Google
342
+ // If the string starts with '0x' or '-0x', parse as hex.
343
+ return /^\s*-?0x/i.test(this.s) ? parseInt(this.s, 16) : parseInt(this.s, 10);
344
+ },
345
+
346
+ trim: function() {
347
+ var s;
348
+ if (typeof String.prototype.trim === 'undefined') {
349
+ s = this.s.replace(/(^\s*|\s*$)/g, '');
350
+ } else {
351
+ s = this.s.trim();
352
+ }
353
+ return new S(s);
354
+ },
355
+
356
+ trimLeft: function() {
357
+ var s;
358
+ if (__nsp.trimLeft)
359
+ s = this.s.trimLeft();
360
+ else
361
+ s = this.s.replace(/(^\s*)/g, '');
362
+ return new S(s);
363
+ },
364
+
365
+ trimRight: function() {
366
+ var s;
367
+ if (__nsp.trimRight)
368
+ s = this.s.trimRight();
369
+ else
370
+ s = this.s.replace(/\s+$/, '');
371
+ return new S(s);
372
+ },
373
+
374
+ truncate: function(length, pruneStr) { //from underscore.string, author: github.com/rwz
375
+ var str = this.s;
376
+
377
+ length = ~~length;
378
+ pruneStr = pruneStr || '...';
379
+
380
+ if (str.length <= length) return new S(str);
381
+
382
+ var tmpl = function(c){ return c.toUpperCase() !== c.toLowerCase() ? 'A' : ' '; },
383
+ template = str.slice(0, length+1).replace(/.(?=\W*\w*$)/g, tmpl); // 'Hello, world' -> 'HellAA AAAAA'
384
+
385
+ if (template.slice(template.length-2).match(/\w\w/))
386
+ template = template.replace(/\s*\S+$/, '');
387
+ else
388
+ template = new S(template.slice(0, template.length-1)).trimRight().s;
389
+
390
+ return (template+pruneStr).length > str.length ? new S(str) : new S(str.slice(0, template.length)+pruneStr);
391
+ },
392
+
393
+ toCSV: function() {
394
+ var delim = ',', qualifier = '"', escapeChar = '\\', encloseNumbers = true, keys = false;
395
+ var dataArray = [];
396
+
397
+ function hasVal(it) {
398
+ return it !== null && it !== '';
399
+ }
400
+
401
+ if (typeof arguments[0] === 'object') {
402
+ delim = arguments[0].delimiter || delim;
403
+ delim = arguments[0].separator || delim;
404
+ qualifier = arguments[0].qualifier || qualifier;
405
+ encloseNumbers = !!arguments[0].encloseNumbers;
406
+ escapeChar = arguments[0].escapeChar || escapeChar;
407
+ keys = !!arguments[0].keys;
408
+ } else if (typeof arguments[0] === 'string') {
409
+ delim = arguments[0];
410
+ }
411
+
412
+ if (typeof arguments[1] === 'string')
413
+ qualifier = arguments[1];
414
+
415
+ if (arguments[1] === null)
416
+ qualifier = null;
417
+
418
+ if (this.orig instanceof Array)
419
+ dataArray = this.orig;
420
+ else { //object
421
+ for (var key in this.orig)
422
+ if (this.orig.hasOwnProperty(key))
423
+ if (keys)
424
+ dataArray.push(key);
425
+ else
426
+ dataArray.push(this.orig[key]);
427
+ }
428
+
429
+ var rep = escapeChar + qualifier;
430
+ var buildString = [];
431
+ for (var i = 0; i < dataArray.length; ++i) {
432
+ var shouldQualify = hasVal(qualifier)
433
+ if (typeof dataArray[i] == 'number')
434
+ shouldQualify &= encloseNumbers;
435
+
436
+ if (shouldQualify)
437
+ buildString.push(qualifier);
438
+
439
+ if (dataArray[i] !== null) {
440
+ var d = new S(dataArray[i]).replaceAll(qualifier, rep).s;
441
+ buildString.push(d);
442
+ } else
443
+ buildString.push('')
444
+
445
+ if (shouldQualify)
446
+ buildString.push(qualifier);
447
+
448
+ if (delim)
449
+ buildString.push(delim);
450
+ }
451
+
452
+ //chop last delim
453
+ //console.log(buildString.length)
454
+ buildString.length = buildString.length - 1;
455
+ return new S(buildString.join(''));
456
+ },
457
+
458
+ toString: function() {
459
+ return this.s;
460
+ },
461
+
462
+ //#modified from https://github.com/epeli/underscore.string
463
+ underscore: function() {
464
+ var s = this.trim().s.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase();
465
+ if ((new S(this.s.charAt(0))).isUpper()) {
466
+ s = '_' + s;
467
+ }
468
+ return new S(s);
469
+ },
470
+
471
+ unescapeHTML: function() { //from underscore.string
472
+ return new S(this.s.replace(/\&([^;]+);/g, function(entity, entityCode){
473
+ var match;
474
+
475
+ if (entityCode in escapeChars) {
476
+ return escapeChars[entityCode];
477
+ } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) {
478
+ return String.fromCharCode(parseInt(match[1], 16));
479
+ } else if (match = entityCode.match(/^#(\d+)$/)) {
480
+ return String.fromCharCode(~~match[1]);
481
+ } else {
482
+ return entity;
483
+ }
484
+ }));
485
+ },
486
+
487
+ valueOf: function() {
488
+ return this.s.valueOf();
489
+ }
490
+
491
+ }
492
+
493
+ var methodsAdded = [];
494
+ function extendPrototype() {
495
+ for (var name in __sp) {
496
+ (function(name){
497
+ var func = __sp[name];
498
+ if (!__nsp.hasOwnProperty(name)) {
499
+ methodsAdded.push(name);
500
+ __nsp[name] = function() {
501
+ String.prototype.s = this;
502
+ return func.apply(this, arguments);
503
+ }
504
+ }
505
+ })(name);
506
+ }
507
+ }
508
+
509
+ function restorePrototype() {
510
+ for (var i = 0; i < methodsAdded.length; ++i)
511
+ delete String.prototype[methodsAdded[i]];
512
+ methodsAdded.length = 0;
513
+ }
514
+
515
+
516
+ /*************************************
517
+ /* Attach Native JavaScript String Properties
518
+ /*************************************/
519
+
520
+ var nativeProperties = getNativeStringProperties();
521
+ for (var name in nativeProperties) {
522
+ (function(name) {
523
+ var stringProp = __nsp[name];
524
+ if (typeof stringProp == 'function') {
525
+ //console.log(stringProp)
526
+ if (!__sp[name]) {
527
+ if (nativeProperties[name] === 'string') {
528
+ __sp[name] = function() {
529
+ //console.log(name)
530
+ return new S(stringProp.apply(this, arguments));
531
+ }
532
+ } else {
533
+ __sp[name] = stringProp;
534
+ }
535
+ }
536
+ }
537
+ })(name);
538
+ }
539
+
540
+
541
+ /*************************************
542
+ /* Function Aliases
543
+ /*************************************/
544
+
545
+ __sp.repeat = __sp.times;
546
+ __sp.include = __sp.contains;
547
+ __sp.toInteger = __sp.toInt;
548
+ __sp.toBool = __sp.toBoolean;
549
+ __sp.decodeHTMLEntities = __sp.decodeHtmlEntities //ensure consistent casing scheme of 'HTML'
550
+
551
+
552
+ /*************************************
553
+ /* Private Functions
554
+ /*************************************/
555
+
556
+ function getNativeStringProperties() {
557
+ var names = getNativeStringPropertyNames();
558
+ var retObj = {};
559
+
560
+ for (var i = 0; i < names.length; ++i) {
561
+ var name = names[i];
562
+ var func = __nsp[name];
563
+ try {
564
+ var type = typeof func.apply('teststring', []);
565
+ retObj[name] = type;
566
+ } catch (e) {}
567
+ }
568
+ return retObj;
569
+ }
570
+
571
+ function getNativeStringPropertyNames() {
572
+ var results = [];
573
+ if (Object.getOwnPropertyNames) {
574
+ results = Object.getOwnPropertyNames(__nsp);
575
+ results.splice(results.indexOf('valueOf'), 1);
576
+ results.splice(results.indexOf('toString'), 1);
577
+ return results;
578
+ } else { //meant for legacy cruft, this could probably be made more efficient
579
+ var stringNames = {};
580
+ var objectNames = [];
581
+ for (var name in String.prototype)
582
+ stringNames[name] = name;
583
+
584
+ for (var name in Object.prototype)
585
+ delete stringNames[name];
586
+
587
+ //stringNames['toString'] = 'toString'; //this was deleted with the rest of the object names
588
+ for (var name in stringNames) {
589
+ results.push(name);
590
+ }
591
+ return results;
592
+ }
593
+ }
594
+
595
+ function Export(str) {
596
+ return new S(str);
597
+ };
598
+
599
+ //attach exports to StringJSWrapper
600
+ Export.extendPrototype = extendPrototype;
601
+ Export.restorePrototype = restorePrototype;
602
+ Export.VERSION = VERSION;
603
+ Export.TMPL_OPEN = '{{';
604
+ Export.TMPL_CLOSE = '}}';
605
+ Export.ENTITIES = ENTITIES;
606
+
607
+
608
+
609
+ /*************************************
610
+ /* Exports
611
+ /*************************************/
612
+
613
+ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
614
+ module.exports = Export;
615
+
616
+ } else {
617
+
618
+ if(typeof define === "function" && define.amd) {
619
+ define([], function() {
620
+ return Export;
621
+ });
622
+ } else {
623
+ window.S = Export;
624
+ }
625
+ }
626
+
627
+
628
+ /*************************************
629
+ /* 3rd Party Private Functions
630
+ /*************************************/
631
+
632
+ //from sugar.js
633
+ function multiArgs(args, fn) {
634
+ var result = [], i;
635
+ for(i = 0; i < args.length; i++) {
636
+ result.push(args[i]);
637
+ if(fn) fn.call(args, args[i], i);
638
+ }
639
+ return result;
640
+ }
641
+
642
+ //from underscore.string
643
+ var escapeChars = {
644
+ lt: '<',
645
+ gt: '>',
646
+ quot: '"',
647
+ apos: "'",
648
+ amp: '&'
649
+ };
650
+
651
+ //from underscore.string
652
+ var reversedEscapeChars = {};
653
+ for(var key in escapeChars){ reversedEscapeChars[escapeChars[key]] = key; }
654
+
655
+ ENTITIES = {
656
+ "amp" : "&",
657
+ "gt" : ">",
658
+ "lt" : "<",
659
+ "quot" : "\"",
660
+ "apos" : "'",
661
+ "AElig" : 198,
662
+ "Aacute" : 193,
663
+ "Acirc" : 194,
664
+ "Agrave" : 192,
665
+ "Aring" : 197,
666
+ "Atilde" : 195,
667
+ "Auml" : 196,
668
+ "Ccedil" : 199,
669
+ "ETH" : 208,
670
+ "Eacute" : 201,
671
+ "Ecirc" : 202,
672
+ "Egrave" : 200,
673
+ "Euml" : 203,
674
+ "Iacute" : 205,
675
+ "Icirc" : 206,
676
+ "Igrave" : 204,
677
+ "Iuml" : 207,
678
+ "Ntilde" : 209,
679
+ "Oacute" : 211,
680
+ "Ocirc" : 212,
681
+ "Ograve" : 210,
682
+ "Oslash" : 216,
683
+ "Otilde" : 213,
684
+ "Ouml" : 214,
685
+ "THORN" : 222,
686
+ "Uacute" : 218,
687
+ "Ucirc" : 219,
688
+ "Ugrave" : 217,
689
+ "Uuml" : 220,
690
+ "Yacute" : 221,
691
+ "aacute" : 225,
692
+ "acirc" : 226,
693
+ "aelig" : 230,
694
+ "agrave" : 224,
695
+ "aring" : 229,
696
+ "atilde" : 227,
697
+ "auml" : 228,
698
+ "ccedil" : 231,
699
+ "eacute" : 233,
700
+ "ecirc" : 234,
701
+ "egrave" : 232,
702
+ "eth" : 240,
703
+ "euml" : 235,
704
+ "iacute" : 237,
705
+ "icirc" : 238,
706
+ "igrave" : 236,
707
+ "iuml" : 239,
708
+ "ntilde" : 241,
709
+ "oacute" : 243,
710
+ "ocirc" : 244,
711
+ "ograve" : 242,
712
+ "oslash" : 248,
713
+ "otilde" : 245,
714
+ "ouml" : 246,
715
+ "szlig" : 223,
716
+ "thorn" : 254,
717
+ "uacute" : 250,
718
+ "ucirc" : 251,
719
+ "ugrave" : 249,
720
+ "uuml" : 252,
721
+ "yacute" : 253,
722
+ "yuml" : 255,
723
+ "copy" : 169,
724
+ "reg" : 174,
725
+ "nbsp" : 160,
726
+ "iexcl" : 161,
727
+ "cent" : 162,
728
+ "pound" : 163,
729
+ "curren" : 164,
730
+ "yen" : 165,
731
+ "brvbar" : 166,
732
+ "sect" : 167,
733
+ "uml" : 168,
734
+ "ordf" : 170,
735
+ "laquo" : 171,
736
+ "not" : 172,
737
+ "shy" : 173,
738
+ "macr" : 175,
739
+ "deg" : 176,
740
+ "plusmn" : 177,
741
+ "sup1" : 185,
742
+ "sup2" : 178,
743
+ "sup3" : 179,
744
+ "acute" : 180,
745
+ "micro" : 181,
746
+ "para" : 182,
747
+ "middot" : 183,
748
+ "cedil" : 184,
749
+ "ordm" : 186,
750
+ "raquo" : 187,
751
+ "frac14" : 188,
752
+ "frac12" : 189,
753
+ "frac34" : 190,
754
+ "iquest" : 191,
755
+ "times" : 215,
756
+ "divide" : 247,
757
+ "OElig;" : 338,
758
+ "oelig;" : 339,
759
+ "Scaron;" : 352,
760
+ "scaron;" : 353,
761
+ "Yuml;" : 376,
762
+ "fnof;" : 402,
763
+ "circ;" : 710,
764
+ "tilde;" : 732,
765
+ "Alpha;" : 913,
766
+ "Beta;" : 914,
767
+ "Gamma;" : 915,
768
+ "Delta;" : 916,
769
+ "Epsilon;" : 917,
770
+ "Zeta;" : 918,
771
+ "Eta;" : 919,
772
+ "Theta;" : 920,
773
+ "Iota;" : 921,
774
+ "Kappa;" : 922,
775
+ "Lambda;" : 923,
776
+ "Mu;" : 924,
777
+ "Nu;" : 925,
778
+ "Xi;" : 926,
779
+ "Omicron;" : 927,
780
+ "Pi;" : 928,
781
+ "Rho;" : 929,
782
+ "Sigma;" : 931,
783
+ "Tau;" : 932,
784
+ "Upsilon;" : 933,
785
+ "Phi;" : 934,
786
+ "Chi;" : 935,
787
+ "Psi;" : 936,
788
+ "Omega;" : 937,
789
+ "alpha;" : 945,
790
+ "beta;" : 946,
791
+ "gamma;" : 947,
792
+ "delta;" : 948,
793
+ "epsilon;" : 949,
794
+ "zeta;" : 950,
795
+ "eta;" : 951,
796
+ "theta;" : 952,
797
+ "iota;" : 953,
798
+ "kappa;" : 954,
799
+ "lambda;" : 955,
800
+ "mu;" : 956,
801
+ "nu;" : 957,
802
+ "xi;" : 958,
803
+ "omicron;" : 959,
804
+ "pi;" : 960,
805
+ "rho;" : 961,
806
+ "sigmaf;" : 962,
807
+ "sigma;" : 963,
808
+ "tau;" : 964,
809
+ "upsilon;" : 965,
810
+ "phi;" : 966,
811
+ "chi;" : 967,
812
+ "psi;" : 968,
813
+ "omega;" : 969,
814
+ "thetasym;" : 977,
815
+ "upsih;" : 978,
816
+ "piv;" : 982,
817
+ "ensp;" : 8194,
818
+ "emsp;" : 8195,
819
+ "thinsp;" : 8201,
820
+ "zwnj;" : 8204,
821
+ "zwj;" : 8205,
822
+ "lrm;" : 8206,
823
+ "rlm;" : 8207,
824
+ "ndash;" : 8211,
825
+ "mdash;" : 8212,
826
+ "lsquo;" : 8216,
827
+ "rsquo;" : 8217,
828
+ "sbquo;" : 8218,
829
+ "ldquo;" : 8220,
830
+ "rdquo;" : 8221,
831
+ "bdquo;" : 8222,
832
+ "dagger;" : 8224,
833
+ "Dagger;" : 8225,
834
+ "bull;" : 8226,
835
+ "hellip;" : 8230,
836
+ "permil;" : 8240,
837
+ "prime;" : 8242,
838
+ "Prime;" : 8243,
839
+ "lsaquo;" : 8249,
840
+ "rsaquo;" : 8250,
841
+ "oline;" : 8254,
842
+ "frasl;" : 8260,
843
+ "euro;" : 8364,
844
+ "image;" : 8465,
845
+ "weierp;" : 8472,
846
+ "real;" : 8476,
847
+ "trade;" : 8482,
848
+ "alefsym;" : 8501,
849
+ "larr;" : 8592,
850
+ "uarr;" : 8593,
851
+ "rarr;" : 8594,
852
+ "darr;" : 8595,
853
+ "harr;" : 8596,
854
+ "crarr;" : 8629,
855
+ "lArr;" : 8656,
856
+ "uArr;" : 8657,
857
+ "rArr;" : 8658,
858
+ "dArr;" : 8659,
859
+ "hArr;" : 8660,
860
+ "forall;" : 8704,
861
+ "part;" : 8706,
862
+ "exist;" : 8707,
863
+ "empty;" : 8709,
864
+ "nabla;" : 8711,
865
+ "isin;" : 8712,
866
+ "notin;" : 8713,
867
+ "ni;" : 8715,
868
+ "prod;" : 8719,
869
+ "sum;" : 8721,
870
+ "minus;" : 8722,
871
+ "lowast;" : 8727,
872
+ "radic;" : 8730,
873
+ "prop;" : 8733,
874
+ "infin;" : 8734,
875
+ "ang;" : 8736,
876
+ "and;" : 8743,
877
+ "or;" : 8744,
878
+ "cap;" : 8745,
879
+ "cup;" : 8746,
880
+ "int;" : 8747,
881
+ "there4;" : 8756,
882
+ "sim;" : 8764,
883
+ "cong;" : 8773,
884
+ "asymp;" : 8776,
885
+ "ne;" : 8800,
886
+ "equiv;" : 8801,
887
+ "le;" : 8804,
888
+ "ge;" : 8805,
889
+ "sub;" : 8834,
890
+ "sup;" : 8835,
891
+ "nsub;" : 8836,
892
+ "sube;" : 8838,
893
+ "supe;" : 8839,
894
+ "oplus;" : 8853,
895
+ "otimes;" : 8855,
896
+ "perp;" : 8869,
897
+ "sdot;" : 8901,
898
+ "lceil;" : 8968,
899
+ "rceil;" : 8969,
900
+ "lfloor;" : 8970,
901
+ "rfloor;" : 8971,
902
+ "lang;" : 9001,
903
+ "rang;" : 9002,
904
+ "loz;" : 9674,
905
+ "spades;" : 9824,
906
+ "clubs;" : 9827,
907
+ "hearts;" : 9829,
908
+ "diams;" : 9830
909
+ }
910
+
911
+
912
+ }).call(this);