PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.1.0
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.1.0
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / admin / ta-framework / assets / js / webfontloader.js

webfontloader.js in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.1.0, at admin/ta-framework/assets/js/webfontloader.js

693 lines 22.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Skipped minification because the original files appears to be already minified.
3 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
4 */
5 /* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */ (function () {
6 function aa(a, b, c) {
7 return a.call.apply(a.bind, arguments);
8 }
9 function ba(a, b, c) {
10 if (!a) throw Error();
11 if (2 < arguments.length) {
12 var d = Array.prototype.slice.call(arguments, 2);
13 return function () {
14 var c = Array.prototype.slice.call(arguments);
15 Array.prototype.unshift.apply(c, d);
16 return a.apply(b, c);
17 };
18 }
19 return function () {
20 return a.apply(b, arguments);
21 };
22 }
23 function p(a, b, c) {
24 p = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? aa : ba;
25 return p.apply(null, arguments);
26 }
27 var q =
28 Date.now ||
29 function () {
30 return +new Date();
31 };
32 function ca(a, b) {
33 this.a = a;
34 this.o = b || a;
35 this.c = this.o.document;
36 }
37 var da = !!window.FontFace;
38 function t(a, b, c, d) {
39 b = a.c.createElement(b);
40 if (c) for (var e in c) c.hasOwnProperty(e) && ("style" == e ? (b.style.cssText = c[e]) : b.setAttribute(e, c[e]));
41 d && b.appendChild(a.c.createTextNode(d));
42 return b;
43 }
44 function u(a, b, c) {
45 a = a.c.getElementsByTagName(b)[0];
46 a || (a = document.documentElement);
47 a.insertBefore(c, a.lastChild);
48 }
49 function v(a) {
50 a.parentNode && a.parentNode.removeChild(a);
51 }
52 function w(a, b, c) {
53 b = b || [];
54 c = c || [];
55 for (var d = a.className.split(/\s+/), e = 0; e < b.length; e += 1) {
56 for (var f = !1, g = 0; g < d.length; g += 1)
57 if (b[e] === d[g]) {
58 f = !0;
59 break;
60 }
61 f || d.push(b[e]);
62 }
63 b = [];
64 for (e = 0; e < d.length; e += 1) {
65 f = !1;
66 for (g = 0; g < c.length; g += 1)
67 if (d[e] === c[g]) {
68 f = !0;
69 break;
70 }
71 f || b.push(d[e]);
72 }
73 a.className = b
74 .join(" ")
75 .replace(/\s+/g, " ")
76 .replace(/^\s+|\s+$/, "");
77 }
78 function y(a, b) {
79 for (var c = a.className.split(/\s+/), d = 0, e = c.length; d < e; d++) if (c[d] == b) return !0;
80 return !1;
81 }
82 function ea(a) {
83 return a.o.location.hostname || a.a.location.hostname;
84 }
85 function z(a, b, c) {
86 function d() {
87 m && e && f && (m(g), (m = null));
88 }
89 b = t(a, "link", { rel: "stylesheet", href: b, media: "all" });
90 var e = !1,
91 f = !0,
92 g = null,
93 m = c || null;
94 da
95 ? ((b.onload = function () {
96 e = !0;
97 d();
98 }),
99 (b.onerror = function () {
100 e = !0;
101 g = Error("Stylesheet failed to load");
102 d();
103 }))
104 : setTimeout(function () {
105 e = !0;
106 d();
107 }, 0);
108 u(a, "head", b);
109 }
110 function A(a, b, c, d) {
111 var e = a.c.getElementsByTagName("head")[0];
112 if (e) {
113 var f = t(a, "script", { src: b }),
114 g = !1;
115 f.onload = f.onreadystatechange = function () {
116 g || (this.readyState && "loaded" != this.readyState && "complete" != this.readyState) || ((g = !0), c && c(null), (f.onload = f.onreadystatechange = null), "HEAD" == f.parentNode.tagName && e.removeChild(f));
117 };
118 e.appendChild(f);
119 setTimeout(function () {
120 g || ((g = !0), c && c(Error("Script load timeout")));
121 }, d || 5e3);
122 return f;
123 }
124 return null;
125 }
126 function B() {
127 this.a = 0;
128 this.c = null;
129 }
130 function C(a) {
131 a.a++;
132 return function () {
133 a.a--;
134 D(a);
135 };
136 }
137 function E(a, b) {
138 a.c = b;
139 D(a);
140 }
141 function D(a) {
142 0 == a.a && a.c && (a.c(), (a.c = null));
143 }
144 function F(a) {
145 this.a = a || "-";
146 }
147 F.prototype.c = function (a) {
148 for (var b = [], c = 0; c < arguments.length; c++) b.push(arguments[c].replace(/[\W_]+/g, "").toLowerCase());
149 return b.join(this.a);
150 };
151 function G(a, b) {
152 this.c = a;
153 this.f = 4;
154 this.a = "n";
155 var c = (b || "n4").match(/^([nio])([1-9])$/i);
156 c && ((this.a = c[1]), (this.f = parseInt(c[2], 10)));
157 }
158 function fa(a) {
159 return H(a) + " " + (a.f + "00") + " 300px " + I(a.c);
160 }
161 function I(a) {
162 var b = [];
163 a = a.split(/,\s*/);
164 for (var c = 0; c < a.length; c++) {
165 var d = a[c].replace(/['"]/g, "");
166 -1 != d.indexOf(" ") || /^\d/.test(d) ? b.push("'" + d + "'") : b.push(d);
167 }
168 return b.join(",");
169 }
170 function J(a) {
171 return a.a + a.f;
172 }
173 function H(a) {
174 var b = "normal";
175 "o" === a.a ? (b = "oblique") : "i" === a.a && (b = "italic");
176 return b;
177 }
178 function ga(a) {
179 var b = 4,
180 c = "n",
181 d = null;
182 a &&
183 ((d = a.match(/(normal|oblique|italic)/i)) && d[1] && (c = d[1].substr(0, 1).toLowerCase()),
184 (d = a.match(/([1-9]00|normal|bold)/i)) && d[1] && (/bold/i.test(d[1]) ? (b = 7) : /[1-9]00/.test(d[1]) && (b = parseInt(d[1].substr(0, 1), 10))));
185 return c + b;
186 }
187 function ha(a, b) {
188 this.c = a;
189 this.f = a.o.document.documentElement;
190 this.h = b;
191 this.a = new F("-");
192 this.j = !1 !== b.events;
193 this.g = !1 !== b.classes;
194 }
195 function ia(a) {
196 a.g && w(a.f, [a.a.c("wf", "loading")]);
197 K(a, "loading");
198 }
199 function L(a) {
200 if (a.g) {
201 var b = y(a.f, a.a.c("wf", "active")),
202 c = [],
203 d = [a.a.c("wf", "loading")];
204 b || c.push(a.a.c("wf", "inactive"));
205 w(a.f, c, d);
206 }
207 K(a, "inactive");
208 }
209 function K(a, b, c) {
210 if (a.j && a.h[b])
211 if (c) a.h[b](c.c, J(c));
212 else a.h[b]();
213 }
214 function ja() {
215 this.c = {};
216 }
217 function ka(a, b, c) {
218 var d = [],
219 e;
220 for (e in b)
221 if (b.hasOwnProperty(e)) {
222 var f = a.c[e];
223 f && d.push(f(b[e], c));
224 }
225 return d;
226 }
227 function M(a, b) {
228 this.c = a;
229 this.f = b;
230 this.a = t(this.c, "span", { "aria-hidden": "true" }, this.f);
231 }
232 function N(a) {
233 u(a.c, "body", a.a);
234 }
235 function O(a) {
236 return (
237 "display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:" +
238 I(a.c) +
239 ";" +
240 ("font-style:" + H(a) + ";font-weight:" + (a.f + "00") + ";")
241 );
242 }
243 function P(a, b, c, d, e, f) {
244 this.g = a;
245 this.j = b;
246 this.a = d;
247 this.c = c;
248 this.f = e || 3e3;
249 this.h = f || void 0;
250 }
251 P.prototype.start = function () {
252 var a = this.c.o.document,
253 b = this,
254 c = q(),
255 d = new Promise(function (d, e) {
256 function f() {
257 q() - c >= b.f
258 ? e()
259 : a.fonts.load(fa(b.a), b.h).then(
260 function (a) {
261 1 <= a.length ? d() : setTimeout(f, 25);
262 },
263 function () {
264 e();
265 }
266 );
267 }
268 f();
269 }),
270 e = null,
271 f = new Promise(function (a, d) {
272 e = setTimeout(d, b.f);
273 });
274 Promise.race([f, d]).then(
275 function () {
276 e && (clearTimeout(e), (e = null));
277 b.g(b.a);
278 },
279 function () {
280 b.j(b.a);
281 }
282 );
283 };
284 function Q(a, b, c, d, e, f, g) {
285 this.v = a;
286 this.B = b;
287 this.c = c;
288 this.a = d;
289 this.s = g || "BESbswy";
290 this.f = {};
291 this.w = e || 3e3;
292 this.u = f || null;
293 this.m = this.j = this.h = this.g = null;
294 this.g = new M(this.c, this.s);
295 this.h = new M(this.c, this.s);
296 this.j = new M(this.c, this.s);
297 this.m = new M(this.c, this.s);
298 a = new G(this.a.c + ",serif", J(this.a));
299 a = O(a);
300 this.g.a.style.cssText = a;
301 a = new G(this.a.c + ",sans-serif", J(this.a));
302 a = O(a);
303 this.h.a.style.cssText = a;
304 a = new G("serif", J(this.a));
305 a = O(a);
306 this.j.a.style.cssText = a;
307 a = new G("sans-serif", J(this.a));
308 a = O(a);
309 this.m.a.style.cssText = a;
310 N(this.g);
311 N(this.h);
312 N(this.j);
313 N(this.m);
314 }
315 var R = { D: "serif", C: "sans-serif" },
316 S = null;
317 function T() {
318 if (null === S) {
319 var a = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);
320 S = !!a && (536 > parseInt(a[1], 10) || (536 === parseInt(a[1], 10) && 11 >= parseInt(a[2], 10)));
321 }
322 return S;
323 }
324 Q.prototype.start = function () {
325 this.f.serif = this.j.a.offsetWidth;
326 this.f["sans-serif"] = this.m.a.offsetWidth;
327 this.A = q();
328 U(this);
329 };
330 function la(a, b, c) {
331 for (var d in R) if (R.hasOwnProperty(d) && b === a.f[R[d]] && c === a.f[R[d]]) return !0;
332 return !1;
333 }
334 function U(a) {
335 var b = a.g.a.offsetWidth,
336 c = a.h.a.offsetWidth,
337 d;
338 (d = b === a.f.serif && c === a.f["sans-serif"]) || (d = T() && la(a, b, c));
339 d ? (q() - a.A >= a.w ? (T() && la(a, b, c) && (null === a.u || a.u.hasOwnProperty(a.a.c)) ? V(a, a.v) : V(a, a.B)) : ma(a)) : V(a, a.v);
340 }
341 function ma(a) {
342 setTimeout(
343 p(function () {
344 U(this);
345 }, a),
346 50
347 );
348 }
349 function V(a, b) {
350 setTimeout(
351 p(function () {
352 v(this.g.a);
353 v(this.h.a);
354 v(this.j.a);
355 v(this.m.a);
356 b(this.a);
357 }, a),
358 0
359 );
360 }
361 function W(a, b, c) {
362 this.c = a;
363 this.a = b;
364 this.f = 0;
365 this.m = this.j = !1;
366 this.s = c;
367 }
368 var X = null;
369 W.prototype.g = function (a) {
370 var b = this.a;
371 b.g && w(b.f, [b.a.c("wf", a.c, J(a).toString(), "active")], [b.a.c("wf", a.c, J(a).toString(), "loading"), b.a.c("wf", a.c, J(a).toString(), "inactive")]);
372 K(b, "fontactive", a);
373 this.m = !0;
374 na(this);
375 };
376 W.prototype.h = function (a) {
377 var b = this.a;
378 if (b.g) {
379 var c = y(b.f, b.a.c("wf", a.c, J(a).toString(), "active")),
380 d = [],
381 e = [b.a.c("wf", a.c, J(a).toString(), "loading")];
382 c || d.push(b.a.c("wf", a.c, J(a).toString(), "inactive"));
383 w(b.f, d, e);
384 }
385 K(b, "fontinactive", a);
386 na(this);
387 };
388 function na(a) {
389 0 == --a.f && a.j && (a.m ? ((a = a.a), a.g && w(a.f, [a.a.c("wf", "active")], [a.a.c("wf", "loading"), a.a.c("wf", "inactive")]), K(a, "active")) : L(a.a));
390 }
391 function oa(a) {
392 this.j = a;
393 this.a = new ja();
394 this.h = 0;
395 this.f = this.g = !0;
396 }
397 oa.prototype.load = function (a) {
398 this.c = new ca(this.j, a.context || this.j);
399 this.g = !1 !== a.events;
400 this.f = !1 !== a.classes;
401 pa(this, new ha(this.c, a), a);
402 };
403 function qa(a, b, c, d, e) {
404 var f = 0 == --a.h;
405 (a.f || a.g) &&
406 setTimeout(function () {
407 var a = e || null,
408 m = d || null || {};
409 if (0 === c.length && f) L(b.a);
410 else {
411 b.f += c.length;
412 f && (b.j = f);
413 var h,
414 l = [];
415 for (h = 0; h < c.length; h++) {
416 var k = c[h],
417 n = m[k.c],
418 r = b.a,
419 x = k;
420 r.g && w(r.f, [r.a.c("wf", x.c, J(x).toString(), "loading")]);
421 K(r, "fontloading", x);
422 r = null;
423 if (null === X)
424 if (window.FontFace) {
425 var x = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),
426 xa = /OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor);
427 X = x ? 42 < parseInt(x[1], 10) : xa ? !1 : !0;
428 } else X = !1;
429 X ? (r = new P(p(b.g, b), p(b.h, b), b.c, k, b.s, n)) : (r = new Q(p(b.g, b), p(b.h, b), b.c, k, b.s, a, n));
430 l.push(r);
431 }
432 for (h = 0; h < l.length; h++) l[h].start();
433 }
434 }, 0);
435 }
436 function pa(a, b, c) {
437 var d = [],
438 e = c.timeout;
439 ia(b);
440 var d = ka(a.a, c, a.c),
441 f = new W(a.c, b, e);
442 a.h = d.length;
443 b = 0;
444 for (c = d.length; b < c; b++)
445 d[b].load(function (b, d, c) {
446 qa(a, f, b, d, c);
447 });
448 }
449 function ra(a, b) {
450 this.c = a;
451 this.a = b;
452 }
453 ra.prototype.load = function (a) {
454 function b() {
455 if (f["__mti_fntLst" + d]) {
456 var c = f["__mti_fntLst" + d](),
457 e = [],
458 h;
459 if (c)
460 for (var l = 0; l < c.length; l++) {
461 var k = c[l].fontfamily;
462 void 0 != c[l].fontStyle && void 0 != c[l].fontWeight ? ((h = c[l].fontStyle + c[l].fontWeight), e.push(new G(k, h))) : e.push(new G(k));
463 }
464 a(e);
465 } else
466 setTimeout(function () {
467 b();
468 }, 50);
469 }
470 var c = this,
471 d = c.a.projectId,
472 e = c.a.version;
473 if (d) {
474 var f = c.c.o;
475 A(this.c, (c.a.api || "https://fast.fonts.net/jsapi") + "/" + d + ".js" + (e ? "?v=" + e : ""), function (e) {
476 e
477 ? a([])
478 : ((f["__MonotypeConfiguration__" + d] = function () {
479 return c.a;
480 }),
481 b());
482 }).id = "__MonotypeAPIScript__" + d;
483 } else a([]);
484 };
485 function sa(a, b) {
486 this.c = a;
487 this.a = b;
488 }
489 sa.prototype.load = function (a) {
490 var b,
491 c,
492 d = this.a.urls || [],
493 e = this.a.families || [],
494 f = this.a.testStrings || {},
495 g = new B();
496 b = 0;
497 for (c = d.length; b < c; b++) z(this.c, d[b], C(g));
498 var m = [];
499 b = 0;
500 for (c = e.length; b < c; b++)
501 if (((d = e[b].split(":")), d[1])) for (var h = d[1].split(","), l = 0; l < h.length; l += 1) m.push(new G(d[0], h[l]));
502 else m.push(new G(d[0]));
503 E(g, function () {
504 a(m, f);
505 });
506 };
507 function ta(a, b) {
508 a ? (this.c = a) : (this.c = ua);
509 this.a = [];
510 this.f = [];
511 this.g = b || "";
512 }
513 var ua = "https://fonts.googleapis.com/css";
514 function va(a, b) {
515 for (var c = b.length, d = 0; d < c; d++) {
516 var e = b[d].split(":");
517 3 == e.length && a.f.push(e.pop());
518 var f = "";
519 2 == e.length && "" != e[1] && (f = ":");
520 a.a.push(e.join(f));
521 }
522 }
523 function wa(a) {
524 if (0 == a.a.length) throw Error("No fonts to load!");
525 if (-1 != a.c.indexOf("kit=")) return a.c;
526 for (var b = a.a.length, c = [], d = 0; d < b; d++) c.push(a.a[d].replace(/ /g, "+"));
527 b = a.c + "?family=" + c.join("%7C");
528 0 < a.f.length && (b += "&subset=" + a.f.join(","));
529 0 < a.g.length && (b += "&text=" + encodeURIComponent(a.g));
530 return b;
531 }
532 function ya(a) {
533 this.f = a;
534 this.a = [];
535 this.c = {};
536 }
537 var za = { latin: "BESbswy", "latin-ext": "\u00e7\u00f6\u00fc\u011f\u015f", cyrillic: "\u0439\u044f\u0416", greek: "\u03b1\u03b2\u03a3", khmer: "\u1780\u1781\u1782", Hanuman: "\u1780\u1781\u1782" },
538 Aa = {
539 thin: "1",
540 extralight: "2",
541 "extra-light": "2",
542 ultralight: "2",
543 "ultra-light": "2",
544 light: "3",
545 regular: "4",
546 book: "4",
547 medium: "5",
548 "semi-bold": "6",
549 semibold: "6",
550 "demi-bold": "6",
551 demibold: "6",
552 bold: "7",
553 "extra-bold": "8",
554 extrabold: "8",
555 "ultra-bold": "8",
556 ultrabold: "8",
557 black: "9",
558 heavy: "9",
559 l: "3",
560 r: "4",
561 b: "7",
562 },
563 Ba = { i: "i", italic: "i", n: "n", normal: "n" },
564 Ca = /^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;
565 function Da(a) {
566 for (var b = a.f.length, c = 0; c < b; c++) {
567 var d = a.f[c].split(":"),
568 e = d[0].replace(/\+/g, " "),
569 f = ["n4"];
570 if (2 <= d.length) {
571 var g;
572 var m = d[1];
573 g = [];
574 if (m)
575 for (var m = m.split(","), h = m.length, l = 0; l < h; l++) {
576 var k;
577 k = m[l];
578 if (k.match(/^[\w-]+$/)) {
579 var n = Ca.exec(k.toLowerCase());
580 if (null == n) k = "";
581 else {
582 k = n[2];
583 k = null == k || "" == k ? "n" : Ba[k];
584 n = n[1];
585 if (null == n || "" == n) n = "4";
586 else
587 var r = Aa[n],
588 n = r ? r : isNaN(n) ? "4" : n.substr(0, 1);
589 k = [k, n].join("");
590 }
591 } else k = "";
592 k && g.push(k);
593 }
594 0 < g.length && (f = g);
595 3 == d.length && ((d = d[2]), (g = []), (d = d ? d.split(",") : g), 0 < d.length && (d = za[d[0]]) && (a.c[e] = d));
596 }
597 a.c[e] || ((d = za[e]) && (a.c[e] = d));
598 for (d = 0; d < f.length; d += 1) a.a.push(new G(e, f[d]));
599 }
600 }
601 function Ea(a, b) {
602 this.c = a;
603 this.a = b;
604 }
605 var Fa = { Arimo: !0, Cousine: !0, Tinos: !0 };
606 Ea.prototype.load = function (a) {
607 var b = new B(),
608 c = this.c,
609 d = new ta(this.a.api, this.a.text),
610 e = this.a.families;
611 va(d, e);
612 var f = new ya(e);
613 Da(f);
614 z(c, wa(d), C(b));
615 E(b, function () {
616 a(f.a, f.c, Fa);
617 });
618 };
619 function Ga(a, b) {
620 this.c = a;
621 this.a = b;
622 }
623 Ga.prototype.load = function (a) {
624 var b = this.a.id,
625 c = this.c.o;
626 b
627 ? A(
628 this.c,
629 (this.a.api || "https://use.typekit.net") + "/" + b + ".js",
630 function (b) {
631 if (b) a([]);
632 else if (c.Typekit && c.Typekit.config && c.Typekit.config.fn) {
633 b = c.Typekit.config.fn;
634 for (var e = [], f = 0; f < b.length; f += 2) for (var g = b[f], m = b[f + 1], h = 0; h < m.length; h++) e.push(new G(g, m[h]));
635 try {
636 c.Typekit.load({ events: !1, classes: !1, async: !0 });
637 } catch (l) {}
638 a(e);
639 }
640 },
641 2e3
642 )
643 : a([]);
644 };
645 function Ha(a, b) {
646 this.c = a;
647 this.f = b;
648 this.a = [];
649 }
650 Ha.prototype.load = function (a) {
651 var b = this.f.id,
652 c = this.c.o,
653 d = this;
654 b
655 ? (c.__webfontfontdeckmodule__ || (c.__webfontfontdeckmodule__ = {}),
656 (c.__webfontfontdeckmodule__[b] = function (b, c) {
657 for (var g = 0, m = c.fonts.length; g < m; ++g) {
658 var h = c.fonts[g];
659 d.a.push(new G(h.name, ga("font-weight:" + h.weight + ";font-style:" + h.style)));
660 }
661 a(d.a);
662 }),
663 A(this.c, (this.f.api || "https://f.fontdeck.com/s/css/js/") + ea(this.c) + "/" + b + ".js", function (b) {
664 b && a([]);
665 }))
666 : a([]);
667 };
668 var Y = new oa(window);
669 Y.a.c.custom = function (a, b) {
670 return new sa(b, a);
671 };
672 Y.a.c.fontdeck = function (a, b) {
673 return new Ha(b, a);
674 };
675 Y.a.c.monotype = function (a, b) {
676 return new ra(b, a);
677 };
678 Y.a.c.typekit = function (a, b) {
679 return new Ga(b, a);
680 };
681 Y.a.c.google = function (a, b) {
682 return new Ea(b, a);
683 };
684 var Z = { load: p(Y.load, Y) };
685 "function" === typeof define && define.amd
686 ? define(function () {
687 return Z;
688 })
689 : "undefined" !== typeof module && module.exports
690 ? (module.exports = Z)
691 : ((window.WebFont = Z), window.WebFontConfig && Y.load(window.WebFontConfig));
692 })();
693