holder_rails 2.6.1 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/holder_rails/version.rb +1 -1
- data/vendor/assets/javascripts/holder.js +582 -250
- data/vendor/assets/javascripts/holder.min.js +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f5c3a770e0c80448742019d0849ea3e7c45950a
|
4
|
+
data.tar.gz: 8a8d4de74ad35c0efaf7b578ed430c93028fecb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b99e07db39f012cd52cfc6ac409d892378bd2f9984eae2a0919c8a05c8aa6986b39010478ae02adb3aced1d4ce511366408ab1e19b298f3a10a117db828937d9
|
7
|
+
data.tar.gz: 0eef472aca3d1f0caeae6d80809d4a24c1b5d1039a8f921a1a84f46496e35bc711fcb54e5a7f3084100bbd273b5065c032ea2d158d8b0a15e93872d199574b01
|
data/lib/holder_rails/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
|
3
3
|
Holder - client side image placeholders
|
4
|
-
Version 2.
|
4
|
+
Version 2.7.0+6h7nj
|
5
5
|
© 2015 Ivan Malopinsky - http://imsky.co
|
6
6
|
|
7
7
|
Site: http://holderjs.com
|
@@ -9,220 +9,225 @@ Issues: https://github.com/imsky/holder/issues
|
|
9
9
|
License: http://opensource.org/licenses/MIT
|
10
10
|
|
11
11
|
*/
|
12
|
-
|
13
|
-
if (!document
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
12
|
+
(function (window) {
|
13
|
+
if (!window.document) return;
|
14
|
+
var document = window.document;
|
15
|
+
|
16
|
+
//https://github.com/inexorabletash/polyfill/blob/master/web.js
|
17
|
+
if (!document.querySelectorAll) {
|
18
|
+
document.querySelectorAll = function (selectors) {
|
19
|
+
var style = document.createElement('style'), elements = [], element;
|
20
|
+
document.documentElement.firstChild.appendChild(style);
|
21
|
+
document._qsa = [];
|
22
|
+
|
23
|
+
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
|
24
|
+
window.scrollBy(0, 0);
|
25
|
+
style.parentNode.removeChild(style);
|
26
|
+
|
27
|
+
while (document._qsa.length) {
|
28
|
+
element = document._qsa.shift();
|
29
|
+
element.style.removeAttribute('x-qsa');
|
30
|
+
elements.push(element);
|
31
|
+
}
|
32
|
+
document._qsa = null;
|
33
|
+
return elements;
|
34
|
+
};
|
35
|
+
}
|
32
36
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
if (!document.querySelector) {
|
38
|
+
document.querySelector = function (selectors) {
|
39
|
+
var elements = document.querySelectorAll(selectors);
|
40
|
+
return (elements.length) ? elements[0] : null;
|
41
|
+
};
|
42
|
+
}
|
43
|
+
|
44
|
+
if (!document.getElementsByClassName) {
|
45
|
+
document.getElementsByClassName = function (classNames) {
|
46
|
+
classNames = String(classNames).replace(/^|\s+/g, '.');
|
47
|
+
return document.querySelectorAll(classNames);
|
48
|
+
};
|
49
|
+
}
|
39
50
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
51
|
+
//https://github.com/inexorabletash/polyfill
|
52
|
+
// ES5 15.2.3.14 Object.keys ( O )
|
53
|
+
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
|
54
|
+
if (!Object.keys) {
|
55
|
+
Object.keys = function (o) {
|
56
|
+
if (o !== Object(o)) { throw TypeError('Object.keys called on non-object'); }
|
57
|
+
var ret = [], p;
|
58
|
+
for (p in o) {
|
59
|
+
if (Object.prototype.hasOwnProperty.call(o, p)) {
|
60
|
+
ret.push(p);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
return ret;
|
44
64
|
};
|
45
65
|
}
|
46
66
|
|
47
|
-
//https://github.com/inexorabletash/polyfill
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
67
|
+
//https://github.com/inexorabletash/polyfill/blob/master/web.js
|
68
|
+
(function (global) {
|
69
|
+
var B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
70
|
+
global.atob = global.atob || function (input) {
|
71
|
+
input = String(input);
|
72
|
+
var position = 0,
|
73
|
+
output = [],
|
74
|
+
buffer = 0, bits = 0, n;
|
75
|
+
|
76
|
+
input = input.replace(/\s/g, '');
|
77
|
+
if ((input.length % 4) === 0) { input = input.replace(/=+$/, ''); }
|
78
|
+
if ((input.length % 4) === 1) { throw Error('InvalidCharacterError'); }
|
79
|
+
if (/[^+/0-9A-Za-z]/.test(input)) { throw Error('InvalidCharacterError'); }
|
80
|
+
|
81
|
+
while (position < input.length) {
|
82
|
+
n = B64_ALPHABET.indexOf(input.charAt(position));
|
83
|
+
buffer = (buffer << 6) | n;
|
84
|
+
bits += 6;
|
85
|
+
|
86
|
+
if (bits === 24) {
|
87
|
+
output.push(String.fromCharCode((buffer >> 16) & 0xFF));
|
88
|
+
output.push(String.fromCharCode((buffer >> 8) & 0xFF));
|
89
|
+
output.push(String.fromCharCode(buffer & 0xFF));
|
90
|
+
bits = 0;
|
91
|
+
buffer = 0;
|
92
|
+
}
|
93
|
+
position += 1;
|
57
94
|
}
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
(
|
65
|
-
var B64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
66
|
-
global.atob = global.atob || function (input) {
|
67
|
-
input = String(input);
|
68
|
-
var position = 0,
|
69
|
-
output = [],
|
70
|
-
buffer = 0, bits = 0, n;
|
71
|
-
|
72
|
-
input = input.replace(/\s/g, '');
|
73
|
-
if ((input.length % 4) === 0) { input = input.replace(/=+$/, ''); }
|
74
|
-
if ((input.length % 4) === 1) { throw Error('InvalidCharacterError'); }
|
75
|
-
if (/[^+/0-9A-Za-z]/.test(input)) { throw Error('InvalidCharacterError'); }
|
76
|
-
|
77
|
-
while (position < input.length) {
|
78
|
-
n = B64_ALPHABET.indexOf(input.charAt(position));
|
79
|
-
buffer = (buffer << 6) | n;
|
80
|
-
bits += 6;
|
81
|
-
|
82
|
-
if (bits === 24) {
|
83
|
-
output.push(String.fromCharCode((buffer >> 16) & 0xFF));
|
84
|
-
output.push(String.fromCharCode((buffer >> 8) & 0xFF));
|
95
|
+
|
96
|
+
if (bits === 12) {
|
97
|
+
buffer = buffer >> 4;
|
98
|
+
output.push(String.fromCharCode(buffer & 0xFF));
|
99
|
+
} else if (bits === 18) {
|
100
|
+
buffer = buffer >> 2;
|
101
|
+
output.push(String.fromCharCode((buffer >> 8) & 0xFF));
|
85
102
|
output.push(String.fromCharCode(buffer & 0xFF));
|
86
|
-
bits = 0;
|
87
|
-
buffer = 0;
|
88
103
|
}
|
89
|
-
position += 1;
|
90
|
-
}
|
91
|
-
|
92
|
-
if (bits === 12) {
|
93
|
-
buffer = buffer >> 4;
|
94
|
-
output.push(String.fromCharCode(buffer & 0xFF));
|
95
|
-
} else if (bits === 18) {
|
96
|
-
buffer = buffer >> 2;
|
97
|
-
output.push(String.fromCharCode((buffer >> 8) & 0xFF));
|
98
|
-
output.push(String.fromCharCode(buffer & 0xFF));
|
99
|
-
}
|
100
|
-
|
101
|
-
return output.join('');
|
102
|
-
};
|
103
|
-
|
104
|
-
global.btoa = global.btoa || function (input) {
|
105
|
-
input = String(input);
|
106
|
-
var position = 0,
|
107
|
-
out = [],
|
108
|
-
o1, o2, o3,
|
109
|
-
e1, e2, e3, e4;
|
110
104
|
|
111
|
-
|
112
|
-
|
113
|
-
while (position < input.length) {
|
114
|
-
o1 = input.charCodeAt(position++);
|
115
|
-
o2 = input.charCodeAt(position++);
|
116
|
-
o3 = input.charCodeAt(position++);
|
117
|
-
|
118
|
-
// 111111 112222 222233 333333
|
119
|
-
e1 = o1 >> 2;
|
120
|
-
e2 = ((o1 & 0x3) << 4) | (o2 >> 4);
|
121
|
-
e3 = ((o2 & 0xf) << 2) | (o3 >> 6);
|
122
|
-
e4 = o3 & 0x3f;
|
105
|
+
return output.join('');
|
106
|
+
};
|
123
107
|
|
124
|
-
|
125
|
-
|
108
|
+
global.btoa = global.btoa || function (input) {
|
109
|
+
input = String(input);
|
110
|
+
var position = 0,
|
111
|
+
out = [],
|
112
|
+
o1, o2, o3,
|
113
|
+
e1, e2, e3, e4;
|
114
|
+
|
115
|
+
if (/[^\x00-\xFF]/.test(input)) { throw Error('InvalidCharacterError'); }
|
116
|
+
|
117
|
+
while (position < input.length) {
|
118
|
+
o1 = input.charCodeAt(position++);
|
119
|
+
o2 = input.charCodeAt(position++);
|
120
|
+
o3 = input.charCodeAt(position++);
|
121
|
+
|
122
|
+
// 111111 112222 222233 333333
|
123
|
+
e1 = o1 >> 2;
|
124
|
+
e2 = ((o1 & 0x3) << 4) | (o2 >> 4);
|
125
|
+
e3 = ((o2 & 0xf) << 2) | (o3 >> 6);
|
126
|
+
e4 = o3 & 0x3f;
|
127
|
+
|
128
|
+
if (position === input.length + 2) {
|
129
|
+
e3 = 64; e4 = 64;
|
130
|
+
}
|
131
|
+
else if (position === input.length + 1) {
|
132
|
+
e4 = 64;
|
133
|
+
}
|
134
|
+
|
135
|
+
out.push(B64_ALPHABET.charAt(e1),
|
136
|
+
B64_ALPHABET.charAt(e2),
|
137
|
+
B64_ALPHABET.charAt(e3),
|
138
|
+
B64_ALPHABET.charAt(e4));
|
126
139
|
}
|
127
|
-
else if (position === input.length + 1) {
|
128
|
-
e4 = 64;
|
129
|
-
}
|
130
|
-
|
131
|
-
out.push(B64_ALPHABET.charAt(e1),
|
132
|
-
B64_ALPHABET.charAt(e2),
|
133
|
-
B64_ALPHABET.charAt(e3),
|
134
|
-
B64_ALPHABET.charAt(e4));
|
135
|
-
}
|
136
140
|
|
137
|
-
|
138
|
-
|
139
|
-
}(
|
140
|
-
|
141
|
-
//https://gist.github.com/jimeh/332357
|
142
|
-
if (!Object.prototype.hasOwnProperty){
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
}
|
150
|
-
|
151
|
-
// @license http://opensource.org/licenses/MIT
|
152
|
-
// copyright Paul Irish 2015
|
141
|
+
return out.join('');
|
142
|
+
};
|
143
|
+
}(window));
|
144
|
+
|
145
|
+
//https://gist.github.com/jimeh/332357
|
146
|
+
if (!Object.prototype.hasOwnProperty){
|
147
|
+
/*jshint -W001, -W103 */
|
148
|
+
Object.prototype.hasOwnProperty = function(prop) {
|
149
|
+
var proto = this.__proto__ || this.constructor.prototype;
|
150
|
+
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
|
151
|
+
};
|
152
|
+
/*jshint +W001, +W103 */
|
153
|
+
}
|
153
154
|
|
155
|
+
// @license http://opensource.org/licenses/MIT
|
156
|
+
// copyright Paul Irish 2015
|
154
157
|
|
155
|
-
// Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
|
156
|
-
// github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
|
157
|
-
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
|
158
158
|
|
159
|
-
//
|
160
|
-
//
|
159
|
+
// Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
|
160
|
+
// github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
|
161
|
+
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
|
161
162
|
|
163
|
+
// if you want values similar to what you'd get with real perf.now, place this towards the head of the page
|
164
|
+
// but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed
|
162
165
|
|
163
|
-
(function(){
|
164
166
|
|
165
|
-
|
166
|
-
window.performance = {};
|
167
|
-
}
|
168
|
-
|
169
|
-
Date.now = (Date.now || function () { // thanks IE8
|
170
|
-
return new Date().getTime();
|
171
|
-
});
|
167
|
+
(function(){
|
172
168
|
|
173
|
-
|
174
|
-
|
175
|
-
var nowOffset = Date.now();
|
176
|
-
|
177
|
-
if (performance.timing && performance.timing.navigationStart){
|
178
|
-
nowOffset = performance.timing.navigationStart;
|
169
|
+
if ('performance' in window === false) {
|
170
|
+
window.performance = {};
|
179
171
|
}
|
172
|
+
|
173
|
+
Date.now = (Date.now || function () { // thanks IE8
|
174
|
+
return new Date().getTime();
|
175
|
+
});
|
176
|
+
|
177
|
+
if ('now' in window.performance === false){
|
178
|
+
|
179
|
+
var nowOffset = Date.now();
|
180
|
+
|
181
|
+
if (performance.timing && performance.timing.navigationStart){
|
182
|
+
nowOffset = performance.timing.navigationStart;
|
183
|
+
}
|
180
184
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
+
window.performance.now = function now(){
|
186
|
+
return Date.now() - nowOffset;
|
187
|
+
};
|
188
|
+
}
|
185
189
|
|
186
|
-
})();
|
187
|
-
|
188
|
-
//requestAnimationFrame polyfill for older Firefox/Chrome versions
|
189
|
-
if (!window.requestAnimationFrame) {
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
190
|
+
})();
|
191
|
+
|
192
|
+
//requestAnimationFrame polyfill for older Firefox/Chrome versions
|
193
|
+
if (!window.requestAnimationFrame) {
|
194
|
+
if (window.webkitRequestAnimationFrame) {
|
195
|
+
//https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-webkit.js
|
196
|
+
(function (global) {
|
197
|
+
// window.requestAnimationFrame
|
198
|
+
global.requestAnimationFrame = function (callback) {
|
199
|
+
return webkitRequestAnimationFrame(function () {
|
200
|
+
callback(global.performance.now());
|
201
|
+
});
|
202
|
+
};
|
203
|
+
|
204
|
+
// window.cancelAnimationFrame
|
205
|
+
global.cancelAnimationFrame = webkitCancelAnimationFrame;
|
206
|
+
}(window));
|
207
|
+
} else if (window.mozRequestAnimationFrame) {
|
208
|
+
//https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/requestAnimationFrame/polyfill-moz.js
|
209
|
+
(function (global) {
|
210
|
+
// window.requestAnimationFrame
|
211
|
+
global.requestAnimationFrame = function (callback) {
|
212
|
+
return mozRequestAnimationFrame(function () {
|
213
|
+
callback(global.performance.now());
|
214
|
+
});
|
215
|
+
};
|
216
|
+
|
217
|
+
// window.cancelAnimationFrame
|
218
|
+
global.cancelAnimationFrame = mozCancelAnimationFrame;
|
219
|
+
}(window));
|
220
|
+
} else {
|
221
|
+
(function (global) {
|
222
|
+
global.requestAnimationFrame = function (callback) {
|
223
|
+
return global.setTimeout(callback, 1000 / 60);
|
224
|
+
};
|
225
|
+
|
226
|
+
global.cancelAnimationFrame = global.clearTimeout;
|
227
|
+
})(window);
|
228
|
+
}
|
224
229
|
}
|
225
|
-
}
|
230
|
+
})(this);
|
226
231
|
|
227
232
|
(function webpackUniversalModuleDefinition(root, factory) {
|
228
233
|
if(typeof exports === 'object' && typeof module === 'object')
|
@@ -289,19 +294,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
289
294
|
var onDomReady = __webpack_require__(1);
|
290
295
|
var SceneGraph = __webpack_require__(2);
|
291
296
|
var utils = __webpack_require__(3);
|
297
|
+
var querystring = __webpack_require__(4);
|
292
298
|
|
293
299
|
var extend = utils.extend;
|
294
|
-
var cssProps = utils.cssProps;
|
295
|
-
var encodeHtmlEntity = utils.encodeHtmlEntity;
|
296
|
-
var decodeHtmlEntity = utils.decodeHtmlEntity;
|
297
|
-
var imageExists = utils.imageExists;
|
298
300
|
var getNodeArray = utils.getNodeArray;
|
299
301
|
var dimensionCheck = utils.dimensionCheck;
|
300
302
|
|
301
303
|
//Constants and definitions
|
302
304
|
var SVG_NS = 'http://www.w3.org/2000/svg';
|
303
305
|
var NODE_TYPE_COMMENT = 8;
|
304
|
-
var version = '2.
|
306
|
+
var version = '2.7.0';
|
305
307
|
var generatorComment = '\n' +
|
306
308
|
'Created with Holder.js ' + version + '.\n' +
|
307
309
|
'Learn more at http://holderjs.com\n' +
|
@@ -481,7 +483,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
481
483
|
} else {
|
482
484
|
//If the placeholder has not been rendered, check if the image exists and render a fallback if it doesn't
|
483
485
|
(function(src, options, engineSettings, dataSrc, image) {
|
484
|
-
imageExists(src, function(exists) {
|
486
|
+
utils.imageExists(src, function(exists) {
|
485
487
|
if (!exists) {
|
486
488
|
prepareImageElement(options, engineSettings, dataSrc, image);
|
487
489
|
}
|
@@ -538,6 +540,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
538
540
|
units: 'pt',
|
539
541
|
scale: 1 / 16
|
540
542
|
},
|
543
|
+
//todo: remove in 2.8
|
541
544
|
flags: {
|
542
545
|
dimensions: {
|
543
546
|
regex: /^(\d+)x(\d+)$/,
|
@@ -624,22 +627,124 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
624
627
|
}
|
625
628
|
|
626
629
|
/**
|
627
|
-
* Processes a Holder URL
|
630
|
+
* Processes a Holder URL
|
628
631
|
*
|
629
632
|
* @private
|
630
633
|
* @param url URL
|
631
634
|
* @param options Instance options from Holder.run
|
632
635
|
*/
|
633
636
|
function parseURL(url, options) {
|
634
|
-
var
|
637
|
+
var holder = {
|
635
638
|
theme: extend(App.settings.themes.gray, null),
|
636
639
|
stylesheets: options.stylesheets,
|
637
|
-
|
640
|
+
instanceOptions: options
|
641
|
+
};
|
642
|
+
|
643
|
+
if (url.match(/([\d]+p?)x([\d]+p?)(?:\?|$)/)) {
|
644
|
+
return parseQueryString(url, holder);
|
645
|
+
} else {
|
646
|
+
return parseFlags(url, holder);
|
647
|
+
}
|
648
|
+
}
|
649
|
+
|
650
|
+
/**
|
651
|
+
* Processes a Holder URL and extracts configuration from query string
|
652
|
+
*
|
653
|
+
* @private
|
654
|
+
* @param url URL
|
655
|
+
* @param holder Staging Holder object
|
656
|
+
*/
|
657
|
+
function parseQueryString(url, holder) {
|
658
|
+
var parts = url.split('?');
|
659
|
+
var basics = parts[0].split('/');
|
660
|
+
|
661
|
+
holder.holderURL = url;
|
662
|
+
|
663
|
+
var dimensions = basics[1];
|
664
|
+
var dimensionData = dimensions.match(/([\d]+p?)x([\d]+p?)/);
|
665
|
+
|
666
|
+
if (!dimensionData) return false;
|
667
|
+
|
668
|
+
holder.fluid = dimensions.indexOf('p') !== -1;
|
669
|
+
|
670
|
+
holder.dimensions = {
|
671
|
+
width: dimensionData[1].replace('p', '%'),
|
672
|
+
height: dimensionData[2].replace('p', '%')
|
638
673
|
};
|
674
|
+
|
675
|
+
if (parts.length === 2) {
|
676
|
+
var options = querystring.parse(parts[1]);
|
677
|
+
|
678
|
+
// Colors
|
679
|
+
|
680
|
+
if (options.bg) {
|
681
|
+
holder.theme.background = (options.bg.indexOf('#') === -1 ? '#' : '') + options.bg;
|
682
|
+
}
|
683
|
+
|
684
|
+
if (options.fg) {
|
685
|
+
holder.theme.foreground = (options.fg.indexOf('#') === -1 ? '#' : '') + options.fg;
|
686
|
+
}
|
687
|
+
|
688
|
+
if (options.theme && holder.instanceOptions.themes.hasOwnProperty(options.theme)) {
|
689
|
+
holder.theme = extend(holder.instanceOptions.themes[options.theme], null);
|
690
|
+
}
|
691
|
+
|
692
|
+
// Text
|
693
|
+
|
694
|
+
if (options.text) {
|
695
|
+
holder.text = options.text;
|
696
|
+
}
|
697
|
+
|
698
|
+
if (options.textmode) {
|
699
|
+
holder.textmode = options.textmode;
|
700
|
+
}
|
701
|
+
|
702
|
+
if (options.size) {
|
703
|
+
holder.size = options.size;
|
704
|
+
}
|
705
|
+
|
706
|
+
if (options.font) {
|
707
|
+
holder.font = options.font;
|
708
|
+
}
|
709
|
+
|
710
|
+
if (options.align) {
|
711
|
+
holder.align = options.align;
|
712
|
+
}
|
713
|
+
|
714
|
+
holder.nowrap = utils.truthy(options.nowrap);
|
715
|
+
|
716
|
+
// Miscellaneous
|
717
|
+
|
718
|
+
holder.auto = utils.truthy(options.auto);
|
719
|
+
|
720
|
+
if (utils.truthy(options.random)) {
|
721
|
+
App.vars.cache.themeKeys = App.vars.cache.themeKeys || Object.keys(holder.instanceOptions.themes);
|
722
|
+
var _theme = App.vars.cache.themeKeys[0 | Math.random() * App.vars.cache.themeKeys.length];
|
723
|
+
holder.theme = extend(holder.instanceOptions.themes[_theme], null);
|
724
|
+
}
|
725
|
+
}
|
726
|
+
|
727
|
+
return holder;
|
728
|
+
}
|
729
|
+
|
730
|
+
//todo: remove in 2.8
|
731
|
+
/**
|
732
|
+
* Processes a Holder URL and extracts flags
|
733
|
+
*
|
734
|
+
* @private
|
735
|
+
* @deprecated
|
736
|
+
* @param url URL
|
737
|
+
* @param holder Staging Holder object
|
738
|
+
*/
|
739
|
+
function parseFlags(url, holder) {
|
639
740
|
var render = false;
|
640
741
|
var vtab = String.fromCharCode(11);
|
641
742
|
var flags = url.replace(/([^\\])\//g, '$1' + vtab).split(vtab);
|
642
743
|
var uriRegex = /%[0-9a-f]{2}/gi;
|
744
|
+
var options = holder.instanceOptions;
|
745
|
+
|
746
|
+
holder.holderURL = [];
|
747
|
+
|
643
748
|
for (var fl = flags.length, j = 0; j < fl; j++) {
|
644
749
|
var flag = flags[j];
|
645
750
|
if (flag.match(uriRegex)) {
|
@@ -654,55 +759,54 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
654
759
|
|
655
760
|
if (App.flags.dimensions.match(flag)) {
|
656
761
|
render = true;
|
657
|
-
|
762
|
+
holder.dimensions = App.flags.dimensions.output(flag);
|
658
763
|
push = true;
|
659
764
|
} else if (App.flags.fluid.match(flag)) {
|
660
765
|
render = true;
|
661
|
-
|
662
|
-
|
766
|
+
holder.dimensions = App.flags.fluid.output(flag);
|
767
|
+
holder.fluid = true;
|
663
768
|
push = true;
|
664
769
|
} else if (App.flags.textmode.match(flag)) {
|
665
|
-
|
770
|
+
holder.textmode = App.flags.textmode.output(flag);
|
666
771
|
push = true;
|
667
772
|
} else if (App.flags.colors.match(flag)) {
|
668
773
|
var colors = App.flags.colors.output(flag);
|
669
|
-
|
670
|
-
//todo: convert implicit theme use to a theme: flag
|
774
|
+
holder.theme = extend(holder.theme, colors);
|
671
775
|
push = true;
|
672
776
|
} else if (options.themes[flag]) {
|
673
777
|
//If a theme is specified, it will override custom colors
|
674
778
|
if (options.themes.hasOwnProperty(flag)) {
|
675
|
-
|
779
|
+
holder.theme = extend(options.themes[flag], null);
|
676
780
|
}
|
677
781
|
push = true;
|
678
782
|
} else if (App.flags.font.match(flag)) {
|
679
|
-
|
783
|
+
holder.font = App.flags.font.output(flag);
|
680
784
|
push = true;
|
681
785
|
} else if (App.flags.auto.match(flag)) {
|
682
|
-
|
786
|
+
holder.auto = true;
|
683
787
|
push = true;
|
684
788
|
} else if (App.flags.text.match(flag)) {
|
685
|
-
|
789
|
+
holder.text = App.flags.text.output(flag);
|
686
790
|
push = true;
|
687
791
|
} else if (App.flags.size.match(flag)) {
|
688
|
-
|
792
|
+
holder.size = App.flags.size.output(flag);
|
689
793
|
push = true;
|
690
794
|
} else if (App.flags.random.match(flag)) {
|
691
795
|
if (App.vars.cache.themeKeys == null) {
|
692
796
|
App.vars.cache.themeKeys = Object.keys(options.themes);
|
693
797
|
}
|
694
798
|
var theme = App.vars.cache.themeKeys[0 | Math.random() * App.vars.cache.themeKeys.length];
|
695
|
-
|
799
|
+
holder.theme = extend(options.themes[theme], null);
|
696
800
|
push = true;
|
697
801
|
}
|
698
802
|
|
699
803
|
if (push) {
|
700
|
-
|
804
|
+
holder.holderURL.push(flag);
|
701
805
|
}
|
702
806
|
}
|
703
|
-
|
704
|
-
|
705
|
-
return render ?
|
807
|
+
holder.holderURL.unshift(options.domain);
|
808
|
+
holder.holderURL = holder.holderURL.join('/');
|
809
|
+
return render ? holder : false;
|
706
810
|
}
|
707
811
|
|
708
812
|
/**
|
@@ -728,7 +832,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
728
832
|
if (el.nodeName.toLowerCase() === 'object') {
|
729
833
|
var textLines = theme.text.split('\\n');
|
730
834
|
for (var k = 0; k < textLines.length; k++) {
|
731
|
-
textLines[k] = encodeHtmlEntity(textLines[k]);
|
835
|
+
textLines[k] = utils.encodeHtmlEntity(textLines[k]);
|
732
836
|
}
|
733
837
|
theme.text = textLines.join('\\n');
|
734
838
|
}
|
@@ -881,6 +985,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
881
985
|
default:
|
882
986
|
throw 'Holder: invalid renderer: ' + engineSettings.renderer;
|
883
987
|
}
|
988
|
+
|
884
989
|
return image;
|
885
990
|
}
|
886
991
|
|
@@ -941,6 +1046,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
941
1046
|
* @private
|
942
1047
|
* @param scene Holder scene object
|
943
1048
|
*/
|
1049
|
+
//todo: make this function reusable
|
1050
|
+
//todo: merge app defaults and setup properties into the scene argument
|
944
1051
|
function buildSceneGraph(scene) {
|
945
1052
|
var fontSize = App.defaults.size;
|
946
1053
|
if (parseFloat(scene.theme.size)) {
|
@@ -955,7 +1062,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
955
1062
|
units: scene.theme.units ? scene.theme.units : App.defaults.units,
|
956
1063
|
weight: scene.theme.fontweight ? scene.theme.fontweight : 'bold'
|
957
1064
|
};
|
958
|
-
|
1065
|
+
|
1066
|
+
scene.text = scene.theme.text || Math.floor(scene.width) + 'x' + Math.floor(scene.height);
|
1067
|
+
|
1068
|
+
scene.noWrap = scene.theme.nowrap || scene.flags.nowrap;
|
1069
|
+
|
1070
|
+
scene.align = scene.theme.align || scene.flags.align || 'center';
|
959
1071
|
|
960
1072
|
switch (scene.flags.textmode) {
|
961
1073
|
case 'literal':
|
@@ -983,7 +1095,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
983
1095
|
|
984
1096
|
var holderTextGroup = new Shape.Group('holderTextGroup', {
|
985
1097
|
text: scene.text,
|
986
|
-
align:
|
1098
|
+
align: scene.align,
|
987
1099
|
font: scene.font,
|
988
1100
|
fill: scene.theme.foreground
|
989
1101
|
});
|
@@ -997,7 +1109,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
997
1109
|
}
|
998
1110
|
holderTextGroup.properties.leading = tpdata.boundingBox.height;
|
999
1111
|
|
1000
|
-
//todo: alignment: TL, TC, TR, CL, CR, BL, BC, BR
|
1001
1112
|
var textNode = null;
|
1002
1113
|
var line = null;
|
1003
1114
|
|
@@ -1006,22 +1117,30 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1006
1117
|
line.height = height;
|
1007
1118
|
parent.width = Math.max(parent.width, line.width);
|
1008
1119
|
parent.height += line.height;
|
1009
|
-
parent.add(line);
|
1010
1120
|
}
|
1011
1121
|
|
1122
|
+
var sceneMargin = scene.width * App.setup.lineWrapRatio;
|
1123
|
+
var maxLineWidth = sceneMargin;
|
1124
|
+
|
1012
1125
|
if (tpdata.lineCount > 1) {
|
1013
1126
|
var offsetX = 0;
|
1014
1127
|
var offsetY = 0;
|
1015
|
-
var maxLineWidth = scene.width * App.setup.lineWrapRatio;
|
1016
1128
|
var lineIndex = 0;
|
1129
|
+
var lineKey;
|
1017
1130
|
line = new Shape.Group('line' + lineIndex);
|
1018
1131
|
|
1132
|
+
//Double margin so that left/right-aligned next is not flush with edge of image
|
1133
|
+
if (scene.align === 'left' || scene.align === 'right') {
|
1134
|
+
maxLineWidth = scene.width * (1 - (1 - (App.setup.lineWrapRatio)) * 2);
|
1135
|
+
}
|
1136
|
+
|
1019
1137
|
for (var i = 0; i < tpdata.words.length; i++) {
|
1020
1138
|
var word = tpdata.words[i];
|
1021
1139
|
textNode = new Shape.Text(word.text);
|
1022
1140
|
var newline = word.text == '\\n';
|
1023
|
-
if (offsetX + word.width >= maxLineWidth || newline === true) {
|
1141
|
+
if (!scene.noWrap && (offsetX + word.width >= maxLineWidth || newline === true)) {
|
1024
1142
|
finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
|
1143
|
+
holderTextGroup.add(line);
|
1025
1144
|
offsetX = 0;
|
1026
1145
|
offsetY += holderTextGroup.properties.leading;
|
1027
1146
|
lineIndex += 1;
|
@@ -1037,18 +1156,27 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1037
1156
|
}
|
1038
1157
|
|
1039
1158
|
finalizeLine(holderTextGroup, line, offsetX, holderTextGroup.properties.leading);
|
1159
|
+
holderTextGroup.add(line);
|
1160
|
+
|
1161
|
+
if (scene.align === 'left') {
|
1162
|
+
holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
|
1163
|
+
} else if (scene.align === 'right') {
|
1164
|
+
for (lineKey in holderTextGroup.children) {
|
1165
|
+
line = holderTextGroup.children[lineKey];
|
1166
|
+
line.moveTo(scene.width - line.width, null, null);
|
1167
|
+
}
|
1040
1168
|
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
null,
|
1046
|
-
|
1169
|
+
holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
|
1170
|
+
} else {
|
1171
|
+
for (lineKey in holderTextGroup.children) {
|
1172
|
+
line = holderTextGroup.children[lineKey];
|
1173
|
+
line.moveTo((holderTextGroup.width - line.width) / 2, null, null);
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
holderTextGroup.moveTo((scene.width - holderTextGroup.width) / 2, null, null);
|
1047
1177
|
}
|
1048
1178
|
|
1049
|
-
holderTextGroup.moveTo(
|
1050
|
-
(scene.width - holderTextGroup.width) / 2, (scene.height - holderTextGroup.height) / 2,
|
1051
|
-
null);
|
1179
|
+
holderTextGroup.moveTo(null, (scene.height - holderTextGroup.height) / 2, null);
|
1052
1180
|
|
1053
1181
|
//If the text exceeds vertical space, move it down so the first line is visible
|
1054
1182
|
if ((scene.height - holderTextGroup.height) / 2 < 0) {
|
@@ -1060,9 +1188,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1060
1188
|
line.add(textNode);
|
1061
1189
|
holderTextGroup.add(line);
|
1062
1190
|
|
1063
|
-
|
1064
|
-
(scene.width -
|
1065
|
-
|
1191
|
+
if (scene.align === 'left') {
|
1192
|
+
holderTextGroup.moveTo(scene.width - sceneMargin, null, null);
|
1193
|
+
} else if (scene.align === 'right') {
|
1194
|
+
holderTextGroup.moveTo(0 - (scene.width - sceneMargin), null, null);
|
1195
|
+
} else {
|
1196
|
+
holderTextGroup.moveTo((scene.width - tpdata.boundingBox.width) / 2, null, null);
|
1197
|
+
}
|
1198
|
+
|
1199
|
+
holderTextGroup.moveTo(null, (scene.height - tpdata.boundingBox.height) / 2, null);
|
1066
1200
|
}
|
1067
1201
|
|
1068
1202
|
//todo: renderlist
|
@@ -1276,7 +1410,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1276
1410
|
var htgProps = holderTextGroup.properties;
|
1277
1411
|
setAttr(stagingText, {
|
1278
1412
|
'y': htgProps.font.size,
|
1279
|
-
'style': cssProps({
|
1413
|
+
'style': utils.cssProps({
|
1280
1414
|
'font-weight': htgProps.font.weight,
|
1281
1415
|
'font-size': htgProps.font.size + htgProps.font.units,
|
1282
1416
|
'font-family': htgProps.font.family
|
@@ -1307,7 +1441,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1307
1441
|
stagingTextNode.nodeValue = '';
|
1308
1442
|
for (var i = 0; i < words.length; i++) {
|
1309
1443
|
if (words[i].length === 0) continue;
|
1310
|
-
stagingTextNode.nodeValue = decodeHtmlEntity(words[i]);
|
1444
|
+
stagingTextNode.nodeValue = utils.decodeHtmlEntity(words[i]);
|
1311
1445
|
var bbox = stagingText.getBBox();
|
1312
1446
|
wordWidths.push({
|
1313
1447
|
text: words[i],
|
@@ -1397,7 +1531,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1397
1531
|
var textGroupEl = newEl('g', SVG_NS);
|
1398
1532
|
var tpdata = textGroup.textPositionData;
|
1399
1533
|
var textCSSRule = '#' + holderId + ' text { ' +
|
1400
|
-
cssProps({
|
1534
|
+
utils.cssProps({
|
1401
1535
|
'fill': tgProps.fill,
|
1402
1536
|
'font-weight': tgProps.font.weight,
|
1403
1537
|
'font-family': tgProps.font.family + ', monospace',
|
@@ -1447,14 +1581,34 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1447
1581
|
}
|
1448
1582
|
}
|
1449
1583
|
|
1450
|
-
|
1451
|
-
|
1584
|
+
//todo: factor the background check up the chain, perhaps only return reference
|
1585
|
+
var svgString = svgStringToDataURI(serializeSVG(svg, renderSettings.engineSettings), renderSettings.mode === 'background');
|
1452
1586
|
return svgString;
|
1453
1587
|
};
|
1454
1588
|
})();
|
1455
1589
|
|
1456
1590
|
//Helpers
|
1457
1591
|
|
1592
|
+
//todo: move svg-related helpers to a dedicated file
|
1593
|
+
|
1594
|
+
/**
|
1595
|
+
* Converts serialized SVG to a string suitable for data URI use
|
1596
|
+
* @param svgString Serialized SVG string
|
1597
|
+
* @param [base64] Use base64 encoding for data URI
|
1598
|
+
*/
|
1599
|
+
var svgStringToDataURI = function() {
|
1600
|
+
var rawPrefix = 'data:image/svg+xml;charset=UTF-8,';
|
1601
|
+
var base64Prefix = 'data:image/svg+xml;charset=UTF-8;base64,';
|
1602
|
+
|
1603
|
+
return function(svgString, base64) {
|
1604
|
+
if (base64) {
|
1605
|
+
return base64Prefix + btoa(unescape(encodeURIComponent(svgString)));
|
1606
|
+
} else {
|
1607
|
+
return rawPrefix + encodeURIComponent(svgString);
|
1608
|
+
}
|
1609
|
+
};
|
1610
|
+
}();
|
1611
|
+
|
1458
1612
|
/**
|
1459
1613
|
* Generic new DOM element function
|
1460
1614
|
*
|
@@ -1556,12 +1710,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1556
1710
|
xml.insertBefore(csspi, xml.firstChild);
|
1557
1711
|
}
|
1558
1712
|
|
1559
|
-
//Add <?xml ... ?> UTF-8 directive
|
1560
|
-
//todo: remove in 2.7
|
1561
|
-
/*
|
1562
|
-
var xmlpi = xml.createProcessingInstruction('xml', 'version="1.0" encoding="UTF-8" standalone="yes"');
|
1563
|
-
xml.insertBefore(xmlpi, xml.firstChild);
|
1564
|
-
*/
|
1565
1713
|
xml.removeChild(xml.documentElement);
|
1566
1714
|
svgCSS = serializer.serializeToString(xml);
|
1567
1715
|
}
|
@@ -1862,7 +2010,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1862
2010
|
/* 2 */
|
1863
2011
|
/***/ function(module, exports, __webpack_require__) {
|
1864
2012
|
|
1865
|
-
var augment = __webpack_require__(
|
2013
|
+
var augment = __webpack_require__(5);
|
1866
2014
|
|
1867
2015
|
var SceneGraph = function(sceneProperties) {
|
1868
2016
|
var nodeCount = 1;
|
@@ -2083,7 +2231,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2083
2231
|
/**
|
2084
2232
|
* Returns an element's dimensions if it's visible, `false` otherwise.
|
2085
2233
|
*
|
2086
|
-
* @private
|
2087
2234
|
* @param el DOM element
|
2088
2235
|
*/
|
2089
2236
|
exports.dimensionCheck = function(el) {
|
@@ -2099,10 +2246,130 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2099
2246
|
}
|
2100
2247
|
};
|
2101
2248
|
|
2249
|
+
|
2250
|
+
/**
|
2251
|
+
* Returns true if value is truthy or if it is "semantically truthy"
|
2252
|
+
* @param val
|
2253
|
+
*/
|
2254
|
+
exports.truthy = function(val) {
|
2255
|
+
if (typeof val === 'string') {
|
2256
|
+
return val === 'true' || val === 'yes' || val === '1' || val === 'on' || val === '✓';
|
2257
|
+
}
|
2258
|
+
return !!val;
|
2259
|
+
};
|
2260
|
+
|
2102
2261
|
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
2103
2262
|
|
2104
2263
|
/***/ },
|
2105
2264
|
/* 4 */
|
2265
|
+
/***/ function(module, exports, __webpack_require__) {
|
2266
|
+
|
2267
|
+
//Modified version of component/querystring
|
2268
|
+
//Changes: updated dependencies, dot notation parsing, JSHint fixes
|
2269
|
+
//Fork at https://github.com/imsky/querystring
|
2270
|
+
|
2271
|
+
/**
|
2272
|
+
* Module dependencies.
|
2273
|
+
*/
|
2274
|
+
|
2275
|
+
var encode = encodeURIComponent;
|
2276
|
+
var decode = decodeURIComponent;
|
2277
|
+
var trim = __webpack_require__(7);
|
2278
|
+
var type = __webpack_require__(6);
|
2279
|
+
|
2280
|
+
var arrayRegex = /(\w+)\[(\d+)\]/;
|
2281
|
+
var objectRegex = /\w+\.\w+/;
|
2282
|
+
|
2283
|
+
/**
|
2284
|
+
* Parse the given query `str`.
|
2285
|
+
*
|
2286
|
+
* @param {String} str
|
2287
|
+
* @return {Object}
|
2288
|
+
* @api public
|
2289
|
+
*/
|
2290
|
+
|
2291
|
+
exports.parse = function(str){
|
2292
|
+
if ('string' !== typeof str) return {};
|
2293
|
+
|
2294
|
+
str = trim(str);
|
2295
|
+
if ('' === str) return {};
|
2296
|
+
if ('?' === str.charAt(0)) str = str.slice(1);
|
2297
|
+
|
2298
|
+
var obj = {};
|
2299
|
+
var pairs = str.split('&');
|
2300
|
+
for (var i = 0; i < pairs.length; i++) {
|
2301
|
+
var parts = pairs[i].split('=');
|
2302
|
+
var key = decode(parts[0]);
|
2303
|
+
var m, ctx, prop;
|
2304
|
+
|
2305
|
+
if (m = arrayRegex.exec(key)) {
|
2306
|
+
obj[m[1]] = obj[m[1]] || [];
|
2307
|
+
obj[m[1]][m[2]] = decode(parts[1]);
|
2308
|
+
continue;
|
2309
|
+
}
|
2310
|
+
|
2311
|
+
if (m = objectRegex.test(key)) {
|
2312
|
+
m = key.split('.');
|
2313
|
+
ctx = obj;
|
2314
|
+
|
2315
|
+
while (m.length) {
|
2316
|
+
prop = m.shift();
|
2317
|
+
|
2318
|
+
if (!prop.length) continue;
|
2319
|
+
|
2320
|
+
if (!ctx[prop]) {
|
2321
|
+
ctx[prop] = {};
|
2322
|
+
} else if (ctx[prop] && typeof ctx[prop] !== 'object') {
|
2323
|
+
break;
|
2324
|
+
}
|
2325
|
+
|
2326
|
+
if (!m.length) {
|
2327
|
+
ctx[prop] = decode(parts[1]);
|
2328
|
+
}
|
2329
|
+
|
2330
|
+
ctx = ctx[prop];
|
2331
|
+
}
|
2332
|
+
|
2333
|
+
continue;
|
2334
|
+
}
|
2335
|
+
|
2336
|
+
obj[parts[0]] = null == parts[1] ? '' : decode(parts[1]);
|
2337
|
+
}
|
2338
|
+
|
2339
|
+
return obj;
|
2340
|
+
};
|
2341
|
+
|
2342
|
+
/**
|
2343
|
+
* Stringify the given `obj`.
|
2344
|
+
*
|
2345
|
+
* @param {Object} obj
|
2346
|
+
* @return {String}
|
2347
|
+
* @api public
|
2348
|
+
*/
|
2349
|
+
|
2350
|
+
exports.stringify = function(obj){
|
2351
|
+
if (!obj) return '';
|
2352
|
+
var pairs = [];
|
2353
|
+
|
2354
|
+
for (var key in obj) {
|
2355
|
+
var value = obj[key];
|
2356
|
+
|
2357
|
+
if ('array' == type(value)) {
|
2358
|
+
for (var i = 0; i < value.length; ++i) {
|
2359
|
+
pairs.push(encode(key + '[' + i + ']') + '=' + encode(value[i]));
|
2360
|
+
}
|
2361
|
+
continue;
|
2362
|
+
}
|
2363
|
+
|
2364
|
+
pairs.push(encode(key) + '=' + encode(obj[key]));
|
2365
|
+
}
|
2366
|
+
|
2367
|
+
return pairs.join('&');
|
2368
|
+
};
|
2369
|
+
|
2370
|
+
|
2371
|
+
/***/ },
|
2372
|
+
/* 5 */
|
2106
2373
|
/***/ function(module, exports, __webpack_require__) {
|
2107
2374
|
|
2108
2375
|
var Factory = function () {};
|
@@ -2133,7 +2400,72 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2133
2400
|
|
2134
2401
|
module.exports = augment;
|
2135
2402
|
|
2403
|
+
/***/ },
|
2404
|
+
/* 6 */
|
2405
|
+
/***/ function(module, exports, __webpack_require__) {
|
2406
|
+
|
2407
|
+
/**
|
2408
|
+
* toString ref.
|
2409
|
+
*/
|
2410
|
+
|
2411
|
+
var toString = Object.prototype.toString;
|
2412
|
+
|
2413
|
+
/**
|
2414
|
+
* Return the type of `val`.
|
2415
|
+
*
|
2416
|
+
* @param {Mixed} val
|
2417
|
+
* @return {String}
|
2418
|
+
* @api public
|
2419
|
+
*/
|
2420
|
+
|
2421
|
+
module.exports = function(val){
|
2422
|
+
switch (toString.call(val)) {
|
2423
|
+
case '[object Date]': return 'date';
|
2424
|
+
case '[object RegExp]': return 'regexp';
|
2425
|
+
case '[object Arguments]': return 'arguments';
|
2426
|
+
case '[object Array]': return 'array';
|
2427
|
+
case '[object Error]': return 'error';
|
2428
|
+
}
|
2429
|
+
|
2430
|
+
if (val === null) return 'null';
|
2431
|
+
if (val === undefined) return 'undefined';
|
2432
|
+
if (val !== val) return 'nan';
|
2433
|
+
if (val && val.nodeType === 1) return 'element';
|
2434
|
+
|
2435
|
+
val = val.valueOf
|
2436
|
+
? val.valueOf()
|
2437
|
+
: Object.prototype.valueOf.apply(val)
|
2438
|
+
|
2439
|
+
return typeof val;
|
2440
|
+
};
|
2441
|
+
|
2442
|
+
|
2443
|
+
/***/ },
|
2444
|
+
/* 7 */
|
2445
|
+
/***/ function(module, exports, __webpack_require__) {
|
2446
|
+
|
2447
|
+
|
2448
|
+
exports = module.exports = trim;
|
2449
|
+
|
2450
|
+
function trim(str){
|
2451
|
+
return str.replace(/^\s*|\s*$/g, '');
|
2452
|
+
}
|
2453
|
+
|
2454
|
+
exports.left = function(str){
|
2455
|
+
return str.replace(/^\s*/, '');
|
2456
|
+
};
|
2457
|
+
|
2458
|
+
exports.right = function(str){
|
2459
|
+
return str.replace(/\s*$/, '');
|
2460
|
+
};
|
2461
|
+
|
2462
|
+
|
2136
2463
|
/***/ }
|
2137
2464
|
/******/ ])
|
2138
2465
|
});
|
2139
|
-
;
|
2466
|
+
;
|
2467
|
+
(function(ctx, isMeteorPackage) {
|
2468
|
+
if (isMeteorPackage) {
|
2469
|
+
Holder = ctx.Holder;
|
2470
|
+
}
|
2471
|
+
})(this, Meteor && Package);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
|
3
3
|
Holder - client side image placeholders
|
4
|
-
Version 2.
|
4
|
+
Version 2.7.0+6h7nj
|
5
5
|
© 2015 Ivan Malopinsky - http://imsky.co
|
6
6
|
|
7
7
|
Site: http://holderjs.com
|
@@ -9,4 +9,4 @@ Issues: https://github.com/imsky/holder/issues
|
|
9
9
|
License: http://opensource.org/licenses/MIT
|
10
10
|
|
11
11
|
*/
|
12
|
-
document.querySelectorAll||(document.querySelectorAll=function(a){var b,c=document.createElement("style"),d=[];for(document.documentElement.firstChild.appendChild(c),document._qsa=[],c.styleSheet.cssText=a+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),c.parentNode.removeChild(c);document._qsa.length;)b=document._qsa.shift(),b.style.removeAttribute("x-qsa"),d.push(b);return document._qsa=null,d}),document.querySelector||(document.querySelector=function(a){var b=document.querySelectorAll(a);return b.length?b[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(a){return a=String(a).replace(/^|\s+/g,"."),document.querySelectorAll(a)}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw TypeError("Object.keys called on non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d<a.length;)c=b.indexOf(a.charAt(d)),f=f<<6|c,g+=6,24===g&&(e.push(String.fromCharCode(f>>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j<a.length;)c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=a.charCodeAt(j++),f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(this),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),function(){if("performance"in window==!1&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==!1){var a=Date.now();performance.timing&&performance.timing.navigationStart&&(a=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-a}}}(),window.requestAnimationFrame||(window.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(this):window.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(this):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(this)),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){function d(a,b,c,d){var g=e(c.substr(c.lastIndexOf(a.domain)),a);g&&f({mode:null,el:d,flags:g,engineSettings:b})}function e(a,b){for(var c={theme:y(K.settings.themes.gray,null),stylesheets:b.stylesheets,holderURL:[]},d=!1,e=String.fromCharCode(11),f=a.replace(/([^\\])\//g,"$1"+e).split(e),g=/%[0-9a-f]{2}/gi,h=f.length,i=0;h>i;i++){var j=f[i];if(j.match(g))try{j=decodeURIComponent(j)}catch(k){j=f[i]}var l=!1;if(K.flags.dimensions.match(j))d=!0,c.dimensions=K.flags.dimensions.output(j),l=!0;else if(K.flags.fluid.match(j))d=!0,c.dimensions=K.flags.fluid.output(j),c.fluid=!0,l=!0;else if(K.flags.textmode.match(j))c.textmode=K.flags.textmode.output(j),l=!0;else if(K.flags.colors.match(j)){var m=K.flags.colors.output(j);c.theme=y(c.theme,m),l=!0}else if(b.themes[j])b.themes.hasOwnProperty(j)&&(c.theme=y(b.themes[j],null)),l=!0;else if(K.flags.font.match(j))c.font=K.flags.font.output(j),l=!0;else if(K.flags.auto.match(j))c.auto=!0,l=!0;else if(K.flags.text.match(j))c.text=K.flags.text.output(j),l=!0;else if(K.flags.size.match(j))c.size=K.flags.size.output(j),l=!0;else if(K.flags.random.match(j)){null==K.vars.cache.themeKeys&&(K.vars.cache.themeKeys=Object.keys(b.themes));var n=K.vars.cache.themeKeys[0|Math.random()*K.vars.cache.themeKeys.length];c.theme=y(b.themes[n],null),l=!0}l&&c.holderURL.push(j)}return c.holderURL.unshift(b.domain),c.holderURL=c.holderURL.join("/"),d?c:!1}function f(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,h=d.theme,i=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(h.text=d.text,"object"===c.nodeName.toLowerCase())){for(var l=h.text.split("\\n"),m=0;m<l.length;m++)l[m]=A(l[m]);h.text=l.join("\\n")}var n=d.holderURL,o=y(e,null);if(d.font&&(h.font=d.font,!o.noFontFallback&&"img"===c.nodeName.toLowerCase()&&K.setup.supportsCanvas&&"svg"===o.renderer&&(o=y(o,{renderer:"canvas"}))),d.font&&"canvas"==o.renderer&&(o.reRender=!0),"background"==b)null==c.getAttribute("data-background-src")&&p(c,{"data-background-src":n});else{var q={};q[K.vars.dataAttr]=n,p(c,q)}d.theme=h,c.holderData={flags:d,engineSettings:o},("image"==b||"fluid"==b)&&p(c,{alt:h.text?h.text+" ["+i+"]":i});var r={mode:b,el:c,holderSettings:{dimensions:f,theme:h,flags:d},engineSettings:o};"image"==b?("html"!=o.renderer&&d.auto||(c.style.width=f.width+"px",c.style.height=f.height+"px"),"html"==o.renderer?c.style.backgroundColor=h.background:(g(r),"exact"==d.textmode&&(c.holderData.resizeUpdate=!0,K.vars.resizableImages.push(c),j(c)))):"background"==b&&"html"!=o.renderer?g(r):"fluid"==b&&(c.holderData.resizeUpdate=!0,"%"==f.height.slice(-1)?c.style.height=f.height:null!=d.auto&&d.auto||(c.style.height=f.height+"px"),"%"==f.width.slice(-1)?c.style.width=f.width:null!=d.auto&&d.auto||(c.style.width=f.width+"px"),("inline"==c.style.display||""===c.style.display||"none"==c.style.display)&&(c.style.display="block"),k(c),"html"==o.renderer?c.style.backgroundColor=h.background:(K.vars.resizableImages.push(c),j(c)))}function g(a){function c(){var b=null;switch(i.renderer){case"canvas":b=M(k,a);break;case"svg":b=N(k,a);break;default:throw"Holder: invalid renderer: "+i.renderer}return b}var d=null,e=a.mode,f=a.holderSettings,g=a.el,i=a.engineSettings;switch(i.renderer){case"svg":if(!K.setup.supportsSVG)return;break;case"canvas":if(!K.setup.supportsCanvas)return;break;default:return}var j={width:f.dimensions.width,height:f.dimensions.height,theme:f.theme,flags:f.flags},k=h(j);if(d=c(),null==d)throw"Holder: couldn't render placeholder";"background"==e?(g.style.backgroundImage="url("+d+")",g.style.backgroundSize=j.width+"px "+j.height+"px"):("img"===g.nodeName.toLowerCase()?p(g,{src:d}):"object"===g.nodeName.toLowerCase()&&(p(g,{data:d}),p(g,{type:"image/svg+xml"})),i.reRender&&b.setTimeout(function(){var a=c();if(null==a)throw"Holder: couldn't render placeholder";"img"===g.nodeName.toLowerCase()?p(g,{src:a}):"object"===g.nodeName.toLowerCase()&&(p(g,{data:a}),p(g,{type:"image/svg+xml"}))},100)),p(g,{"data-holder-rendered":!0})}function h(a){function b(a,b,c,d){b.width=c,b.height=d,a.width=Math.max(a.width,b.width),a.height+=b.height,a.add(b)}var c=K.defaults.size;switch(parseFloat(a.theme.size)?c=a.theme.size:parseFloat(a.flags.size)&&(c=a.flags.size),a.font={family:a.theme.font?a.theme.font:"Arial, Helvetica, Open Sans, sans-serif",size:i(a.width,a.height,c),units:a.theme.units?a.theme.units:K.defaults.units,weight:a.theme.fontweight?a.theme.fontweight:"bold"},a.text=a.theme.text?a.theme.text:Math.floor(a.width)+"x"+Math.floor(a.height),a.flags.textmode){case"literal":a.text=a.flags.dimensions.width+"x"+a.flags.dimensions.height;break;case"exact":if(!a.flags.exactDimensions)break;a.text=Math.floor(a.flags.exactDimensions.width)+"x"+Math.floor(a.flags.exactDimensions.height)}var d=new w({width:a.width,height:a.height}),e=d.Shape,f=new e.Rect("holderBg",{fill:a.theme.background});f.resize(a.width,a.height),d.root.add(f);var g=new e.Group("holderTextGroup",{text:a.text,align:"center",font:a.font,fill:a.theme.foreground});g.moveTo(null,null,1),d.root.add(g);var h=g.textPositionData=L(d);if(!h)throw"Holder: staging fallback not supported yet.";g.properties.leading=h.boundingBox.height;var j=null,k=null;if(h.lineCount>1){var l=0,m=0,n=a.width*K.setup.lineWrapRatio,o=0;k=new e.Group("line"+o);for(var p=0;p<h.words.length;p++){var q=h.words[p];j=new e.Text(q.text);var r="\\n"==q.text;(l+q.width>=n||r===!0)&&(b(g,k,l,g.properties.leading),l=0,m+=g.properties.leading,o+=1,k=new e.Group("line"+o),k.y=m),r!==!0&&(j.moveTo(l,0),l+=h.spaceWidth+q.width,k.add(j))}b(g,k,l,g.properties.leading);for(var s in g.children)k=g.children[s],k.moveTo((g.width-k.width)/2,null,null);g.moveTo((a.width-g.width)/2,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else j=new e.Text(a.text),k=new e.Group("line0"),k.add(j),g.add(k),g.moveTo((a.width-h.boundingBox.width)/2,(a.height-h.boundingBox.height)/2,null);return d}function i(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*K.defaults.scale);return Math.round(Math.max(c,h))}function j(a){var b;b=null==a||null==a.nodeType?K.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,h=E(e);if(h){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var i=e.holderData.fluidConfig;switch(i.mode){case"width":h.height=h.width/i.ratio;break;case"height":h.width=h.height*i.ratio}}var j={mode:"image",holderSettings:{dimensions:h,theme:f.theme,flags:f},el:e,engineSettings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=h,j.holderSettings.dimensions=f.dimensions),g(j)}else n(e)}}}function k(a){if(a.holderData){var b=E(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else n(a)}}function l(){for(var a,c=[],d=Object.keys(K.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=K.vars.invisibleImages[d[e]],E(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete K.vars.invisibleImages[d[e]]);c.length&&J.run({images:c}),b.requestAnimationFrame(l)}function m(){K.vars.visibilityCheckStarted||(b.requestAnimationFrame(l),K.vars.visibilityCheckStarted=!0)}function n(a){a.holderData.invisibleId||(K.vars.invisibleId+=1,K.vars.invisibleImages["i"+K.vars.invisibleId]=a,a.holderData.invisibleId=K.vars.invisibleId)}function o(a,b){return null==b?document.createElement(a):document.createElementNS(b,a)}function p(a,b){for(var c in b)a.setAttribute(c,b[c])}function q(a,b,c){var d,e;null==a?(a=o("svg",F),d=o("defs",F),e=o("style",F),p(e,{type:"text/css"}),d.appendChild(e),a.appendChild(d)):e=a.querySelector("style"),a.webkitMatchesSelector&&a.setAttribute("xmlns",F);for(var f=0;f<a.childNodes.length;f++)a.childNodes[f].nodeType===G&&a.removeChild(a.childNodes[f]);for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);return p(a,{width:b,height:c,viewBox:"0 0 "+b+" "+c,preserveAspectRatio:"none"}),a}function r(a,c){if(b.XMLSerializer){var d=new XMLSerializer,e="",f=c.stylesheets;if(c.svgXMLStylesheet){for(var g=s(),h=f.length-1;h>=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}g.removeChild(g.documentElement),e=d.serializeToString(g)}var j=d.serializeToString(a);return j=j.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+j}}function s(){return b.DOMParser?(new DOMParser).parseFromString("<xml />","application/xml"):void 0}function t(a){K.vars.debounceTimer||a.call(this),K.vars.debounceTimer&&b.clearTimeout(K.vars.debounceTimer),K.vars.debounceTimer=b.setTimeout(function(){K.vars.debounceTimer=null,a.call(this)},K.setup.debounce)}function u(){t(function(){j(null)})}var v=c(1),w=c(2),x=c(3),y=x.extend,z=x.cssProps,A=x.encodeHtmlEntity,B=x.decodeHtmlEntity,C=x.imageExists,D=x.getNodeArray,E=x.dimensionCheck,F="http://www.w3.org/2000/svg",G=8,H="2.6.1",I="\nCreated with Holder.js "+H+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",J={version:H,addTheme:function(a,b){return null!=a&&null!=b&&(K.settings.themes[a]=b),delete K.vars.cache.themeKeys,this},addImage:function(a,b){var c=document.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=o("img"),g={};g[K.vars.dataAttr]=a,p(f,g),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&j(a))},run:function(a){a=a||{};var c={},g=y(K.settings,a);K.vars.preempted=!0,K.vars.dataAttr=g.dataAttr||K.vars.dataAttr,c.renderer=g.renderer?g.renderer:K.setup.renderer,-1===K.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=K.setup.supportsSVG?"svg":K.setup.supportsCanvas?"canvas":"html");var h=D(g.images),i=D(g.bgnodes),j=D(g.stylenodes),k=D(g.objects);c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=g.noFontFallback?g.noFontFallback:!1;for(var l=0;l<j.length;l++){var m=j[l];if(m.attributes.rel&&m.attributes.href&&"stylesheet"==m.attributes.rel.value){var n=m.attributes.href.value,p=o("a");p.href=n;var q=p.protocol+"//"+p.host+p.pathname+p.search;c.stylesheets.push(q)}}for(l=0;l<i.length;l++)if(b.getComputedStyle){var r=b.getComputedStyle(i[l],null).getPropertyValue("background-image"),s=i[l].getAttribute("data-background-src"),t=null;t=null==s?r:s;var u=null,v="?"+g.domain+"/";if(0===t.indexOf(v))u=t.slice(1);else if(-1!=t.indexOf(v)){var w=t.substr(t.indexOf(v)).slice(1),x=w.match(/([^\"]*)"?\)/);null!=x&&(u=x[1])}if(null!=u){var z=e(u,g);z&&f({mode:"background",el:i[l],flags:z,engineSettings:c})}}for(l=0;l<k.length;l++){var A=k[l],B={};try{B.data=A.getAttribute("data"),B.dataSrc=A.getAttribute(K.vars.dataAttr)}catch(E){}var F=null!=B.data&&0===B.data.indexOf(g.domain),G=null!=B.dataSrc&&0===B.dataSrc.indexOf(g.domain);F?d(g,c,B.data,A):G&&d(g,c,B.dataSrc,A)}for(l=0;l<h.length;l++){var H=h[l],I={};try{I.src=H.getAttribute("src"),I.dataSrc=H.getAttribute(K.vars.dataAttr),I.rendered=H.getAttribute("data-holder-rendered")}catch(E){}var J=null!=I.src,L=null!=I.dataSrc&&0===I.dataSrc.indexOf(g.domain),M=null!=I.rendered&&"true"==I.rendered;J?0===I.src.indexOf(g.domain)?d(g,c,I.src,H):L&&(M?d(g,c,I.dataSrc,H):!function(a,b,c,e,f){C(a,function(a){a||d(b,c,e,f)})}(I.src,g,c,I.dataSrc,H)):L&&d(g,c,I.dataSrc,H)}return this}},K={settings:{domain:"holder.js",images:"img",objects:"object",bgnodes:"body .holderjs",stylenodes:"head link.holderjs",stylesheets:[],themes:{gray:{background:"#EEEEEE",foreground:"#AAAAAA"},social:{background:"#3a5a97",foreground:"#FFFFFF"},industrial:{background:"#434A52",foreground:"#C2F200"},sky:{background:"#0D8FDB",foreground:"#FFFFFF"},vine:{background:"#39DBAC",foreground:"#1E292C"},lava:{background:"#F8591A",foreground:"#1C2846"}}},defaults:{size:10,units:"pt",scale:1/16},flags:{dimensions:{regex:/^(\d+)x(\d+)$/,output:function(a){var b=this.regex.exec(a);return{width:+b[1],height:+b[2]}}},fluid:{regex:/^([0-9]+%?)x([0-9]+%?)$/,output:function(a){var b=this.regex.exec(a);return{width:b[1],height:b[2]}}},colors:{regex:/(?:#|\^)([0-9a-f]{3,})\:(?:#|\^)([0-9a-f]{3,})/i,output:function(a){var b=this.regex.exec(a);return{foreground:"#"+b[2],background:"#"+b[1]}}},text:{regex:/text\:(.*)/,output:function(a){return this.regex.exec(a)[1].replace("\\/","/")}},font:{regex:/font\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},auto:{regex:/^auto$/},textmode:{regex:/textmode\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},random:{regex:/^random$/},size:{regex:/size\:(\d+)/,output:function(a){return this.regex.exec(a)[1]}}}},L=function(){var a=null,b=null,c=null;return function(d){var e=d.root;if(K.setup.supportsSVG){var f=!1,g=function(a){return document.createTextNode(a)};(null==a||a.parentNode!==document.body)&&(f=!0),a=q(a,e.properties.width,e.properties.height),a.style.display="block",f&&(b=o("text",F),c=g(null),p(b,{x:0}),b.appendChild(c),a.appendChild(b),document.body.appendChild(a),a.style.visibility="hidden",a.style.position="absolute",a.style.top="-100%",a.style.left="-100%");var h=e.children.holderTextGroup,i=h.properties;p(b,{y:i.font.size,style:z({"font-weight":i.font.weight,"font-size":i.font.size+i.font.units,"font-family":i.font.family})}),c.nodeValue=i.text;var j=b.getBBox(),k=Math.ceil(j.width/(e.properties.width*K.setup.lineWrapRatio)),l=i.text.split(" "),m=i.text.match(/\\n/g);k+=null==m?0:m.length,c.nodeValue=i.text.replace(/[ ]+/g,"");var n=b.getComputedTextLength(),r=j.width-n,s=Math.round(r/Math.max(1,l.length-1)),t=[];if(k>1){c.nodeValue="";for(var u=0;u<l.length;u++)if(0!==l[u].length){c.nodeValue=B(l[u]);var v=b.getBBox();t.push({text:l[u],width:v.width})}}return a.style.display="none",{spaceWidth:s,lineCount:k,boundingBox:j,words:t}}return!1}}(),M=function(){var a=o("canvas"),b=null;return function(c){null==b&&(b=a.getContext("2d"));var d=c.root;a.width=K.dpr(d.properties.width),a.height=K.dpr(d.properties.height),b.textBaseline="middle",b.fillStyle=d.children.holderBg.properties.fill,b.fillRect(0,0,K.dpr(d.children.holderBg.width),K.dpr(d.children.holderBg.height));{var e=d.children.holderTextGroup;e.properties}b.font=e.properties.font.weight+" "+K.dpr(e.properties.font.size)+e.properties.font.units+" "+e.properties.font.family+", monospace",b.fillStyle=e.properties.fill;for(var f in e.children){var g=e.children[f];for(var h in g.children){var i=g.children[h],j=K.dpr(e.x+g.x+i.x),k=K.dpr(e.y+g.y+i.y+e.properties.leading/2);b.fillText(i.properties.text,j,k)}}return a.toDataURL("image/png")}}(),N=function(){if(b.XMLSerializer){var a=s(),c=q(null,0,0),d=o("rect",F);return c.appendChild(d),function(b,e){var f=b.root;q(c,f.properties.width,f.properties.height);for(var g=c.querySelectorAll("g"),h=0;h<g.length;h++)g[h].parentNode.removeChild(g[h]);var i=e.holderSettings.flags.holderURL,j="holder_"+(Number(new Date)+32768+(0|32768*Math.random())).toString(16),k=o("g",F),l=f.children.holderTextGroup,m=l.properties,n=o("g",F),s=l.textPositionData,t="#"+j+" text { "+z({fill:m.fill,"font-weight":m.font.weight,"font-family":m.font.family+", monospace","font-size":m.font.size+m.font.units})+" } ",u=a.createComment("\nSource URL: "+i+I),v=a.createCDATASection(t),w=c.querySelector("style");p(k,{id:j}),c.insertBefore(u,c.firstChild),w.appendChild(v),k.appendChild(d),k.appendChild(n),c.appendChild(k),p(d,{width:f.children.holderBg.width,height:f.children.holderBg.height,fill:f.children.holderBg.properties.fill}),l.y+=.8*s.boundingBox.height;for(var x in l.children){var y=l.children[x];for(var A in y.children){var B=y.children[A],C=l.x+y.x+B.x,D=l.y+y.y+B.y,E=o("text",F),G=document.createTextNode(null);p(E,{x:C,y:D}),G.nodeValue=B.properties.text,E.appendChild(G),n.appendChild(E)}}var H="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(r(c,e.engineSettings))));return H}}}();for(var O in K.flags)K.flags.hasOwnProperty(O)&&(K.flags[O].match=function(a){return a.match(this.regex)});K.setup={renderer:"html",debounce:100,ratio:1,supportsCanvas:!1,supportsSVG:!1,lineWrapRatio:.9,renderers:["html","canvas","svg"]},K.dpr=function(a){return a*K.setup.ratio},K.vars={preempted:!1,resizableImages:[],invisibleImages:{},invisibleId:0,visibilityCheckStarted:!1,debounceTimer:null,cache:{},dataAttr:"data-src"},function(){var a=1,c=1,d=o("canvas"),e=null;d.getContext&&-1!=d.toDataURL("image/png").indexOf("data:image/png")&&(K.setup.renderer="canvas",e=d.getContext("2d"),K.setup.supportsCanvas=!0),K.setup.supportsCanvas&&(a=b.devicePixelRatio||1,c=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),K.setup.ratio=a/c,document.createElementNS&&document.createElementNS(F,"svg").createSVGRect&&(K.setup.renderer="svg",K.setup.supportsSVG=!0)}(),m(),v&&v(function(){K.vars.preempted||J.run(),b.addEventListener?(b.addEventListener("resize",u,!1),b.addEventListener("orientationchange",u,!1)):b.attachEvent("onresize",u),"object"==typeof b.Turbolinks&&b.document.addEventListener("page:change",function(){J.run()})}),a.exports=J}).call(b,function(){return this}())},function(a){function b(a){function b(a){if(!v){if(!g.body)return e(b);for(v=!0;a=w.shift();)e(a)}}function c(a){(t||a.type===i||g[m]===l)&&(d(),b())}function d(){t?(g[s](q,c,j),a[s](i,c,j)):(g[o](r,c),a[o](k,c))}function e(a,b){setTimeout(a,+b>=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}a.exports="undefined"!=typeof window&&b(window)},function(a,b,c){var d=c(4),e=function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}var c=1,e=d.defclass({constructor:function(a){c++,this.parent=null,this.children={},this.id=c,this.name="n"+c,null!=a&&(this.name=a),this.x=0,this.y=0,this.z=0,this.width=0,this.height=0},resize:function(a,b){null!=a&&(this.width=a),null!=b&&(this.height=b)},moveTo:function(a,b,c){this.x=null!=a?a:this.x,this.y=null!=b?b:this.y,this.z=null!=c?c:this.z},add:function(a){var b=a.name;if(null!=this.children[b])throw"SceneGraph: child with that name already exists: "+b;this.children[b]=a,a.parent=this}}),f=d(e,function(b){this.constructor=function(){b.constructor.call(this,"root"),this.properties=a}}),g=d(e,function(a){function c(c,d){if(a.constructor.call(this,c),this.properties={fill:"#000"},null!=d)b(this.properties,d);else if(null!=c&&"string"!=typeof c)throw"SceneGraph: invalid node name"}this.Group=d.extend(this,{constructor:c,type:"group"}),this.Rect=d.extend(this,{constructor:c,type:"rect"}),this.Text=d.extend(this,{constructor:function(a){c.call(this),this.properties.text=a},type:"text"})}),h=new f;return this.Shape=g,this.root=h,this};a.exports=e},function(a,b){(function(a){b.extend=function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c},b.cssProps=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")},b.encodeHtmlEntity=function(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1}}).call(b,function(){return this}())},function(a){var b=function(){},c=Array.prototype.slice,d=function(a,d){var e=b.prototype="function"==typeof a?a.prototype:a,f=new b,g=d.apply(f,c.call(arguments,2).concat(e));if("object"==typeof g)for(var h in g)f[h]=g[h];if(!f.hasOwnProperty("constructor"))return f;var i=f.constructor;return i.prototype=f,i};d.defclass=function(a){var b=a.constructor;return b.prototype=a,b},d.extend=function(a,b){return d(a,function(a){return this.uber=a,b})},a.exports=d}])});
|
12
|
+
!function(a){if(a.document){var b=a.document;b.querySelectorAll||(b.querySelectorAll=function(c){var d,e=b.createElement("style"),f=[];for(b.documentElement.firstChild.appendChild(e),b._qsa=[],e.styleSheet.cssText=c+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",a.scrollBy(0,0),e.parentNode.removeChild(e);b._qsa.length;)d=b._qsa.shift(),d.style.removeAttribute("x-qsa"),f.push(d);return b._qsa=null,f}),b.querySelector||(b.querySelector=function(a){var c=b.querySelectorAll(a);return c.length?c[0]:null}),b.getElementsByClassName||(b.getElementsByClassName=function(a){return a=String(a).replace(/^|\s+/g,"."),b.querySelectorAll(a)}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw TypeError("Object.keys called on non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d<a.length;)c=b.indexOf(a.charAt(d)),f=f<<6|c,g+=6,24===g&&(e.push(String.fromCharCode(f>>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j<a.length;)c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=a.charCodeAt(j++),f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(a),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),function(){if("performance"in a==!1&&(a.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in a.performance==!1){var b=Date.now();performance.timing&&performance.timing.navigationStart&&(b=performance.timing.navigationStart),a.performance.now=function(){return Date.now()-b}}}(),a.requestAnimationFrame||(a.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(a):a.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(a):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(a))}}(this),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){function d(a,b,c,d){var f=e(c.substr(c.lastIndexOf(a.domain)),a);f&&h({mode:null,el:d,flags:f,engineSettings:b})}function e(a,b){var c={theme:B(J.settings.themes.gray,null),stylesheets:b.stylesheets,instanceOptions:b};return a.match(/([\d]+p?)x([\d]+p?)(?:\?|$)/)?f(a,c):g(a,c)}function f(a,b){var c=a.split("?"),d=c[0].split("/");b.holderURL=a;var e=d[1],f=e.match(/([\d]+p?)x([\d]+p?)/);if(!f)return!1;if(b.fluid=-1!==e.indexOf("p"),b.dimensions={width:f[1].replace("p","%"),height:f[2].replace("p","%")},2===c.length){var g=A.parse(c[1]);if(g.bg&&(b.theme.background=(-1===g.bg.indexOf("#")?"#":"")+g.bg),g.fg&&(b.theme.foreground=(-1===g.fg.indexOf("#")?"#":"")+g.fg),g.theme&&b.instanceOptions.themes.hasOwnProperty(g.theme)&&(b.theme=B(b.instanceOptions.themes[g.theme],null)),g.text&&(b.text=g.text),g.textmode&&(b.textmode=g.textmode),g.size&&(b.size=g.size),g.font&&(b.font=g.font),g.align&&(b.align=g.align),b.nowrap=z.truthy(g.nowrap),b.auto=z.truthy(g.auto),z.truthy(g.random)){J.vars.cache.themeKeys=J.vars.cache.themeKeys||Object.keys(b.instanceOptions.themes);var h=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(b.instanceOptions.themes[h],null)}}return b}function g(a,b){var c=!1,d=String.fromCharCode(11),e=a.replace(/([^\\])\//g,"$1"+d).split(d),f=/%[0-9a-f]{2}/gi,g=b.instanceOptions;b.holderURL=[];for(var h=e.length,i=0;h>i;i++){var j=e[i];if(j.match(f))try{j=decodeURIComponent(j)}catch(k){j=e[i]}var l=!1;if(J.flags.dimensions.match(j))c=!0,b.dimensions=J.flags.dimensions.output(j),l=!0;else if(J.flags.fluid.match(j))c=!0,b.dimensions=J.flags.fluid.output(j),b.fluid=!0,l=!0;else if(J.flags.textmode.match(j))b.textmode=J.flags.textmode.output(j),l=!0;else if(J.flags.colors.match(j)){var m=J.flags.colors.output(j);b.theme=B(b.theme,m),l=!0}else if(g.themes[j])g.themes.hasOwnProperty(j)&&(b.theme=B(g.themes[j],null)),l=!0;else if(J.flags.font.match(j))b.font=J.flags.font.output(j),l=!0;else if(J.flags.auto.match(j))b.auto=!0,l=!0;else if(J.flags.text.match(j))b.text=J.flags.text.output(j),l=!0;else if(J.flags.size.match(j))b.size=J.flags.size.output(j),l=!0;else if(J.flags.random.match(j)){null==J.vars.cache.themeKeys&&(J.vars.cache.themeKeys=Object.keys(g.themes));var n=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(g.themes[n],null),l=!0}l&&b.holderURL.push(j)}return b.holderURL.unshift(g.domain),b.holderURL=b.holderURL.join("/"),c?b:!1}function h(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,g=d.theme,h=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(g.text=d.text,"object"===c.nodeName.toLowerCase())){for(var j=g.text.split("\\n"),k=0;k<j.length;k++)j[k]=z.encodeHtmlEntity(j[k]);g.text=j.join("\\n")}var n=d.holderURL,o=B(e,null);if(d.font&&(g.font=d.font,!o.noFontFallback&&"img"===c.nodeName.toLowerCase()&&J.setup.supportsCanvas&&"svg"===o.renderer&&(o=B(o,{renderer:"canvas"}))),d.font&&"canvas"==o.renderer&&(o.reRender=!0),"background"==b)null==c.getAttribute("data-background-src")&&r(c,{"data-background-src":n});else{var p={};p[J.vars.dataAttr]=n,r(c,p)}d.theme=g,c.holderData={flags:d,engineSettings:o},("image"==b||"fluid"==b)&&r(c,{alt:g.text?g.text+" ["+h+"]":h});var q={mode:b,el:c,holderSettings:{dimensions:f,theme:g,flags:d},engineSettings:o};"image"==b?("html"!=o.renderer&&d.auto||(c.style.width=f.width+"px",c.style.height=f.height+"px"),"html"==o.renderer?c.style.backgroundColor=g.background:(i(q),"exact"==d.textmode&&(c.holderData.resizeUpdate=!0,J.vars.resizableImages.push(c),l(c)))):"background"==b&&"html"!=o.renderer?i(q):"fluid"==b&&(c.holderData.resizeUpdate=!0,"%"==f.height.slice(-1)?c.style.height=f.height:null!=d.auto&&d.auto||(c.style.height=f.height+"px"),"%"==f.width.slice(-1)?c.style.width=f.width:null!=d.auto&&d.auto||(c.style.width=f.width+"px"),("inline"==c.style.display||""===c.style.display||"none"==c.style.display)&&(c.style.display="block"),m(c),"html"==o.renderer?c.style.backgroundColor=g.background:(J.vars.resizableImages.push(c),l(c)))}function i(a){function c(){var b=null;switch(h.renderer){case"canvas":b=L(k,a);break;case"svg":b=M(k,a);break;default:throw"Holder: invalid renderer: "+h.renderer}return b}var d=null,e=a.mode,f=a.holderSettings,g=a.el,h=a.engineSettings;switch(h.renderer){case"svg":if(!J.setup.supportsSVG)return;break;case"canvas":if(!J.setup.supportsCanvas)return;break;default:return}var i={width:f.dimensions.width,height:f.dimensions.height,theme:f.theme,flags:f.flags},k=j(i);if(d=c(),null==d)throw"Holder: couldn't render placeholder";"background"==e?(g.style.backgroundImage="url("+d+")",g.style.backgroundSize=i.width+"px "+i.height+"px"):("img"===g.nodeName.toLowerCase()?r(g,{src:d}):"object"===g.nodeName.toLowerCase()&&(r(g,{data:d}),r(g,{type:"image/svg+xml"})),h.reRender&&b.setTimeout(function(){var a=c();if(null==a)throw"Holder: couldn't render placeholder";"img"===g.nodeName.toLowerCase()?r(g,{src:a}):"object"===g.nodeName.toLowerCase()&&(r(g,{data:a}),r(g,{type:"image/svg+xml"}))},100)),r(g,{"data-holder-rendered":!0})}function j(a){function b(a,b,c,d){b.width=c,b.height=d,a.width=Math.max(a.width,b.width),a.height+=b.height}var c=J.defaults.size;switch(parseFloat(a.theme.size)?c=a.theme.size:parseFloat(a.flags.size)&&(c=a.flags.size),a.font={family:a.theme.font?a.theme.font:"Arial, Helvetica, Open Sans, sans-serif",size:k(a.width,a.height,c),units:a.theme.units?a.theme.units:J.defaults.units,weight:a.theme.fontweight?a.theme.fontweight:"bold"},a.text=a.theme.text||Math.floor(a.width)+"x"+Math.floor(a.height),a.noWrap=a.theme.nowrap||a.flags.nowrap,a.align=a.theme.align||a.flags.align||"center",a.flags.textmode){case"literal":a.text=a.flags.dimensions.width+"x"+a.flags.dimensions.height;break;case"exact":if(!a.flags.exactDimensions)break;a.text=Math.floor(a.flags.exactDimensions.width)+"x"+Math.floor(a.flags.exactDimensions.height)}var d=new y({width:a.width,height:a.height}),e=d.Shape,f=new e.Rect("holderBg",{fill:a.theme.background});f.resize(a.width,a.height),d.root.add(f);var g=new e.Group("holderTextGroup",{text:a.text,align:a.align,font:a.font,fill:a.theme.foreground});g.moveTo(null,null,1),d.root.add(g);var h=g.textPositionData=K(d);if(!h)throw"Holder: staging fallback not supported yet.";g.properties.leading=h.boundingBox.height;var i=null,j=null,l=a.width*J.setup.lineWrapRatio,m=l;if(h.lineCount>1){var n,o=0,p=0,q=0;j=new e.Group("line"+q),("left"===a.align||"right"===a.align)&&(m=a.width*(1-2*(1-J.setup.lineWrapRatio)));for(var r=0;r<h.words.length;r++){var s=h.words[r];i=new e.Text(s.text);var t="\\n"==s.text;!a.noWrap&&(o+s.width>=m||t===!0)&&(b(g,j,o,g.properties.leading),g.add(j),o=0,p+=g.properties.leading,q+=1,j=new e.Group("line"+q),j.y=p),t!==!0&&(i.moveTo(o,0),o+=h.spaceWidth+s.width,j.add(i))}if(b(g,j,o,g.properties.leading),g.add(j),"left"===a.align)g.moveTo(a.width-l,null,null);else if("right"===a.align){for(n in g.children)j=g.children[n],j.moveTo(a.width-j.width,null,null);g.moveTo(0-(a.width-l),null,null)}else{for(n in g.children)j=g.children[n],j.moveTo((g.width-j.width)/2,null,null);g.moveTo((a.width-g.width)/2,null,null)}g.moveTo(null,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else i=new e.Text(a.text),j=new e.Group("line0"),j.add(i),g.add(j),"left"===a.align?g.moveTo(a.width-l,null,null):"right"===a.align?g.moveTo(0-(a.width-l),null,null):g.moveTo((a.width-h.boundingBox.width)/2,null,null),g.moveTo(null,(a.height-h.boundingBox.height)/2,null);return d}function k(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*J.defaults.scale);return Math.round(Math.max(c,h))}function l(a){var b;b=null==a||null==a.nodeType?J.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,g=D(e);if(g){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var h=e.holderData.fluidConfig;switch(h.mode){case"width":g.height=g.width/h.ratio;break;case"height":g.width=g.height*h.ratio}}var j={mode:"image",holderSettings:{dimensions:g,theme:f.theme,flags:f},el:e,engineSettings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=g,j.holderSettings.dimensions=f.dimensions),i(j)}else p(e)}}}function m(a){if(a.holderData){var b=D(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else p(a)}}function n(){for(var a,c=[],d=Object.keys(J.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=J.vars.invisibleImages[d[e]],D(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete J.vars.invisibleImages[d[e]]);c.length&&I.run({images:c}),b.requestAnimationFrame(n)}function o(){J.vars.visibilityCheckStarted||(b.requestAnimationFrame(n),J.vars.visibilityCheckStarted=!0)}function p(a){a.holderData.invisibleId||(J.vars.invisibleId+=1,J.vars.invisibleImages["i"+J.vars.invisibleId]=a,a.holderData.invisibleId=J.vars.invisibleId)}function q(a,b){return null==b?document.createElement(a):document.createElementNS(b,a)}function r(a,b){for(var c in b)a.setAttribute(c,b[c])}function s(a,b,c){var d,e;null==a?(a=q("svg",E),d=q("defs",E),e=q("style",E),r(e,{type:"text/css"}),d.appendChild(e),a.appendChild(d)):e=a.querySelector("style"),a.webkitMatchesSelector&&a.setAttribute("xmlns",E);for(var f=0;f<a.childNodes.length;f++)a.childNodes[f].nodeType===F&&a.removeChild(a.childNodes[f]);for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);return r(a,{width:b,height:c,viewBox:"0 0 "+b+" "+c,preserveAspectRatio:"none"}),a}function t(a,c){if(b.XMLSerializer){var d=new XMLSerializer,e="",f=c.stylesheets;if(c.svgXMLStylesheet){for(var g=u(),h=f.length-1;h>=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}g.removeChild(g.documentElement),e=d.serializeToString(g)}var j=d.serializeToString(a);return j=j.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+j}}function u(){return b.DOMParser?(new DOMParser).parseFromString("<xml />","application/xml"):void 0}function v(a){J.vars.debounceTimer||a.call(this),J.vars.debounceTimer&&b.clearTimeout(J.vars.debounceTimer),J.vars.debounceTimer=b.setTimeout(function(){J.vars.debounceTimer=null,a.call(this)},J.setup.debounce)}function w(){v(function(){l(null)})}var x=c(1),y=c(2),z=c(3),A=c(4),B=z.extend,C=z.getNodeArray,D=z.dimensionCheck,E="http://www.w3.org/2000/svg",F=8,G="2.7.0",H="\nCreated with Holder.js "+G+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",I={version:G,addTheme:function(a,b){return null!=a&&null!=b&&(J.settings.themes[a]=b),delete J.vars.cache.themeKeys,this},addImage:function(a,b){var c=document.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=q("img"),g={};g[J.vars.dataAttr]=a,r(f,g),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&l(a))},run:function(a){a=a||{};var c={},f=B(J.settings,a);J.vars.preempted=!0,J.vars.dataAttr=f.dataAttr||J.vars.dataAttr,c.renderer=f.renderer?f.renderer:J.setup.renderer,-1===J.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=J.setup.supportsSVG?"svg":J.setup.supportsCanvas?"canvas":"html");var g=C(f.images),i=C(f.bgnodes),j=C(f.stylenodes),k=C(f.objects);c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=f.noFontFallback?f.noFontFallback:!1;for(var l=0;l<j.length;l++){var m=j[l];if(m.attributes.rel&&m.attributes.href&&"stylesheet"==m.attributes.rel.value){var n=m.attributes.href.value,o=q("a");o.href=n;var p=o.protocol+"//"+o.host+o.pathname+o.search;c.stylesheets.push(p)}}for(l=0;l<i.length;l++)if(b.getComputedStyle){var r=b.getComputedStyle(i[l],null).getPropertyValue("background-image"),s=i[l].getAttribute("data-background-src"),t=null;t=null==s?r:s;var u=null,v="?"+f.domain+"/";if(0===t.indexOf(v))u=t.slice(1);else if(-1!=t.indexOf(v)){var w=t.substr(t.indexOf(v)).slice(1),x=w.match(/([^\"]*)"?\)/);null!=x&&(u=x[1])}if(null!=u){var y=e(u,f);y&&h({mode:"background",el:i[l],flags:y,engineSettings:c})}}for(l=0;l<k.length;l++){var A=k[l],D={};try{D.data=A.getAttribute("data"),D.dataSrc=A.getAttribute(J.vars.dataAttr)}catch(E){}var F=null!=D.data&&0===D.data.indexOf(f.domain),G=null!=D.dataSrc&&0===D.dataSrc.indexOf(f.domain);F?d(f,c,D.data,A):G&&d(f,c,D.dataSrc,A)}for(l=0;l<g.length;l++){var H=g[l],I={};try{I.src=H.getAttribute("src"),I.dataSrc=H.getAttribute(J.vars.dataAttr),I.rendered=H.getAttribute("data-holder-rendered")}catch(E){}var K=null!=I.src,L=null!=I.dataSrc&&0===I.dataSrc.indexOf(f.domain),M=null!=I.rendered&&"true"==I.rendered;K?0===I.src.indexOf(f.domain)?d(f,c,I.src,H):L&&(M?d(f,c,I.dataSrc,H):!function(a,b,c,e,f){z.imageExists(a,function(a){a||d(b,c,e,f)})}(I.src,f,c,I.dataSrc,H)):L&&d(f,c,I.dataSrc,H)}return this}},J={settings:{domain:"holder.js",images:"img",objects:"object",bgnodes:"body .holderjs",stylenodes:"head link.holderjs",stylesheets:[],themes:{gray:{background:"#EEEEEE",foreground:"#AAAAAA"},social:{background:"#3a5a97",foreground:"#FFFFFF"},industrial:{background:"#434A52",foreground:"#C2F200"},sky:{background:"#0D8FDB",foreground:"#FFFFFF"},vine:{background:"#39DBAC",foreground:"#1E292C"},lava:{background:"#F8591A",foreground:"#1C2846"}}},defaults:{size:10,units:"pt",scale:1/16},flags:{dimensions:{regex:/^(\d+)x(\d+)$/,output:function(a){var b=this.regex.exec(a);return{width:+b[1],height:+b[2]}}},fluid:{regex:/^([0-9]+%?)x([0-9]+%?)$/,output:function(a){var b=this.regex.exec(a);return{width:b[1],height:b[2]}}},colors:{regex:/(?:#|\^)([0-9a-f]{3,})\:(?:#|\^)([0-9a-f]{3,})/i,output:function(a){var b=this.regex.exec(a);return{foreground:"#"+b[2],background:"#"+b[1]}}},text:{regex:/text\:(.*)/,output:function(a){return this.regex.exec(a)[1].replace("\\/","/")}},font:{regex:/font\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},auto:{regex:/^auto$/},textmode:{regex:/textmode\:(.*)/,output:function(a){return this.regex.exec(a)[1]}},random:{regex:/^random$/},size:{regex:/size\:(\d+)/,output:function(a){return this.regex.exec(a)[1]}}}},K=function(){var a=null,b=null,c=null;return function(d){var e=d.root;if(J.setup.supportsSVG){var f=!1,g=function(a){return document.createTextNode(a)};(null==a||a.parentNode!==document.body)&&(f=!0),a=s(a,e.properties.width,e.properties.height),a.style.display="block",f&&(b=q("text",E),c=g(null),r(b,{x:0}),b.appendChild(c),a.appendChild(b),document.body.appendChild(a),a.style.visibility="hidden",a.style.position="absolute",a.style.top="-100%",a.style.left="-100%");var h=e.children.holderTextGroup,i=h.properties;r(b,{y:i.font.size,style:z.cssProps({"font-weight":i.font.weight,"font-size":i.font.size+i.font.units,"font-family":i.font.family})}),c.nodeValue=i.text;var j=b.getBBox(),k=Math.ceil(j.width/(e.properties.width*J.setup.lineWrapRatio)),l=i.text.split(" "),m=i.text.match(/\\n/g);k+=null==m?0:m.length,c.nodeValue=i.text.replace(/[ ]+/g,"");var n=b.getComputedTextLength(),o=j.width-n,p=Math.round(o/Math.max(1,l.length-1)),t=[];if(k>1){c.nodeValue="";for(var u=0;u<l.length;u++)if(0!==l[u].length){c.nodeValue=z.decodeHtmlEntity(l[u]);var v=b.getBBox();t.push({text:l[u],width:v.width})}}return a.style.display="none",{spaceWidth:p,lineCount:k,boundingBox:j,words:t}}return!1}}(),L=function(){var a=q("canvas"),b=null;return function(c){null==b&&(b=a.getContext("2d"));var d=c.root;a.width=J.dpr(d.properties.width),a.height=J.dpr(d.properties.height),b.textBaseline="middle",b.fillStyle=d.children.holderBg.properties.fill,b.fillRect(0,0,J.dpr(d.children.holderBg.width),J.dpr(d.children.holderBg.height));{var e=d.children.holderTextGroup;e.properties}b.font=e.properties.font.weight+" "+J.dpr(e.properties.font.size)+e.properties.font.units+" "+e.properties.font.family+", monospace",b.fillStyle=e.properties.fill;for(var f in e.children){var g=e.children[f];for(var h in g.children){var i=g.children[h],j=J.dpr(e.x+g.x+i.x),k=J.dpr(e.y+g.y+i.y+e.properties.leading/2);b.fillText(i.properties.text,j,k)}}return a.toDataURL("image/png")}}(),M=function(){if(b.XMLSerializer){var a=u(),c=s(null,0,0),d=q("rect",E);return c.appendChild(d),function(b,e){var f=b.root;s(c,f.properties.width,f.properties.height);for(var g=c.querySelectorAll("g"),h=0;h<g.length;h++)g[h].parentNode.removeChild(g[h]);var i=e.holderSettings.flags.holderURL,j="holder_"+(Number(new Date)+32768+(0|32768*Math.random())).toString(16),k=q("g",E),l=f.children.holderTextGroup,m=l.properties,n=q("g",E),o=l.textPositionData,p="#"+j+" text { "+z.cssProps({fill:m.fill,"font-weight":m.font.weight,"font-family":m.font.family+", monospace","font-size":m.font.size+m.font.units})+" } ",u=a.createComment("\nSource URL: "+i+H),v=a.createCDATASection(p),w=c.querySelector("style");r(k,{id:j}),c.insertBefore(u,c.firstChild),w.appendChild(v),k.appendChild(d),k.appendChild(n),c.appendChild(k),r(d,{width:f.children.holderBg.width,height:f.children.holderBg.height,fill:f.children.holderBg.properties.fill}),l.y+=.8*o.boundingBox.height;for(var x in l.children){var y=l.children[x];for(var A in y.children){var B=y.children[A],C=l.x+y.x+B.x,D=l.y+y.y+B.y,F=q("text",E),G=document.createTextNode(null);r(F,{x:C,y:D}),G.nodeValue=B.properties.text,F.appendChild(G),n.appendChild(F)}}var I=N(t(c,e.engineSettings),"background"===e.mode);return I}}}(),N=function(){var a="data:image/svg+xml;charset=UTF-8,",b="data:image/svg+xml;charset=UTF-8;base64,";return function(c,d){return d?b+btoa(unescape(encodeURIComponent(c))):a+encodeURIComponent(c)}}();for(var O in J.flags)J.flags.hasOwnProperty(O)&&(J.flags[O].match=function(a){return a.match(this.regex)});J.setup={renderer:"html",debounce:100,ratio:1,supportsCanvas:!1,supportsSVG:!1,lineWrapRatio:.9,renderers:["html","canvas","svg"]},J.dpr=function(a){return a*J.setup.ratio},J.vars={preempted:!1,resizableImages:[],invisibleImages:{},invisibleId:0,visibilityCheckStarted:!1,debounceTimer:null,cache:{},dataAttr:"data-src"},function(){var a=1,c=1,d=q("canvas"),e=null;d.getContext&&-1!=d.toDataURL("image/png").indexOf("data:image/png")&&(J.setup.renderer="canvas",e=d.getContext("2d"),J.setup.supportsCanvas=!0),J.setup.supportsCanvas&&(a=b.devicePixelRatio||1,c=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),J.setup.ratio=a/c,document.createElementNS&&document.createElementNS(E,"svg").createSVGRect&&(J.setup.renderer="svg",J.setup.supportsSVG=!0)}(),o(),x&&x(function(){J.vars.preempted||I.run(),b.addEventListener?(b.addEventListener("resize",w,!1),b.addEventListener("orientationchange",w,!1)):b.attachEvent("onresize",w),"object"==typeof b.Turbolinks&&b.document.addEventListener("page:change",function(){I.run()})}),a.exports=I}).call(b,function(){return this}())},function(a){function b(a){function b(a){if(!v){if(!g.body)return e(b);for(v=!0;a=w.shift();)e(a)}}function c(a){(t||a.type===i||g[m]===l)&&(d(),b())}function d(){t?(g[s](q,c,j),a[s](i,c,j)):(g[o](r,c),a[o](k,c))}function e(a,b){setTimeout(a,+b>=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}a.exports="undefined"!=typeof window&&b(window)},function(a,b,c){var d=c(5),e=function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}var c=1,e=d.defclass({constructor:function(a){c++,this.parent=null,this.children={},this.id=c,this.name="n"+c,null!=a&&(this.name=a),this.x=0,this.y=0,this.z=0,this.width=0,this.height=0},resize:function(a,b){null!=a&&(this.width=a),null!=b&&(this.height=b)},moveTo:function(a,b,c){this.x=null!=a?a:this.x,this.y=null!=b?b:this.y,this.z=null!=c?c:this.z},add:function(a){var b=a.name;if(null!=this.children[b])throw"SceneGraph: child with that name already exists: "+b;this.children[b]=a,a.parent=this}}),f=d(e,function(b){this.constructor=function(){b.constructor.call(this,"root"),this.properties=a}}),g=d(e,function(a){function c(c,d){if(a.constructor.call(this,c),this.properties={fill:"#000"},null!=d)b(this.properties,d);else if(null!=c&&"string"!=typeof c)throw"SceneGraph: invalid node name"}this.Group=d.extend(this,{constructor:c,type:"group"}),this.Rect=d.extend(this,{constructor:c,type:"rect"}),this.Text=d.extend(this,{constructor:function(a){c.call(this),this.properties.text=a},type:"text"})}),h=new f;return this.Shape=g,this.root=h,this};a.exports=e},function(a,b){(function(a){b.extend=function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c},b.cssProps=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")},b.encodeHtmlEntity=function(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1},b.truthy=function(a){return"string"==typeof a?"true"===a||"yes"===a||"1"===a||"on"===a||"✓"===a:!!a}}).call(b,function(){return this}())},function(a,b,c){var d=encodeURIComponent,e=decodeURIComponent,f=c(7),g=c(6),h=/(\w+)\[(\d+)\]/,i=/\w+\.\w+/;b.parse=function(a){if("string"!=typeof a)return{};if(a=f(a),""===a)return{};"?"===a.charAt(0)&&(a=a.slice(1));for(var b={},c=a.split("&"),d=0;d<c.length;d++){var g,j,k,l=c[d].split("="),m=e(l[0]);if(g=h.exec(m))b[g[1]]=b[g[1]]||[],b[g[1]][g[2]]=e(l[1]);else if(g=i.test(m)){for(g=m.split("."),j=b;g.length;)if(k=g.shift(),k.length){if(j[k]){if(j[k]&&"object"!=typeof j[k])break}else j[k]={};g.length||(j[k]=e(l[1])),j=j[k]}}else b[l[0]]=null==l[1]?"":e(l[1])}return b},b.stringify=function(a){if(!a)return"";var b=[];for(var c in a){var e=a[c];if("array"!=g(e))b.push(d(c)+"="+d(a[c]));else for(var f=0;f<e.length;++f)b.push(d(c+"["+f+"]")+"="+d(e[f]))}return b.join("&")}},function(a){var b=function(){},c=Array.prototype.slice,d=function(a,d){var e=b.prototype="function"==typeof a?a.prototype:a,f=new b,g=d.apply(f,c.call(arguments,2).concat(e));if("object"==typeof g)for(var h in g)f[h]=g[h];if(!f.hasOwnProperty("constructor"))return f;var i=f.constructor;return i.prototype=f,i};d.defclass=function(a){var b=a.constructor;return b.prototype=a,b},d.extend=function(a,b){return d(a,function(a){return this.uber=a,b})},a.exports=d},function(a){var b=Object.prototype.toString;a.exports=function(a){switch(b.call(a)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===a?"null":void 0===a?"undefined":a!==a?"nan":a&&1===a.nodeType?"element":(a=a.valueOf?a.valueOf():Object.prototype.valueOf.apply(a),typeof a)}},function(a,b){function c(a){return a.replace(/^\s*|\s*$/g,"")}b=a.exports=c,b.left=function(a){return a.replace(/^\s*/,"")},b.right=function(a){return a.replace(/\s*$/,"")}}])}),function(a,b){b&&(Holder=a.Holder)}(this,Meteor&&Package);
|